Moving instances of objects

Get help using Construct 2

Post » Mon Oct 07, 2013 10:09 am

Hi,

Currently, I have an animation with three frames. Every 5 seconds, one of the animations is displayed on screen. I then click on a point in the map, and that object moves there.

After 5 more seconds, another random animation is displayed on screen. Now, if I click on a second point on the map, both the instances of the object get moved to the new location.

What I want is: An instance should only move once. Once it is placed/overlapped on a "spawn point", it should not get affected when I click on a second "spawn point" for a new instance of the animation.

Please help.
Thanks.
B
5
S
1
Posts: 38
Reputation: 839

Post » Mon Oct 07, 2013 10:20 am

I don't know how you have your events set up, but add a variable to the object. Once moved change the variable and add a condition to the moving so the sprite can only be moved if the variable isn't changed.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Oct 07, 2013 10:47 am

Amazing!! Added a boolean to the object, and added a condition that, if the boolean is false, move the object, else not to move. Thanks!
B
5
S
1
Posts: 38
Reputation: 839

Post » Mon Oct 07, 2013 10:59 am

If you get into more trouble with instances be sure to read the topics about Picking/selecting instance(s) in the FAQ
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Laura_D, rayolf and 25 guests