special condition - 1 sec before a make b (help me pls)

0 favourites
  • 9 posts
From the Asset Store
A collection of various soldier character sprites for creating a 2D platformer or sidescroller game
  • i would like to know how do i make a condition that says: 1 second before a make b happen, as u may imagine i only need help for the first part of the condition (1 second before a)

    please help me, this is crucial for many actions in my game

    -thanks

  • Unfortunately time travel is a tricky problem to solve.

  • If you think about it, no time travel is needed.

    If I understand your question correctly, what you should do is make a condition in which both A and B happen, and then check for B, wait 1 second, and then check for A.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Unfortunately time travel is a tricky problem to solve.

    I'm sure you're up for it. Seriously though I think a 'game-time manipulation' plugin would be possible For those nifty time reversal/replay games. Then you could run your game a few seconds ahead 'offscreen' and that would allow the OP's needs. Or perhaps I have not consumed enough coffee.

  • well... let me elaborate, i basically have a bullet\projectile that goes towards my character.

    what im trying to achieve is a similar effect to what happens in jetpack joyride when the missile goes towards the character, which is letting the player know from where the missile comes about 1 second before it does and for that i need a condition\event that says: "1 second before the missile appears on the layout "....

    -if u have any tip let me know

    • thanks
  • well... let me elaborate, i basically have a bullet\projectile that goes towards my character.

    what im trying to achieve is a similar effect to what happens in jetpack joyride when the missile goes towards the character, which is letting the player know from where the missile comes about 1 second before it does and for that i need a condition\event that says: "1 second before the missile appears on the layout "....

    -if u have any tip let me know

    - thanks

    Well, in that case you can just create a timer with 1 or how many seconds you want, then add event On timer > create bullet towards player, and add text or anything else to show to player how much time he had before timer will trigger and create a bullet.

  • i would like to know how do i make a condition that says: 1 second before a make b happen, as u may imagine i only need help for the first part of the condition (1 second before a)

    please help me, this is crucial for many actions in my game

    -thanks

    1. Decide where your bullet is going to come from

    2. Display warning to player

    3. X seconds later, fire bullet

    Is that what you want?

    Note: This is if the player gets warning before the bullet appears; if the bullet has already been fired, then just do a distance check from bullet to player

  • instead of saying "1 second before the missile appears on the layout ", what you should be asking is "1 second after the thing that shows me where the missile is coming from...".

    Edit: just like codah said.

  • I made an example, to show what i mean. If i get you right, that's what you need.

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