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
This code crashes the game unfortunately. There has to be fix for this...
Quote
Nvm, think I've found something on it now.
Is there a way to achieve the ID of the player you are hitting, or even better, looking at?

Help
Duke4.net
DNF #1
Duke 3D #1



