2 sprites of same family collide smaller one destroyed

Get help using Construct 2

Post » Fri Oct 07, 2016 8:06 pm

Okay, I've searched around and am really struggling with this game. I am making a game where you are a caveman and you can ride a smaller dinosaur. The dinosaur can eat eggs to get bigger, then can eat other dinosaurs if it's bigger than them.

I want the other dinosaur drones to be able to eat each other too. How can I have 2 dinosaurs of the same family collide, then the smaller one gets eaten, and the bigger one gets a little bigger? Is this possible, or do I need to do it all individually and write a eating script for each individual dinosaur?

Thanks for any help you can give.
B
16
S
9
G
4
Posts: 20
Reputation: 3,564

Post » Fri Oct 07, 2016 8:32 pm

Which part are you struggling on?

I'm not 100% sure of details about objects/families colliding with one of their own but have seen several tutorials/threads on it.... here is one

Once you get the 'picking' sorted out it should be straightforward, right?
ImageImageImage
B
43
S
26
G
11
Posts: 516
Reputation: 10,473

Post » Fri Oct 07, 2016 8:43 pm

Give them family instance variables where 1 is small, 2 is bigger, 3 is biggest or something. When they collide compare the variables, whichever is bigger destroys the other one.
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests