Sorry for my english !
in my " obj_other_player " this script don't work , he only shows the red side while the character has consistently 100 health :
draw_healthbar(x-10, y - 16, x+10, y - 10,gms_other_get(player_id,"health"), c_red, c_green, c_green, 0, 1, 1);
also if I have 2 controllable Player, In my games when my character dies he reappears 2 times i dont know why ! what can i do ?
Replies (11)
Last message on 20 Oct 2017
Size43
(Administrator)
on
4 Sep 2017, 11:45:15
health is no longer synced automatically. You'll manually need to add a call to gms_self_set in the player object.
Size43
(Administrator)
on
25 Sep 2017, 16:29:37
Where did you add gms_self_set?
YoyoRocklo
(Topicstarter)
on
29 Sep 2017, 18:57:45
In create event .
Size43
(Administrator)
on
30 Sep 2017, 15:13:55
You'll need it in a step event if you want the value to be updated.
YoyoRocklo
(Topicstarter)
on
30 Sep 2017, 21:39:53
it still doesn't work even with a condition
Size43
(Administrator)
on
15 Oct 2017, 22:11:40
What condition?
YoyoRocklo
(Topicstarter)
on
16 Oct 2017, 19:01:27
It would need to say gms_self_set("health",health);
Size43
(Administrator)
on
18 Oct 2017, 22:53:04
You'll need to store the actual health, now you're just setting the health to 100.
YoyoRocklo
(Topicstarter)
on
20 Oct 2017, 19:21:19
Thank you so much ! it's work now ! :')