How do I add multiple Different Turret Targets?

0 favourites
  • 5 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hi,

    for a proper multiplayer RTSgame the same kind of family units created by different players should be set as turret targets for each one of the opponents units.

    Do I need to add the adverse units in specific Player or Unit Families/Containers to get this working?

    Or anyone knows a workaround for that?

    There is no option to select instances inside "Add turret target".

    Thank you very much!

  • Instead of "Add target" you need to use use "Acquire target" and "Has target" events.

    Check if the turret doesn't have targets, then pick enemy instances and acquire them as targets.

  • This freakin works excellent.

    But isnt it cpu expensive to check if a unit has a target each frame?

    I am thinking about a solution for - every created unit - add object to target in a function.

    What do you think?

  • Shouldn't be a problem unless you have lots of events like this.

    You can do this on Timer event every 0.5 seconds or so.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The unit amount should be max about 500 on the layout.

    Checking this each unit created or 0.5 seconds bugs.

    Seems like the base IF of c2 is fastest in this case.

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