View Single Post
  #8  
Old 01-13-2013, 06:40 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
I am having issues with only one thing so far, and that's the Instance Manager NPC you specified earlier. It doesn't seem to be recognizing the emergency exit commands and whatnot, and I'm not entirely sure what to do about it. RC kicks back the following errors:

Quote:
Originally Posted by RC
Script: Function unknown_object.waitForSetup not found at line 29 in script of InstanceManager (in level onlinestartlocal.nw at pos (30.5, 30))
Script: Function unknown_object.setInstanceID not found at line 31 in script of InstanceManager (in level onlinestartlocal.nw at pos (30.5, 30))
Script: Function unknown_object.setTempPath not found at line 8 in script of InstanceManager (in level onlinestartlocal.nw at pos (30.5, 30))
Script: Function unknown_object.setEmergencyExit not found at line 9 in script of InstanceManager (in level onlinestartlocal.nw at pos (30.5, 30))
And here's what I have entered currently:

PHP Code:
function onInitialized() {
  
this.trigger("created");
}

function 
onCreated() {
  
// basic setup
  
GameInstance newInstanceTemplate("TStaticVar");
  
GameInstance.setTempPath("levels/temp/"); // folder which holds resources
  
GameInstance.setEmergencyExit("main_av-24.nw"3030);
  
  
/*
  // Easter Maps
  EasterMapInstance = newInstanceTemplate("GameInstance");
  
  // you can specify temp folders or exits for each instance,
  // like this:
  EasterMapInstance.setTempPath("levels/eastermaps/");
  
  EasterMapInstance.join("easter2k11_instance_map");*/
}

function 
newInstanceTemplate(parent) {
  
temp.instance = new (@ parent)();
  
  if (! (
"instance" in instance.joinedclasses)) {
    
instance.join("instance");
  }
  
  
instance.waitForSetup();
  
  
instance.setInstanceID("invalid");
  
instance.setup false;
  return 
instance;
}

public function 
registerInstance(instance) {
  
this.instance.(@ instance.getInstanceID()) = instance;
}

public function 
getInstance(id) {
  return 
this.instance.(@ id);


I haven't changed level names or anything yet. It's a fresh install, but I'll be changing them later. Anyway, what would the fix for this be? Everything else seems to be working fine so far. Great work, man.
Reply With Quote