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
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...
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 :
eventsheet 2 :
if level=25 :
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)