TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Multiple Collision Detection Issue[solved]
Pages:
1
Multiple Collision Detection Issue[solved]
poehyrulian
Posts: 78
September 07, 2016, 03:25:58 pm
So in my zombie game I have my zombies HP set to 15 and my machete deals in between 3 to 5 each site strike however the zombies die after only one hit. How can I fix that?$
« Last Edit: September 08, 2016, 08:17:30 pm by poehyrulian »
JeffreyDriver
Posts: 2262
September 07, 2016, 03:35:13 pm
Can you post your code?
I'd guess though that the collision is being detected repeatedly. Use a boolean to make sure that the collision only happens once per attack.
Current Projects:
The Grand Grimoire Chronicles Episode 3
Twitter@JeffreyDriver
apps.jeffreydriver.co.uk
poehyrulian
Posts: 78
September 07, 2016, 03:53:08 pm
So a collision boolean that sets itself to false after the collision is detected... I can post code later but I'm not at my house right now.
xplosion28
Posts: 275
September 07, 2016, 09:15:14 pm
Exactly, then change the boolean back to true after a certain amount of time. Pretty much giving the zombie an invulnerability to attacks for that short duration.
poehyrulian
Posts: 78
September 07, 2016, 10:30:50 pm
Alright yo Thank you for the Boolean advice cause it was a futha muckin charm. here is the block
poehyrulian
Posts: 78
September 08, 2016, 06:38:44 pm
BTW the if health equals zero block doesn't work if health is taken below zero... so in order for it to work best that must be changed to if health is less than or equal to 0.
Pages:
1