Run instances independently

Get help using Construct 2

Post » Sun Jan 22, 2012 10:34 pm

Hello, need some help.

Is ftm trying to make a platformer with a special kind of twist on how it shows the world. What i want to achieve is that as the character moves forward on the map, the animations of the objects at a certain distance in front of him should run.

I am mainly having trouble with getting instances of the same object type run independently; as it is now, when the character approaches the first object, all the instances on the layout of that object run their animation, not only the closest one.

Any help to make them run independently, without me having to create a hundred millions sprites would be welcome! =)
B
4
G
1
Posts: 3
Reputation: 856

Post » Sun Jan 22, 2012 10:42 pm

Have a instance variable called ID or something, And make that instance run. Or get the instance withing the closest distance ect.
B
6
S
1
G
1
Posts: 42
Reputation: 810

Post » Sun Jan 22, 2012 10:55 pm

Sorry, I don't understand what how you mean I should do it, care to explain a bit more?

Sorry, I'm just starting with Construct.
B
4
G
1
Posts: 3
Reputation: 856

Post » Sun Jan 22, 2012 11:03 pm

Events fundamentally work by picking individual instances to work on. See How Events Work. If all instances act the same, you must have your events set up wrong - maybe share your .capx file on Dropbox so we can take a look?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun Jan 22, 2012 11:07 pm

Ah, I think I got it to work, thanks to DiggyDog. Had problems with getting the "change within x distance of character" to work, but it seems like I just had to change which sprite that did the "compare X" check.

Thanks anyway =)
B
4
G
1
Posts: 3
Reputation: 856


Return to How do I....?

Who is online

Users browsing this forum: Radulepy, Yahoo [Bot] and 6 guests