[Solved]How do I do "or" event?

Get help using Construct 2

Post » Sun Apr 26, 2015 8:07 pm

Ok, i know this is little stupid, but i need to have keyboard support for my game to test it. So i wanna do event where you "press left button on screen" or you "press left key on keyboard" and either one of those is down, you go left. I do not wanna copy paste all events and create new booleans etc. for only test purposes so is there fast way to do that?
Last edited by sorbias on Wed Apr 29, 2015 8:02 am, edited 1 time in total.
B
11
S
1
Posts: 63
Reputation: 658

Post » Sun Apr 26, 2015 8:14 pm

Add the conditions you want to check to the same event -- so your corresponding touch and keyboard events, for example -- then right click the event and click "Make 'Or' block". This places an "or" between each condition in the event.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,126

Post » Mon Apr 27, 2015 8:41 pm

Thanks for that hint, it makes everything easier! But now I have 3 conditions in that same event and I want to have only 2 of them have that "or" feature. How should I do that?
B
11
S
1
Posts: 63
Reputation: 658

Post » Mon Apr 27, 2015 10:00 pm

it's hard to correctly answer without seeing your events. since we can only guess most likely your new issue can be fixed with a subevent

learn about it here
https://www.scirra.com/manual/128/sub-events
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Wed Apr 29, 2015 7:17 am

Okay, now I'll try to explain this better way.

This is another similar situation, but not exactly the same as I said in my first message:
Image

When an object falls to object that is in the Family named PhysicsObjects, I want it to create a particle cloud. There are two examples of those clouds: "Dust" and "MusicParticles".
The event works perfectly in a situation when an object falls to any object in the Family except when the situation is like "piano is falling on piano". That event cannot somehow understand that it can itself also be part of that family... In that case the particles never appeared until some different object falls to that piano.

The last event in that picture is my try to create it for the piano with sub event, but it did not work either and I do not know why.

BTW: Volkiller730, thx for helping with the subgroup. I installed your cave game and its very similar as this game I am trying to do. :)
B
11
S
1
Posts: 63
Reputation: 658

Post » Wed Apr 29, 2015 7:49 am

Wait a minute, i found that i has done some "bug" into that sub event. I have done it like "piano is overlapping piano" and it should be like "Piano is on collision with Piano" but now i see that it cannot be done here, because it wont allow me to do collision check to the sub group there. What should i do with it?

Edit: now it worked, i have picture here about how i did it:

Image
B
11
S
1
Posts: 63
Reputation: 658


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 27 guests