How do I select which instance to trigger action from?

0 favourites
  • 5 posts
From the Asset Store
Game Triggers is as versatile as a Swiss army knife, and will be a great resource for any type of game you're creating.
  • 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

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

  • Try Construct 3

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

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