thisbecasper, on 21 October 2017 - 12:20 PM, said:
onevent EVENT_DISPLAYREST //Healthbar getactor[THISACTOR].extra health getplayer[THISACTOR].MAX_PLAYER_HEALTH maxhp setvar xvar 0 whilevarn maxhp 0 { rotatesprite xvar 185 65536 0 3163 0 0 49 0 0 xdim ydim addvar xvar 1 // move to the right subvar maxhp 1 // next hitpoint } setvar xvar 0 setvar yvar 100 whilevarn health 0 { ifvarg health 100 { rotatesprite yvar 185 65536 0 3163 0 2 16 0 0 xdim ydim // draws atomic health addvar yvar 1 // move to the right subvar health 1 // next hitpoint } else { rotatesprite xvar 185 65536 0 3163 0 0 16 0 0 xdim ydim // draws regular health addvar xvar 1 // move to the right subvar health 1 // next hitpoint } } endevent
Fixed.
Now my only questions are: How do you alter another player's gamevar. And is there a way to achieve the ID of the player you are hitting, or even better, looking at?