-
Random change
Hello everyone,
I am a beginner and I am trying to make my second game for my neighbor little girl.
I made a little kitten who seeks from time to time something from the player: water, food, biscuit ball...etc - actually "cat speach" appear as balloons in comic books, showing the pictures of what pussy wants.
How do I make, that the picture that appear in balloons, every time be diferent - to be chosen at random way, among several diferent.
Thank you in advance.
-
Have a single Balloon object, and each thing it can want can be a different animation frame or different animation sequence.
When you display the balloon, you set the animation frame or sequence to Random(numberOfOptions).
-
Thank. Could you explain to me how to do that. I try but not succeed. I try in event editor to do: If Balloon visible than in "Special condtition" i chose randomize than "Retrive data from an object", than choose balloon object / Animation / Curent frame and get text "Image( "Active 3" )" - but not work.
-
1 Attachment(s)
No, don't use the Randomize action. I'll make an example of what I mean since I'm terrible at explaining things.
Here's an example:
-
1 Attachment(s)
Thanks for example. I try to do like you in your example but nor work.
I don't have button. I have 1 ballon with 4 diferent frames.
1. On startup ballon is not visible
2. Every 15 second cat sit and than balloon is visible for 5 second.
In event editor i set: every 15 sceond ballon is visible and "Force anomation frame Random(4)"
But to work - I see always same frame.
Where is my error, please help me.
-
I edit my previous post - i attached my example. I deleted cat animation frames and backgrounds because of file size.
-
It's work, I succeed. Thanks.
p.s
My speed im Direction options of Balloon was 50.