How do I

Get help using Construct 2

Post » Sun Mar 19, 2017 1:35 pm

it is a complicated question
now thanks to 99instence2go :)
i have learned how to set only one sprite to show same frame of another sprite randomly
by using ( pick random instance )

my question is if i have a global variable (random(0,12) and a sprite sat it's frame to it
assume global variable choose frame 4 from (0,12 )
how to make system remove this frame so the other copied sprite don`t show the same frame as the original one or don`t show the frame of each other

simplifying
a sprite choose frame 4 from the global variable randomly
how to stop the other copied sprites to choose same frame and stop them to be all same as each other every layout restarting
Last edited by semaso on Sun Mar 19, 2017 8:29 pm, edited 2 times in total.
B
22
S
8
G
2
Posts: 77
Reputation: 2,701

Post » Sun Mar 19, 2017 2:05 pm

Persist behavior

on start of layout
for each sprite
>>>
set variable to floor(random(0,12))
set frame to variable

https://app.box.com/s/9zjbpsnq1vk7i2biuayxgarpy16mu946

I'm not entirely sure I understand your question so just let me know if that doesn't work.
B
25
S
16
G
26
Posts: 125
Reputation: 16,103

Post » Sun Mar 19, 2017 3:16 pm

Use an Array (that is by default Global)

https://www.dropbox.com/s/cou95ovtwm271 ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Mar 19, 2017 8:33 pm

thank you guys you are really helpful i will try those capx :)
@99Instances2Go @celstrider
B
22
S
8
G
2
Posts: 77
Reputation: 2,701


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 18 guests