Collision Pin / Health problems

Get help using Construct 2

Post » Thu Sep 10, 2015 4:35 am

Hi Guys,

I'm having an issue where an Arrow collides and is Pinned to another moving object. When the moving object has been hit and flips / turns positions the Arrow counts as another hit, in turn subtracting another point of health.

Any ideas?
Image
B
21
S
6
Posts: 40
Reputation: 1,357

Post » Thu Sep 10, 2015 7:11 am

Hi Chimchase,

I'm guessing you still want the Arrow to be on screen after the "hit"?
What if you make a Instance variable Boolean on the Arrow object, have it set to "True" from start?
This way the Arrow can only collide and remove HP one time only.

So in the code you write something like:
If collides with Player
If Arrow Variable1 = true

Then

set Variable1 = false;
- 5 hp etc.etc.
B
14
S
5
G
1
Posts: 32
Reputation: 1,038

Post » Thu Sep 10, 2015 11:30 pm

Thanks for the quick reply Kribzy, I will give it a try!
Image
B
21
S
6
Posts: 40
Reputation: 1,357

Post » Thu Sep 10, 2015 11:41 pm

Works like a dream...Thanks Kribzy
Image
B
21
S
6
Posts: 40
Reputation: 1,357

Post » Fri Sep 11, 2015 6:26 am

Glad I could help! :)
B
14
S
5
G
1
Posts: 32
Reputation: 1,038


Return to How do I....?

Who is online

Users browsing this forum: dop2000, LunaticCat and 5 guests