Some conditions can't be used in one event?

Discussion and feedback on Construct 2

Post » Wed Apr 10, 2013 2:41 pm

An event with two triggers in it is a bit like an event saying "On the exact moment lightning strikes, AND the exact moment the clock reaches midnight". They will effectively never happen at the same time. It's not a perfect analogy though - in Construct 2 triggers always fire one at a time, so rather than being highly unlikely, it's actually impossible that any such event could ever run.

You most likely just want to have this instead:

+ On collision
+ Z key is down (not 'on pressed', the 'is key down')

or this:

+ On Z key pressed
+ Sprite is overlapping (not 'on collision', the 'is overlapping')
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Wed Apr 10, 2013 3:03 pm

Thank you, everybody!
One last question: What's the difference between is overlapping and on collision? If you don't have anything else to do, huh.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,362

Post » Wed Apr 10, 2013 3:17 pm

On Collide is an "Event" means as soon as this happens do it once.
Is Overlaping is just a if(question) means Every tick if "is overlapping" do it.

The difference is just the first one is a Call and the other one is just a Question :D

In your situation:
->On key Press Z
->Is overlapping

means:

On key Press Z and if Sprite is overlaping trigger the event
Darklinki2013-04-10 15:18:01
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Wed Apr 10, 2013 3:21 pm

Just to add on to what Darklinki said. Think of the "on collision" as the very first tick that the two sprites are overlapping.
B
44
S
13
G
7
Posts: 338
Reputation: 10,379

Post » Wed Apr 10, 2013 3:29 pm

Oh, that's it? Nice.
What's your native language?
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,362

Post » Wed Apr 10, 2013 3:35 pm

German :D
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Wed Apr 10, 2013 8:30 pm

[QUOTE=fassFlash] I am making a dog simulation game. I had a lot of info about the problem written, but my computer turned off and all I wrote wasn't saved. So shortly:Why can't I use the "on collision with another object" and the "Keyboard: On Z pressed" conditions on the same event?[/QUOTE]

@fassFlash, because they are all triggers, you can't trigger something while is checking another trigger, or the player would play them at the same exactly, I said exactly, not simultaneous, time, what is very improbably, because the engine run at a ultra high speed comparing with Our hands.

That make sense for you?

Instead of using two trigger, use one check condition and one trigger, like:

Keyboard: Key Z "IS DOWN" and them check the trigger condition, "ON" collision with another object.TELLES08082013-04-10 20:33:43
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,190
Reputation: 18,272

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Google [Bot], mystazsea and 14 guests