"Pick All" in Sub-Events

Get help using Construct 2

Post » Tue Jan 28, 2014 7:25 pm

Wanting to be clear on the use of Pick All...
If I use Pick All in a sub-event, will that continue to pick all instances of that object for the rest of that event line and successive events? That is, if a brand new event line that is of a higher level comes up, then it "resets" the instances being select...correct?

Example:
Event line | Action
- Sub-event Pick All | Action

New Event line...

In the sub-event, obviously the Pick-All will pick all of the object instances. By the New Event line, will the instances become reset to "when each instance is true" since it's a higher level of events? Or do all instances remain picked even though that was within a sub-event?

Thanks for helping me be clear on this!Rhindon2014-01-28 19:27:45
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
135
S
22
G
8
Posts: 770
Reputation: 14,689

Post » Tue Jan 28, 2014 7:42 pm

Example with total 10 sprites, "-" means sub level:

if sprite is visible - at base events, all sprites are selected. Condition results in 5 sprites selected
- if sprite.var=1 - 3 sprites selected
- - pick all sprite - 10 sprites selected
- - - global var=1 - 10 sprites still selected
- if global var=2 - 5 sprites selected from event 1
If global var=3 - new base event, all 10 sprites selected again

C2 keeps the picking from the event of the previous sub level, not the event above on the same sub level (events 2, 3 and 4 have no effect on event 5's picked instances, only event 1 affects it).Arima2014-01-28 19:44:39
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,744

Post » Tue Jan 28, 2014 8:16 pm

@Armia - Thank you. :)

What I'm trying to do is create enemies that will rotate towards the player when in range (distance( )). When the LOS behavior becomes true on top of that, then I want the OTHER instances of that enemy to rotate towards the player, as well, even if the player is not within range of the other enemies. In short, it'll be like, "I see the player! Everyone home in on him!"

The trick is getting the OTHER instances to still react as individuals when the conditions call for it.
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
135
S
22
G
8
Posts: 770
Reputation: 14,689


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests