ItsMods

Full Version: Waypoint
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
//self = the player entity who will see the waypoint
//nem = the player entity who will have the waypoint above his head
setWaypoint(nem)
{
    nem endon("disconnect");

    self.NemWay = NewClientHudElem(self);
    self.NemWay.x = nem.origin[0];
    self.NemWay.y = nem.origin[1];
    self.NemWay.z = nem.origin[2];
    self.NemWay setShader("waypoint_kill");
    self.NemWay setWaypoint(true,"waypoint_kill");
    self.NemWay setTargetEnt(Nem);
}

The position will update automatically, no need to put it in a loop. Delete with self.NemWay destroy(); (it will also disappear when the player dies and come back when the player respawns
That's awesome.
Is it possible to make it appear when someone dies and make it stay for a second, and then fade out?
I think:
Code:
self.NemWay fadeovertime(time);
or
self.NemWay.alpha(alpha);
I know how to, but is it possible with these kinds of elements? (at school, so can't test)
there is already a waypoint code by metPl or not?
(09-08-2011, 13:22)Tomsen1410 Wrote: [ -> ]there is already a waypoint code by metPl or not?

dunno? What does it matter?
@AZUMIKKEL In _globallogic_player.gsc, replace the 2 lines which look like this:
Code:
thread maps\mp\gametypes\_deathicons::addDeathicon( body, self, self.team, 5.0 );

With this instead:
Code:
thread maps\mp\gametypes\_deathicons::addDeathicon( body, self, self.team, 1.0 );

Wink

If you look at the addDeathicon function, it calls a timeout function which fades the icon out. So yes, it's possible with shaders.