Why dosen't this work?
Basically, when I turn it on it should make the player invisible, and visible again when I activate it. If it's on and I die, it should still be on when I respawn.
But...it dosen't work.
Any help would be great.
ReT
Code:
# FORCE_SEEING.COG symbols thing player local flex cost=0.0 local flex mana local sound seeingSound=ForceSee01.WAV local sound seeingSound2=ForceSee02.WAV local int channel=-1 local int rank=0 local int flags=0 local int old_flags=0 local int effectHandle=-1 local template blah=blah local message activated end code activated: player = GetLocalPlayerThing(); if(toggle) { SetThingCurGeoMode(player, 5); Print("Invibility OFF"); toggle = 0; } else { SetThingCurGeoMode(player, 0); Print("Invisibility ON"); toggle = 1; } SetInvActivated(player, 23, toggle); Return; newplayer: Sleep(2.0); SetInvActivated(player, toggle); SetInvAvailable(player, 23, 4); SetInv(player, 23, 4); if(!IsInvActivated(player, 23)) { if(GetThingCurGeoMode(player) == 5)) SetThingCurGeoMode(player, 0); } Return; end
Basically, when I turn it on it should make the player invisible, and visible again when I activate it. If it's on and I die, it should still be on when I respawn.
But...it dosen't work.
Any help would be great.
ReT