Trackable
Aus Mappedia
| Variablentyp: trackable | |
|---|---|
| | |
| | |
| |
Ein trackable ist ein Objekt, das ähnlich wie ein Spezialeffekt aus einem unbeweglichen, nicht skalierbaren Model besteht. Es ist jedoch möglich Mausklicks und Mausberührungen mit dem trackable per Auslöser abzufangen. Trackables können nach einer Erzeugung nicht wieder gelöscht werden und sind daher statisch. Mittels der Funktion GetLocalPlayer lassen sich jedoch trackables für einzelne Spieler erzeugen. Außerdem kann mit Hilfe eines Zerstörbaren die Höhe des trackables festgelegt werden:
function CreateTrackableForPlayer takes player whichPlayer, string modelPath, real x, real y, real facingAngle returns trackable local string localPath = "" if (whichPlayer == GetLocalPlayer()) then set localPath = modelPath endif return CreateTrackable(localPath, x, y, facingAngle) endfunction function CreateTrackableForPlayerZ takes player whichPlayer, string modelPath, real x, real y, real z, real facingAngle returns trackable local destructable heightDestructable = CreateDestructableZ('OTip', x, y, z, 0.0, 1.0, 0) local trackable whichTrackable = CreateTrackableForPlayer(whichPlayer, modelPath, x, y, facingAngle) call RemoveDestructable(heightDestructable) set heightDestructable = null return whichTrackable endfunction
