How do I select which instance to trigger action from?

0 favourites
  • 5 posts
From the Asset Store
A set of retro 16-Bit Neon UI elements to make your menus pop!
  • Hello,

    I am trying to make a bot deathmatch.

    I want to be able to use as many bots as I want and have them interact and follow the same AI behaviors.

    So far I get the bots to chose a random location via pathfinding and if a bot is in LOS he is tinted in red (for debug).

    My problem is the following : how to I tell construct which is which? At the moment the bot that is seen is the bot that shoots a laser. I can't seem to find how to tell construct that I want the bot that has the LOS to another bot to trigger the spawn laser action.

    Is there something simple I am overlooking?

    Many thanks, caps enclosed.

    JMF

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Look into using a bots Family

  • Yes, except that Family do not have a LOS condition for instance. So for my particular example I'm not sure it can be used. There does not seem to be a way to do this but create as many different sprites of bots that I want and code the specific events for each of then:

    If bot1 has LOS to bot2...

    If bot1 has LOS to bot 3...

    if bot2 has LOS to bot1...

    if bot2 has LOS to bot3...

    etc.

    Doesn't seem very code effective to do it that way.

    But thanks for your help, I will keep searching.

  • You can put LOS on a Family.

  • Yes, except that Family do not have a LOS condition for instance. So for my particular example I'm not sure it can be used. There does not seem to be a way to do this but create as many different sprites of bots that I want and code the specific events for each of then:

    If bot1 has LOS to bot2...

    If bot1 has LOS to bot 3...

    if bot2 has LOS to bot1...

    if bot2 has LOS to bot3...

    etc.

    Doesn't seem very code effective to do it that way.

    But thanks for your help, I will keep searching.

    ok good luck

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