Press button to unlock first, but the button function still occurs
kanuvas
Member Posts: 21
Hi All,
Firstly I had a button, which when pressed moved scenes (a simple 'on touch' rule).
Now I want to be able to 'unlock' the button first by pressing it, and then on next touch it then runs the 'next scene' rule mentioned above.
I have implemented a local variable on the actor, called 'unlocked'. Then the 'next scene' rule only works when pressed and it is marked as 'unlocked'. Now to mark as 'unlocked', I have a rule that says 'when pressed change LOCAL variable 'unlocked' to true'.
This seems like it should work, however when pressed it is instantly marking it as unlocked and straight away running the 'next scene' rule.
So it is doing everything in 1.
The reason I am doing this, is I am unlocking it if enough 'coins' have been selected (part of my IAP).
Any and all help welcome.
Thanks,
Firstly I had a button, which when pressed moved scenes (a simple 'on touch' rule).
Now I want to be able to 'unlock' the button first by pressing it, and then on next touch it then runs the 'next scene' rule mentioned above.
I have implemented a local variable on the actor, called 'unlocked'. Then the 'next scene' rule only works when pressed and it is marked as 'unlocked'. Now to mark as 'unlocked', I have a rule that says 'when pressed change LOCAL variable 'unlocked' to true'.
This seems like it should work, however when pressed it is instantly marking it as unlocked and straight away running the 'next scene' rule.
So it is doing everything in 1.
The reason I am doing this, is I am unlocking it if enough 'coins' have been selected (part of my IAP).
Any and all help welcome.
Thanks,
Best Answer
-
The_Gamesalad_Guru Posts: 9,922Make the unlock happen when touch is released not touch is pressed and keep the scene change rule as touch is pressed.
Answers
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS