00:00
00:00
EyeBallTank
Working on Project Nortubel.
https://rentry.co/axmy9

READ MY RENTRY POST

Joined on 8/24/21

Level:
21
Exp Points:
4,620 / 4,900
Exp Rank:
10,970
Vote Power:
6.27 votes
Rank:
Civilian
Global Rank:
> 100,000
Blams:
0
Saves:
23
B/P Bonus:
0%
Whistle:
Normal
Medals:
31

Problem with “voodoo doll” mechanic. FIXED

Posted by EyeBallTank - August 17th, 2024


The goal

There's these 2 scenes that represent voodoo dolls based on the 2 main characters (Player and Companion).

  • VoodooDollPlayer
  • VoodooDollCompanion

If they get hurt (Either touched by enemies or the Player's knife attack), they make their respective character get hurt.

This is part of a specific level where the main characters protect these dolls from enemies.

The problem

When the Player's health reaches zero after stabbing their dedicated doll, the live count goes beyond 1, which of course is game breaking.

What I personally find it weird is how no relevant script stuff related to this involves _physics_process().

In general, the way how the doll hurts the player involves a function used in an animation called "doll_hurt".

One reason being so the doll itself also has a "pain animation" where its hurtboxes are disabled.

Because the Player has their own pain animation, so they can’t lose health in a short time period after getting hurt.

Relevant video: https://imgur.com/a/hzUlZMV

The relevant scenes

https://github.com/EyeBallTank/PROJECT-NORTUBEL-main-ish/tree/main/src/level%20prefabs/voodoo%20dolls

Thank you for any help regardless.


FIXED: Just created dedicated health bars for the dolls and sort of redid the idea so it's not as "literal" but still.


Tags:

Comments

Comments ain't a thing here.