Thread: Instance?
View Single Post
  #8  
Old 05-26-2007, 01:12 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Quote:
Originally Posted by Inverness View Post
You can't name level-npcs like that, you need some way of finding it.
Edit: Oh my, nevermind, you can set up a global reference to the object.
PHP Code:
//The script of "rupert"
function onCreated() {
  
NPCRupert this;

Then you could reference that object using NPCRupter.variable. Of course there are other things to consider, global vars are cleared on a restart of the environment, for clientside that would be if you restarted Graal or changed server. And for serverside, that would be when the server restarts.

Something I did on Aeon was to add a new global var Control pointing to Control-NPC.
right, but how would i refer to NPCRupert?
__________________
**FLIP OUT**
Reply With Quote