Acquire target not working beyond 250(ish) pixles

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello,

    I'm currently working from the "Template: Real Time Strategy (RTS)" template.

    I've modified the standard Event sheet to;

    * prevent Friendly and Enemy units from attacking each other (disabled both actions in event 2),

    * I've made it so that my (selected) Friendly units will only attack Enemy units I click on by using the "acquire target" action (see block 34 and 35 under Combat group).

    My problem: When I select an Enemy unit and my currently selected Friendly unit is more than around 250px from the Enemy, my Friendly just moves to the location but doesn't attack. If the Friendly is closer than 250px it will engage and attack.

    I can't find anything on the Event Sheet that would be causing this. Note: I'm a total newb.

    capx

    I've searched the FAQ's but nothing really helped me.

    Any help appreciated.

    /Jamie

  • Probably need to look at range in your turret behaviour. Set at 300 at the moment...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably need to look at range in your turret behaviour. Set at 300 at the moment...

    Thanks again RamPackWobble.

    When I increase the range this resolves the issue, thank you. However, the Friendly start shooting while it's way too far from the Enemy who is out of actual range for damage.

    I think I might try to detect when I'm close to the enemy before I begin attacking.

    Thanks again for your help, this was really useful

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