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: 233
Reputation: 3,474

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
43
S
22
G
15
Posts: 383
Reputation: 12,262

Post » Fri Jan 06, 2017 6:33 pm

ImageImageImage
B
71
S
22
G
248
Posts: 3,758
Reputation: 138,067

Post » Sat Jan 07, 2017 5:09 pm

B
21
S
7
G
4
Posts: 233
Reputation: 3,474


Return to How do I....?

Who is online

Users browsing this forum: chrisinfinger, PRIZZRAK and 23 guests