alexsvilla's Recent Forum Activity

  • What lionz has said is correct, you need some way to check the condition of your object .

    There are a ton of ways to do it, including using animations and many other things.

    What I like to do personally is create a string instance variable on my sprite that uses a word to state what my sprite is doing. "Moving" "Attack_Big" "Attack_Small" "Attack_Dashing" "Cooldown" and so on.

    So when my timers or animations go off, I can trigger things like "When Animation 'ANIM_ATK_BIG' is finished, set instance variable Boss Status to 'Cooldown Big Attack', Set animation to 'ANIM_COOLDOWN_BIG', start timer for 2 seconds with tag 'Cooldown' "

    I understand that it might not be the prettiest code and that I might be overdoing it but it works with my brain and it lets me see my boss' current status in the debug menu. That way, when something inevitably doesn't work, I can see where my code is getting stuck.

    "Oh, my boss keeps dash attacking infinitely, I can see it appears to be stuck in "Attack Dash" forever so let me do some tricks and see why it's not triggering the right way."

  • No worries, everyone starts somewhere.

  • Also, can you use debug mode and see if the Player is perhaps spawning incorrectly elsewhere?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know it may not be exactly what you're looking for but in situations like this I usually try to force the result by creating something like

    "on key backspace pressed" -> spawn actions.

    That way you can check and see if your character spawns the way you think they're supposed to spawn, and if they don't, you can glean a little insight into where the code is wrong. I'll keep peeking here, though.

  • Oh, I see.

    Let me clarify, you want your player to start standing on a sprite with the solid behavior, yes? Then the player jumps from that platform to start the game?

  • Though that might result in situations where your event triggers on undesired combinations.... hmmm.

    I think maybe then using an "And" event with the specific combination that calls a function to do what you want is what you'd do here.

  • It sounds like you want to use an event with "OR" with a sub-event that is also an "OR".

    So all events are, by default, AND events. If you right click (or two finger tap on a touchpad) on the event's conditions, you can see a button that lets you "Make OR block". This changes that particular event from AND to OR as long as you have multiple conditions in it.

    Then you can right click/two finger tap again and "Add sub-event". This event will only trigger once one of your original OR conditions is true and everything in the top level event has run. So you make this sub event another OR block and then run your code in the sub event.

    Is this what you meant?

  • I'd imagine you could have a Boolean that starts as false, let's call it FallThrough. On your code that makes the player fall and lose, FallThrough has to be true in order to fall and lose. That way, when the game starts, they don't immediately fall and lose.

    When your player first presses the up arrow and FallThrough is false, set FallThrough to true.

    If you use a global variable, make sure you reset FallThrough to false when the player clicks restart.

alexsvilla's avatar

alexsvilla

Member since 9 Dec, 2022

None one is following alexsvilla yet!

Trophy Case

  • 1-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

3/44
How to earn trophies