How to say - when touch is released, or when your finger isn't on the screen, to proceed.
Hey guys,
I know this sounds simple, but I can't get my head around it. In my game you can shoot things.
I would like it so that when you shoot, and release your your finger from the screen, and when the orb has stopped (see below for more description), then you can tap and shoot again. I don't want it so you can keep shooting at the exact same place.
I have some attributes that are like this:
Rule:
When game.start true
When game.can shoot true
When game.touch count is greater then 1
When touch is pressed,
Change attribute game.shoot to true.
-----
Now, it shoots out an orb, and the orb moves etc until it stops.
Then, it changes game.can shoot to true when it's stopped.
So I hope this makes sense.
Any help would be great!
Braydon
I know this sounds simple, but I can't get my head around it. In my game you can shoot things.
I would like it so that when you shoot, and release your your finger from the screen, and when the orb has stopped (see below for more description), then you can tap and shoot again. I don't want it so you can keep shooting at the exact same place.
I have some attributes that are like this:
Rule:
When game.start true
When game.can shoot true
When game.touch count is greater then 1
When touch is pressed,
Change attribute game.shoot to true.
-----
Now, it shoots out an orb, and the orb moves etc until it stops.
Then, it changes game.can shoot to true when it's stopped.
So I hope this makes sense.
Any help would be great!
Braydon
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Comments
When touch count = 0
Trigger what you want..
Not sure I understand. Love the squirrel, though.
Touch count is in there because when the game is over, a game over sign comes down over the screen. You tap that and it goes away.
I did this so it doesn't shoot out another ball right away just because you tapped the replay button on the You Lose actor. :P
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
So basically,
When touch count = 0
Change attribute "game.allow process" to true..
No,
In the game, when touch is pressed, it shoots out a ball. Then, when the ball stops moving, it set it back so you can shoot again. But if your finger is still on the screen, it will just shoot another ball in the same exact position. Which, isn't a big problem, but it could be considered cheating in this certain game.
So, I want it so when you can shoot, to check if your finger is off the screen. Or better yet, when it stops growing to check, then set it so you can shoot if your finger is off.
Hope this makes sense.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
But the answer is still the same..
When "Game.allow process" IS true
When touch is pressed
Spawn ball
Change "Game.allow process" TO false
Now new rule:
When touch count = 0
Change "Game.allow process" TO true
gameAttribute: ballMoving
ballActor:
Rule: when (Any)
Attribute: self.Motion.Linear Velocity.X > 0
Attribute: self.Motion.Linear Velocity.Y > 0
--changeAttribute: game.ballMoving To: 1
Otherwise:
--changeAttribute: game.ballMoving To: 0
shooterActor:
Rule: when
Event: touch is pressed
--Rule: when
---Attribute: game.ballMoving is 0
---fire the ball
@};- MH
That seemed to fix it, thanks m8.
EDIT: oops, just saw your comment, MH. Thanks for you help too.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Glad you sorted it out