Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-01-2007, 03:06 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
onObserverMode function.

Maybe also a flag automatically set when a player goes into observer mode (isobserver or something), though scripters could do that themselves if the function were added. It would be good if a server wanted to return trials back to the starting/unstick location or something when they entered observer mode.
__________________
Reply With Quote
  #2  
Old 09-01-2007, 03:29 AM
Horrified Horrified is offline
Rediculously inactive
Join Date: Jul 2007
Posts: 961
Horrified is on a distinguished road
Send a message via ICQ to Horrified Send a message via AIM to Horrified Send a message via MSN to Horrified Send a message via Yahoo to Horrified
agreed, big time

do this
Reply With Quote
  #3  
Old 09-01-2007, 11:48 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Stefan
The observer mode has been changed so that scripts get onPlayerLogin / onPlayerLogout / onActionPlayerOnline events when the the player is switched to / from observer mode. That should fix the problem with the treasure map.
Quote:
Originally Posted by Stefan
Players disappear for scripting when they are in observer mode. May be I can add an event when the player switches from observer mode to normal mode again (onSwitchObserverToPlayer) and add a time variable when the player switched to normal mode (player.lastobservermodetime)
Looks like things are already in the works.
__________________
Skyld
Reply With Quote
  #4  
Old 09-01-2007, 01:41 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 Skyld View Post

Quote:
Originally Posted by Stefan
The observer mode has been changed so that scripts get onPlayerLogin / onPlayerLogout / onActionPlayerOnline events when the the player is switched to / from observer mode. That should fix the problem with the treasure map.
Quote:
Originally Posted by Stefan
Players disappear for scripting when they are in observer mode. May be I can add an event when the player switches from observer mode to normal mode again (onSwitchObserverToPlayer) and add a time variable when the player switched to normal mode (player.lastobservermodetime)
Looks like things are already in the works.
uhm..
Quote:
Originally Posted by Stefan
Players disappear for scripting
can we edit the player object then? Like would we be able to.. uhm.

PHP Code:
findplayer(<account>).setlevel2("osl.nw"3030); 
etc.. if they went into observer mode?

Or would it be like the onPlayerLogout() function that you can only access the object for an amount of time?
__________________
Reply With Quote
  #5  
Old 09-01-2007, 02:13 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote
  #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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.