How can I do this?
Hello,
I want Actors do to something when Actor A is pressed twice. But it must be repeatable. So When actor A is pressed change attribute Actor A to Actor A +1 wont do. It must be something like If attribute Actor A=Actor A+2 change Actor B to blabla But i tried and it didnt work.
Hope you know what i mean
I want Actors do to something when Actor A is pressed twice. But it must be repeatable. So When actor A is pressed change attribute Actor A to Actor A +1 wont do. It must be something like If attribute Actor A=Actor A+2 change Actor B to blabla But i tried and it didnt work.
Hope you know what i mean
Comments
If so..
Actor A:
Rule: Actor - touch - Pressed
Change Attribute: PressCount = PressCount + 1
Rule: If PressCount = 2
*Change or Trigger whatever action you want*
PressCount = 0
That should work, I'm new to GS myself but trying to help whenever I can.
I would have an integer attribute, say, counter. which when actorA is pressed has counter = counter + 1
If counter = 2 perform the rule on actor B, then have a change attribute to change count to 0. This will ensure it alway counts to 2 max, and is repeatable
Edit: beaten to it! Same logic though!.
But it's not really what i mean. Ill try to explain more.
Let's say when Actor B is pressed it will change color when Actor A is pressed twice.
Then you press Actor A once
But then you press Actor C that will also change color when Actor A is pressed twice
So then you press Actor A again and then Actor B will change color. But Actor C wont change color untill you press Actor A again because that will be the second press for Actor C
have an attribute called Colouractive, set to 0
Also have attributes called actorBpressed and actorCpressed, set to 0
if actorB receives a touch change colouractive to 1
Then in actorA have a rule which says
If touch is pressed and colouractive = 1 then actorBpressed = actorBpressed +1
if actorC receives a touch change colouractive to 2
Then in actorA have a rule which says
If touch is pressed and colouractive = 2 then actorCpressed = actorCpressed +1
That's should be a start for you but without seeing the game can't really expand more.
Are you saying...
2 Presses on Actor A will change Actor B or Actors Cs color
But, Actor B or C needs to be pressed first to "activate" it to receive the press counts from A?
Create global attributes to control what you want, this will be accessible by all actors because it's game wide attributes. Within each actor create rules do what you want based on the global attributes values you created and also change the values so other actors would know what to do.
M