[Solved] Probably a noob question

This forum is currently in read-only mode.
  • Hey guys,

    First I'd like to thank the community for having such a great forum. Many questions I had were answered with a simple search. However, something has come up to which I can't find the solution. It's probably some noob mistake, but I just can't get this to work! It goes like this:

    I have a little maze with spawning objects which randomly creates an enemy when the layout is loaded. This enemy has LOS and Bullet behavior; their invisible and immobile until the player enters their LOS. The event goes:

    "Enemy" has LOS to "Player" - "Enemy" activate bullet behavior (it's deactivated at the start of layout)

    To simplify things, I've set the enemy to always face the player, since their invisible until coming into LOS:

    Always - "Enemy" set angle towards "Player"

    For testing I set the Enemy to be visible from start. However, everytime the player comes into the enemie's LOS, all instances of Enemy move, even the ones without LOS. LOS is set to 1px precision, and 100px range. Bullet to 25px speed, never destroy.

    What's wrong here? How do I get only the instance in LOS to have bullet behavior activated?

    If needed, I'll post the cap.

    Thanks in advance

    Pedro

  • What you are doing sounds right, so it might help if you posted a simple .cap showing the problem. It sounds like somehow you are picking the group instead of the individual object. Maybe someone better than I can solve this without the .cap

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I managed to solve the question by removing the bullet behavior action and replacing it was a PV:

    Has LOS - Set PV to 1

    If PV=1 - Activate Bullet Behavior

    the work around worked nicely, but I'd still like to know why the first way didn't work, if anyone knows.

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