Switch to push UIDs to array

Get help using Construct 2

Post » Wed Nov 19, 2014 9:15 pm

Hi,
I have a switch case type of setup where I check a variable in my landing pods upon hitting the ground and depending on the variable make them spawn a different unit. In that event I also push the spawned unit's UID to an array to keep track of my spawned units.
Now when I have two pods with the same variable the Array>Push front command does not seem to enter a vaild UID, I only get a 0 for that second UID.

LandingPod_SpawnSwitch.PNG


Is this an issue of the array command? Or is retreiveing multiple UIDs in one tick somehow problematic?
Kinda clueless
You do not have the required permissions to view the files attached to this post.
B
13
S
6
Posts: 222
Reputation: 1,859

Post » Wed Nov 19, 2014 9:47 pm

You got it right. Retrieving multiple UIDs in the Array's "action context" is impossible. You simply have to add a "for each LandingPod" under the "spawnType = 0" condition.
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Wed Nov 19, 2014 10:00 pm

Perfect, working now.
Thanks!
B
13
S
6
Posts: 222
Reputation: 1,859


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests