Stupid question??!!
Hey,
I have a really stupid question. I don't know if I am gone crazy but yeah it's kinda making me crazy.
So I have an attribute. And I have two rules....
And I was having in the first rule ( short version)
When touch is pressed change this attribute to 1.
And when it is pressed again and has a value of 1, change it to 2.
But I don't get it fixed that it is always set immediately to 2....
Thank you guys for helping me out..
Alex
I have a really stupid question. I don't know if I am gone crazy but yeah it's kinda making me crazy.
So I have an attribute. And I have two rules....
And I was having in the first rule ( short version)
When touch is pressed change this attribute to 1.
And when it is pressed again and has a value of 1, change it to 2.
But I don't get it fixed that it is always set immediately to 2....
Thank you guys for helping me out..
Alex
Comments
The player has to choose from different objects, and it is a multiplayer game.
So first, player 1 can choose a ball. And afterwards player two can choose. But in my case now, player1 and player2 wanna have the same ball.
So I need first press attribute to 1 and second press to 2.
Each time a sound should be played, now when it is set to 2 immediately, only one time the sounds gets played.
And then he has to choose a bg, then the game starts...just for info
thank you
Alex
And the game is a multiplayer game. So each player ( 2 players total ), has the chance to select a ball that will be used in the game.
So Player 1 has the chance to select first. And afterwards Player 2 can select his ball for the game.
In my case now, both Players want to choose the same ball. And when player 1 selects a ball, an attribute gets set to 1. When Player 2 selects
a ball the attribute gets set to 2. I need it at 2 because of some following rules. The problem or what I want to have is that this ball has
to be pressed 2x to get to the value 2. Now when the ball gets pressed, the attribute changes to 2 immediately. I want the ball to be pressed 2x to be set to 2.
Hope it is more clear now
thats the same effect...the same happens again
I want an actor to be touched two times. And at the first time an attribute should be set to 1. And second time it should be
set to 2. The attribute should not get higher than 2 when touching this actor.
Thank you...
change game.attribute to 2
gameAttribute … index type … player2Ball
on ball:
selfAttribute: my#
Rule: when
Event: touch is pressed
--Rule: when
---Attribute: player1Ball = 0
----changeAttribute: game.player1Ball To: self.my#
--Otherwise:
--Rule: when
---Attribute: player2Ball = 0
----changeAttribute: game.player2Ball To: self.my#
Rule: when (All)
Attribute: game.player1Ball > 0
Attribute: game.player2Ball > 0
--Play Ball! stuff
of course
Rule: when
Attribute: game/round over
--changeAttribute: game.player1Ball To: 0
--changeAttribute: game.player2Ball To: 0
and to √ when the ball is used twice
Rule: when
Attribute: game.player1Ball = game.player2Ball
-- whatever you have to do with the 2
@};- MH
I just want that an actor has to get pressed two times and that an attribute switches first press to 1 and second press to 2.
That's all....isn't there a simple way???
Alex
But I have two rules, and in the second rule it only changes the attribute when the attribute =1. So it also sets
it to 2 when touching it just once..
it just made bang in my head an it works now..thank you
of course to all of you that tried to help me..