How do I fix this Trigger once with family problem?

0 favourites
  • 8 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • As the picture show, I can't make this condition work when I change b back from "true" to "false", value a still be "true", it should be updated to false too. Are there any conflicts between each family instance? or add-on I installed?

    I remember this simple condition used to be worked normally without any problem.

    It works when I remove trigger once condition, but I have to use it for my attack function.

  • It's hard to know exactly what you are doing with you code being labeled all incognito style, but....

    Replace Trigger once with your own form of stopping it from repeating. I did it here with a 3s CD before You can switch b, but you can switch other instances of either sprite in your family while it's waiting

  • my bad, here is my full code. Mainly, I want my enemy to start an "attack" countdown timmer once it found the player in range and "peaceful" once it's not found a player. This function is not work in a red circle.

    winstreak

    I feel like it's not working with others instances in the same family, It works normally for the first one only but not for the second one. alextro

  • Thank you guys so much, I've solved this now. I use my enemy "foundTarget" bool to let it specify exactly what instance I mean to see and not see a player.

  • Have you incorporated 'for each'? Just to make sure the condition applied for every instance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes I have, I can toggle it only at the start, but once, it not update var a to true again.

  • Never ever use "Trigger Once" when dealing with objects/families that have multiple instances!

    To make sure that the event doesn't repeat for instances that are already attacking you can add another condition - Timer "attack" is not running.

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