How do I pick a frame that's not the current frame?

Get help using Construct 2

Post » Fri Jan 06, 2017 4:28 pm

I need a command that picks a random frame, but not the one that's currently playing. I want to keep a bunch of single frame things in one animation and then randomize those frames, but the randomizer can't pick the same frame that's currently visible. Is this possible without some serious coding magic?
B
21
S
7
G
4
Posts: 231
Reputation: 3,470

Post » Fri Jan 06, 2017 5:44 pm

You can't pick an earlier frame because you always only have the current screen in the videao memory.

Two ways i would try (depending on your project)

1. save the last X frames (Snapshot canvas) - but this might take too long?!
2. save the positiones/attributes of each object into an array. To restore the X'th frame you have to set all positions/attributes of all object (can become tricky if you have recreate objects they where deleted meanwhile ;) )

There are other methods also but this can be implemeted quick...
Image Image Image
B
42
S
22
G
15
Posts: 372
Reputation: 12,215

Post » Fri Jan 06, 2017 6:33 pm

ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Sat Jan 07, 2017 5:09 pm

B
21
S
7
G
4
Posts: 231
Reputation: 3,470


Return to How do I....?

Who is online

Users browsing this forum: bluesun66, plinkie and 6 guests