Here is the link to the simplified capx :(seems like the forum removed the link... Maybe you can help based on the description below?)
ok, workaround : to download the capx, just enter
dropbox.com/s/4ibtr46yhpy8avd/project88_debug.capx?dl=0
with something at the beginning of the adress
Curiously, the symptoms are different now, but there is still a bug with the "set width to enemy.health" action. The health bar just keep its default size and isn't resized.
I found out another cusious thing : I defined a global variable named "level", and added an event :
if "level" = 25 (default value) play the events.
If I remove this condition of "if level=25", everything works fine ! The problem is that I need it, as I would like to create different enemies in regards to the level...
---
Edit :
As it seems like I can't post links, here is the detailed events and actions
enemy has instance variable Health put to 100
lifebar has width of 50
global variable "level" = 25
Event sheet 1 :
start of layout :
delete enemy
delete lifebar
include eventsheet2
---
eventsheet 2 :
if level=25 :
create enemy
create lifebar
put lifebar width to enemy.health
---
the result :
it creates enemy, it creates the lifebar, but lifebar's width is still 50, not 100.
If I remove the condition "if level = 25", everything is fine and lifebar's width becomes 100...
(removing the "destroy" actions at the start doesn't help)