HamSandWitch's Forum Posts

  • 8 posts
  • http://www.blackhornettechnologies.com/Construct3Stuff/Samples/Timer_HamSandWitch.zip

    You beauty.

    Thank you, this makes a lot more sense than how I was doing it and is much simpler. I didn't know about "on timer" so it didn't occur to me to try using it this way. Stop timers should also come in handy at some point. This should get me a lot farther with my project!

  • Yes, that's it.

    After playing around a bit, it seems like the best way to do this would be to create a series of conditions in the function that evaluate the current time of a timer with a tag and then only execute a certain action at a certain time. That way I could stop the timer and actions would stop executing. Is that how you meant for me to do it?

  • Look at the Timer behaviour.

    Okay, I took a look at it in the doc and I guess it works differently than I would have assumed. I get what you were suggesting now I think. I'm assuming you mean for me to replace wait with timer actions instead and use that to space out AI actions.

  • Can you elaborate more on what you mean? I'd like to stop any specific action but I don't see any way to do so.

  • I'm trying to create an AI for this project. Essentially I have a condition set: if A is true, we will randomly select a few different actions. If B is true, all actions in the prior condition should stop immediately with preference for B. Any actions in A's side will continue to run until finished however and I need an efficient way to end that.

    While we're on the subject, is there maybe something I'm missing about programming games like this? I'm winging it here, but I wonder if there's some fundamental concepts I don't have.

    In this example, every... frame, I guess... This condition on the bottom is tested. In all other cases, switchVar 1 or 2 will end up being called. If the bottom condition, kneeHealth <= 0 becomes true however, this does not result in the above actions being canceled. They occur concurrently. How do I stop that from happening?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh. Well that sucks, lol. I guess it just means I'm coding something wrong because that's what I tried the first time and I got bizarre results. Maybe I need to play around with it more and make sure I'm not making some kind of dumb mistake.

  • Perhaps you could do it like this:

    On function weakPunch

    - trigger once

    ---Tyke X is block: blah

    ---Other action that happens at the same time: blah

    that's what I'm trying to do, but it seems like unless there's a condition in place, Construct doesn't pay any mind to it. If I simply place an empty condition on the same indent as the sub-condition, will it evaluate the sub-condition and then just execute the next section of code regardless?

  • Construct 3 doesn't seem to let you add in actions after a condition is placed. I'd like a condition to be activated during a set of actions and then continue on with the actions regardless of the outcome. Is this possible without some kind of workaround?

    I've been trying to find a way to get this action to just work after the secondary condition. I may have some kind of error in my code but is this a supported feature or is my logic bad?

  • 8 posts