Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 10-13-2013, 11:05 PM
DeCeaseD DeCeaseD is offline
Registered User
Join Date: Jan 2008
Posts: 247
DeCeaseD will become famous soon enough
So after more research.. I've found that the ContextMenuCtrl, is actually just not registering as an object. I put the GUI in it's own code and was wondering if anyone could point out the problem? Btw the debug is returning null in all aspects.. I have a feeling it's something extremely simple that I'm just overlooking.. Or perhaps it's a problem with Graal in itself?

HTML Code:
//#CLIENTSIDE
function onCreated() { 
  onDisplayOptions();
}

function onDisplayOptions() {
  new GuiContextMenuCtrl("Options_Menu") {
    profile = "Necro_TextEdit";
    profile.modal = true;
    profile.active = true;
    profile.makefirstresponder = true;
    textprofile = "Necro_Text";
    text = "Options";
    width = 20;
    
    clearRows();
    bringtofront();
    isfirstresponder();
    
    addRow(0, "Options"); 
    addrow(-1, "-"); 
    for (temp.I = 0; temp.I < thiso.options.size(); temp.I++) 
    { 
      addRow(temp.I + 1, thiso.options[temp.I]); 
    } 
     
    open(mousescreenx, mousescreeny); 
  }
}

function onFirstResponderChanges(obj) {
  player.chat = "Debug2:"SPC temp.obj.name SPC temp.obj.x SPC temp.obj.y;
}
Edit: I actually changed the player chat return to an echo, and it's actually echoing the name of the object now? But seemingly incorrect x/y coordinates, as they're returning null? Anyone have any idea what's going on here? haha
Reply With Quote
 


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 04:50 AM.


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