Can you give one event priority over another?

Just started using Construct 2? Post your questions here

Post » Thu Jul 09, 2015 9:14 am

file:///C:/Users/Arvin/Music/0000000000000000.png


Here i have two events. I hope you can follow the link to the image for better understanding. If you can't tell me how to insert a image in post image in a post like this. I hope you still can understand my question whitout the image though. I want the upper event to have priority over the lower one. The first event makes the the main character take damage when it collides whit the enemy when it changes frame. The second event makes the main character desroy the enemy if it jumps on top of it otherwise it takes damage. I want the enemy to damage the main character on collison from all angles when it changes frame. When it doesn't changes frame you should be able to jump on it and destroy it. The enemy damages the player from the side no matter what. The problem is that not how it turns out. When the enemy doesn't change frame you an jump on it and destroy it as intended. But you can also jump on it and destroy it when it changes frame whitout taking damage. To me it seems like the lower event takes priority over the first since it replace the main character being damaged whit the main character killing the enemy. I want the upper event to have priority so the enemy only can be jumped on and killed when the upper event doesn't happen. Can anyone give me solution to this? If i wasn't clear enough please tell me.
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Thu Jul 09, 2015 11:36 am

I'm pretty sure I don't have the picture you want to share on MY C-drive (Also I don't have an Arvin as a user on my computer), so that link will not work..

Making events like these is a question of adding the right conditions, so only one of the events is true at the same time..

The way you describe it I guess you could make a top-event on collision, add a subevent for when the collision is from the top, add an else event and maybe a second else event with conditions to get the actions you want when not colliding from the top.. (one for the frame changed and one for the frame unchanged, I guess)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests