Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Dood on June 14, 2019, 06:13:27 PM
-
Hello,
How do I make a button in my game that allows the user to perform different actions based on the number of times it was pressed?
Example:
If I press the button once I get an animation of a particular object... If I press the same button again, I get another animation of a different object... And so on...
Is this possible? and how?
Thank you for your time everyone!! 8)
-
Hi.
you can have a int variable and on button clicked do 'int add'
Then you can probably use an array to hold the different animations.
Here is a video about arrays :
-
Allright I will try this out, thanks man, also, I looked at that video prior to coming to the forum, as I knew I would probably need an array. Good job on that video by the way, informative :)
-
Hi.
Its not my video, but you can thumbs up his video :D
-
Hi.
Here is a sample how to loop (attachment below) .
On the sample i use a int array, but you can use any kind of array.
There are 3 types i used :
Next Array Direct
Int Variable
Iterate
All of them are valid usages, in some cases "int" would be better to use, in other cases "iterate".
Same for Array direct.