swapping values?

Get help using Construct 2

Post » Sat Feb 09, 2013 12:47 pm

Hi
I need some help figuring out how to do something

What I want is to swap one value with another
Specifically when the player overlaps an object I want a global variable to be set to the objects current frame number and the objects frame number to be changed to the value which was stored in the global variable.
How do I go about doing this?

any help would be appreciated
Thanks
B
5
S
1
G
1
Posts: 52
Reputation: 1,222

Post » Sat Feb 09, 2013 12:56 pm

Use a middle-man, so to speak:

On collision:
> Set TempNumber to GlobalNumber
> Set GlobalNumber to FrameNumber
> Set FrameNumber to TempNumber
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Sat Feb 09, 2013 1:10 pm

Thank you
B
5
S
1
G
1
Posts: 52
Reputation: 1,222


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, randomly, spcsmrf, Yahoo [Bot] and 28 guests