0 Favourites

"Pick All" in Sub-Events

  • 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!

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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).

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)