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
15
S
7
Posts: 243
Reputation: 2,058

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
75
S
31
G
27
Posts: 1,014
Reputation: 20,763

Post » Wed Nov 19, 2014 10:00 pm

Perfect, working now.
Thanks!
B
15
S
7
Posts: 243
Reputation: 2,058


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests