Discord
Login
Community
DARK THEME

How to take damage.

I am stuck trying to get my player to take damage when touching an enemy. Help would be very much appreciated.

https://microstudio.dev/projects/thingmabob2/code/

Cheers.

The link is invalid.

You need to make your project public.

Provide a link from the "Publish" section

Sorry, https://microstudio.io/i/Hydranetic/thingmabob2/

https://microstudio.io/i/Loginus/thingmabob2/

  1. Add a "health" field to the enemy object when you create it.
  2. When your sword collides with an enemy, you subtract 1 from the enemy's health (in the collision check procedure).
  3. When an enemy has no health, you remove him from the list.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community