lionz's Forum Posts

  • I don't think you can stop the event in the middle like that. Better to restructure your events to suit what you want. Like I first mentioned a long string of events attached to a trigger once is not great anyway.

  • So as above should work, on the event that has a trigger once you add another condition for some variable to = 0, then when the boss health drops to 0 you set that variable to 1, means it won't run that logic again.

  • Again I don't know what event you mean. If you want to stop something from happening when health drops to 0 then make an event to change a different global variable from 0 to 1 if health drops to 0. Then the events you don't want to run if this happens you can add the condition that the variable is 0 because when it changes to 1 it'll never run. So that locks out those event for the rest of the game if that's what you want.

  • Stop which one? It's a bit confusing. The one event that might need a trigger once doesn't have it, for the boss health. What problem are you having or where is it?

  • Nope, don't think of it as trigger once forever, it's trigger once 'at the time' or when true/triggered. If your boss HP goes back to 500 and again drops to 0 then that event would trigger again, but once.

  • A trigger once on its own doesn't mean too much, you should add it to the triggering event to turn it into a trigger once, such as the enemy's hp dropping to 0.

  • When you click on the instance to pick it then all instances are narrowed to just that 1, so you should first store the UID of the one you picked as an action probably in a local variable.

    Then in a sub event of the click event, open up the instances again by using Pick all instances, then you can set the new animation on all instances. For the one you clicked earlier you can then pick instance by UID and set the correct animation since it would've just changed with the pick all.

    You could also set a variable to a different value on the one that was picked, you just need a way of differentiating it from the other instances.

  • There's no such thing as teleporting it, when you join a new layout everything is created again yeah. How you recreate the sprite depends on what you are trying to do. If you make it global then it's going to be in every layout, probably that is not what you want. You could do on start of layout and create object by name, having stored the name of the object in a global variable in the previous layout.

  • Possibly the classic event sheet issue, each layout has an event sheet linked to it. If that event sheet is not assigned to the layout then it doesn't see the event. Look in the layout properties bar for the layout that has the player in it and see if has the event sheet linked.

  • Fair enough, it was a Construct thing that you had to wait until the next tick until a created instance can be picked but if this works then all good!

  • Pick last created used inside the loop? That shouldn't really work hmm. Or if you used it outside of the loop how did you link it to the array values?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is variable name the name of the object type? I assume so if you are creating object by name array.value. And if so, do you really need it?

    edit : oops I realised you are setting more than just this variable. You could set two global variables to curx and cury inside the loop and then using the 'Family on created' event assign using the global variable values instead of curx/cury, this may work.

  • You can use a global variable to lock out the attack, so have a condition with the key press 'variable=0', and on the action set variable to 1 then 'Wait' then set variable to 0.

  • I think it's a checkbox on the behaviour called Test Mode?