How do I compare collision with a color?

Get help using Construct 2

Post » Mon Feb 29, 2016 2:45 pm

I don't know if this is stupid idea, but is there any way to detect with which color player has collided?
B
5
Posts: 7
Reputation: 245

Post » Mon Feb 29, 2016 3:01 pm

instance sprite variable color (eg sprite.color="red")

condition
sprite2 on collision with sprite
sprite.color="red"
then your action
else sprite.color="green" then your other action
Image Image
B
22
S
13
G
130
Posts: 869
Reputation: 67,816

Post » Mon Feb 29, 2016 3:08 pm

Thanks, but is this possible to do with one sprite? I mean, I have one big sprite that has 4 different colors, so I need to comapre it without any variables, because I can't set this.
B
5
Posts: 7
Reputation: 245

Post » Mon Feb 29, 2016 3:15 pm

with one sprite and 4 different animations the trick is the same
Image Image
B
22
S
13
G
130
Posts: 869
Reputation: 67,816

Post » Mon Feb 29, 2016 3:19 pm

Oh, thanks. I didn't realize it. :)
B
5
Posts: 7
Reputation: 245


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests