Getting units to stop moving until enemy disappear

0 favourites
  • 3 posts
From the Asset Store
SCI-FI Units SFX contains 456 sounds With this pack, you can voice almost all the units in your sci-fi strategy game
  • Right now, I am attempting to get the units to stop moving and enter attack phase. When there are no units, the unit moves on.

    capx file

    https://www.dropbox.com/s/svamvor1vcorfqx/sftahg_0_4_2_1.capx

    For that to work, I had to give each unit its unique aiming range as part of the container.

    I also check to see not only that the aiming sprite collides with the unit, the player values shall not be the same.

    I have noticed a difference between on collision and overlapping. When i replaced on collision with is overlapping, the unit stop behavior does not work. when I did keep on collision, the stop unit movement works.

    Now I want to know how I can get the unit to stop moving until there is no enemy unit on sight?

  • use the line of sight behavior and invert it or add an else to it so that you can react to not having line of site with the enemy?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • use the line of sight behavior and invert it or add an else to it so that you can react to not having line of site with the enemy?

    I have tried that but it has no success.

    I will give you details and the evidence;

    download link

    https://www.dropbox.com/s/umq2img1lxgn5hj/sftahg_0_4_2_2.capx

    image:

    Each unit is a container with its aim line. The aim line has its line fo sight as the previous poster suggested.

    I am still checking the condition that the unit is on the line of sight and the value of player for the target unit is NOT EQUAL to the aim line from the unit.

    units1_grunt and unit1_aim as container object

    when running the game, neither of those conditions worked.

    Any other way to help out or improve existing behavior

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