tlbainter's Recent Forum Activity

  • Works like a charm! Thank you so much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey folks,

    So I have a quick question. I've scoured the forums and I'm starting to wonder if what I want to do is even possible. Here is, essentially, what I want to happen:

    Object "ELIZ" sets its frame to a random frame out of 20 [ random(0, 20) ]. However, I don't want it to set the frame to its current frame at any time. SO, I have created an instance variable called "frame".

    What I want the code to look like is, basically:

    Set frame to a random frame between 0 and 20, but NOT equal to the current frame.

    I can't find a way to do this, however. I'm open to workarounds, of course, but there doesn't seem to be one that I can find. Any help would be much appreciated! Been stumped on this bit for a while, now.

    Thanks!

  • Hey Aphrodite -

    Yeah, I've figured that that'll be the easiest way to go right now. Thanks

  • Hey there,

    So I'm not sure if I'm overlooking a feature, but I haven't been able to find information on a way to perform a check to see if a variable has been decreased or increased in-game. Essentially, I'm trying to simplify health-decrease events. Right now, when my player is injured, the following actions are performed:

    ] Subtract 1 from PlayerHP [Global Variable]

    ] Player flashes for 0.6 seconds

    ] Play sound

    The issue I'm having is really one of time and bulky coding [I do my best to keep everything as concise and easily-changed as possible]. Having to add the flashing and sounds is tedious, and if I ever want to add other effects to the player's injury (I intend to add different animations and random sounds later on), I will have to go back through each instance of the player's reactions and add the new effects.

    In essence, I'm trying to figure out if there's a way to create a single event which reacts to a decrease in the player's health (any number subtracted from the global variable PlayerHP). That way, I only have to add the ]Subtract 1 from PlayerHP action to the injury events, and all of the player-based reactions can be kept concisely in one, easily-altered event.

    If you have any ideas or if I'm overlooking an obvious feature, let me know! Thanks.

  • Ah, thanks. I was hoping there was a way around doing that. That's what I've been using for a while, but wanted to see if I could condense it with a couple of expressions. Thanks for your help!

  • Hello,

    I've spent a bit of time searching Google and these forums for help with this issue, but haven't had much luck. Hopefully someone on here can help me. I'm having a bit of trouble creating a condition which requires an animation from be equal to any one number from a list.

    Essentially, if the AnimationFrame is equal to any one of these numbers (0, 4, 8, 12, 16, or 20), then the event will occur. However, I can't seem to find the right expression or method for executing something like that. It doesn't seem like 'choose' or 'random' would work, because then the event wouldn't occur in every instance. I need something that would basically look like:

    AnimationFrame = any(0, 4, 8, 12, 16, 20)

    Any help you can offer would be appreciated. Feels like I'm missing something blatantly obvious, here.

tlbainter's avatar

tlbainter

Member since 6 Feb, 2014

None one is following tlbainter yet!

Connect with tlbainter

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies