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

Get help using Construct 2

Post » Thu Jul 24, 2014 9:40 pm

[b][/b]

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
B
4
S
1
Posts: 54
Reputation: 456

Post » Thu Jul 24, 2014 9:44 pm

Unfortunately time travel is a tricky problem to solve.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,464

Post » Thu Jul 24, 2014 10:07 pm

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.
B
40
S
8
G
6
Posts: 61
Reputation: 5,951

Post » Thu Jul 24, 2014 10:36 pm

Ashley wrote: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.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Jul 24, 2014 10:53 pm

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
B
4
S
1
Posts: 54
Reputation: 456

Post » Thu Jul 24, 2014 11:07 pm

spades1412 wrote: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.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 11:11 pm

spades1412 wrote:[b][/b]

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 :?:
Last edited by codah on Thu Jul 24, 2014 11:13 pm, edited 1 time in total.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Jul 24, 2014 11:13 pm

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.
B
72
S
25
G
9
Posts: 383
Reputation: 10,661

Post » Thu Jul 24, 2014 11:29 pm

I made an example, to show what i mean. If i get you right, that's what you need.
You do not have the required permissions to view the files attached to this post.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543


Return to How do I....?

Who is online

Users browsing this forum: jasontoups, OddConfection and 1 guest