Hp bar problems...as always


I can’t seem to get the Whale’s HP bar to appear. Any ideas?

I would guess its behind the whale, change the z order to the HP bar as the whales plus one.

1 Like

I changed the z-order just after creation, positioning and rescaling. Like you recommended, but that didn’t work.

If you run the debugger does it show that the enemy bar has been created? It should also show what z order its on.

1 Like

your point X for whale hp is 0,at creation
you may need to change it to whale point x something.
Also is the event repeated each frame? …cus i dont see any trigger once

1 Like

So I ran the debugger and…I have no idea how to use it. I want to get these two turn-based battles fixed before 2pm today so I can upload this hot pile of garbage to a game jam, sob and then make another game in a few days once my mind has recovered.

Is there another whale in the scene when the events run? If so, you need to delete the whale on a separate event. The next event can’t be on the same line or a sub event.

Objects don’t get deleted immediately, so if it adds a whale while there is already a whale then both objects will be picked. The other actions will use the object that was created earlier for all of the references even if the object is set to be deleted. It will always be a whale behind.

1 Like

Tried it on your suggestion, didn’t work. I might just have too much going on in scene because other things that should work, don’t.

Yeah the whale is in the background and is replaced in the base layer as a surprise enemy. I’ll create a separate event.

Sub-event with a 20th of a second delay. 0.05s

The Global variable for HP is set to 100.

You need to be careful with wait. It’s a bit poorly named. It doesn’t really wait. It only waits where it’s placed for the events directly after it (in the same event) and sub-events. The rest of the scene continues

So, when it processes the wait .25 it inserts a wait at that point but continues to the event that changes the health. The issue is at that point the objects haven’t been created yet. So, it can’t set the value and when it resumes it skips that part.

The purple is the first time through. The green is after the wait has elapsed.

You should be able to replace the last wait event with the events that update the health. The last wait does nothing because there’s nothing to wait for. There are no other events on that event line or sub events.