This site requires JavaScript, please enable it in your browser!
Greenfoot back
DenisHtl
DenisHtl wrote ...

2020/6/30

has anyone an idea how to punch with an actor

DenisHtl DenisHtl

2020/6/30

#
im just wondering how to kill an enemy only if i am in a certain distance pls help
danpost danpost

2020/6/30

#
You will need a method that determines if an enemy is in front (one that returns a boolean, or true/false, value). You will also probably need a boolean field that tracks the state of the punch key. If state of key changes to the down state, then punch and check for enemy in front. Have enemy, when being punched, either lose hp or be removed.
DenisHtl DenisHtl

2020/6/30

#
danpost wrote...
You will need a method that determines if an enemy is in front (one that returns a boolean, or true/false, value). You will also probably need a boolean field that tracks the state of the punch key. If state of key changes to the down state, then punch and check for enemy in front. Have enemy, when being punched, either lose hp or be removed.
oh ok thx i will try my best if not u can sure help me out i mean u are the legendary danpost! btw my class loves u <3
You need to login to post a reply.