how to make event on apply to affected object instead of every object of that type

0 favourites
  • 6 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • so this is my starting event

    and then i have these two events to change the states of units based on proximity

    however when this event triggers, it sets the state for every "Adventurer" object instead of just the one that is within distance

    is there any way to make it so the event only applies to objects that trigger the event instead of every single object of that type?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try another system condition 'Pick by comparison'. This should work:

  • Try another system condition 'Pick by comparison'. This should work:

    that did not seem to work for me

  • And what exactly happens? Because in my example it works fine:

    1drv.ms/u/s!Ap_-qxoGKbDcg2d6Nk732mQwvDXy

  • so this is my starting event

    and then i have these two events to change the states of units based on proximity

    however when this event triggers, it sets the state for every "Adventurer" object instead of just the one that is within distance

    is there any way to make it so the event only applies to objects that trigger the event instead of every single object of that type?

    The two events to change the states of units based on proximity can be true at the same time when is less than 60, in the event that you check (dist 500) you should add another condition that checks distance is greater than 60 and lower than 500, alternative you can use the system >>> (is between values) & PrePick The Objects On the conditions

    Here is an example

    https://www.dropbox.com/s/z5opdrs1u6w69y8/PickByDist1.png?dl=0

  • > so this is my starting event

    >

    > and then i have these two events to change the states of units based on proximity

    >

    > however when this event triggers, it sets the state for every "Adventurer" object instead of just the one that is within distance

    >

    > is there any way to make it so the event only applies to objects that trigger the event instead of every single object of that type?

    The two events to change the states of units based on proximity can be true at the same time when is less than 60, in the event that you check (dist 500) you should add another condition that checks distance is greater than 60 and lower than 500, alternative you can use the system >>> (is between values) & PrePick The Objects On the conditions

    Here is an example

    https://www.dropbox.com/s/z5opdrs1u6w69y8/PickByDist1.png?dl=0

    And what exactly happens? Because in my example it works fine:

    https://1drv.ms/u/s!Ap_-qxoGKbDcg2d6Nk732mQwvDXy

    Seems like the problem was i needed to do both of these things! fixed now!

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