multiple creation actions in 1 event

For questions about using Classic.

Post » Sat Jan 24, 2009 9:09 am

At the moment i'm using fastloops to create multiple instances of an object at the same time and giving them a unique id and values, but i also tried doing,

my conditions > create object
set object variable id to 1
create object
set object variable id to 2
create object
set object variable id to 3

all in the same event, but it didnt work. Should it work?

I'm really just wondering, as my fastloop method works fine.

Thanks.
B
43
S
22
G
20
Posts: 735
Reputation: 11,977

Post » Sat Jan 24, 2009 2:12 pm

When you create two objects in the same event, both are picked, so a 'set private variable' action will modify both of them, not just the last created one.

Try creating them in separate iterations, eg:

+ For "i" from 1 to 3
-> Create object
-> Set variable to loopindex
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,572

Post » Sat Jan 24, 2009 2:55 pm

Thanks, that reduced and simplified my events somewhat.

Have to get out of the mmf way of thinking.
B
43
S
22
G
20
Posts: 735
Reputation: 11,977


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest