View Single Post
  #6  
Old 09-01-2007, 04:12 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Stefan View Post
There is now

onSwitchPlayerToObserver(pl)
onSwitchObserverToPlayer(pl)
player.isobserver

Also when the player is switched to/from observer mode the events onPlayerLogout(pl) and onPlayerLogin(pl) (for all scripts) and onActionPlayerOnline (for Control-NPC) are now invoked.

Observers are not visible to players, but on clientside you have the variable "ghostsnear" which say if there are ghosts or observers near the player.
Observers don't invoke any events, so there will not be any onPlayerEnters or similar, and they are not in the players[] array. They still appear in allplayers[] and level.players[] though and act like normal players, but once they are switched back to the normal player mode they will load the old attributes again.
Very nice
__________________
Reply With Quote