View Single Post
  #5  
Old 05-20-2015, 06:21 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Crow View Post
Mentioned what? The whole something = this thingy? I may have suggested that somewhere, sure. Definitely not initially my idea.
Yeah this.. Didn't mean to say was your idea just meant you mentioned it in a pretty popular thread

Quote:
Originally Posted by Crow View Post
Another handy thing is assigning WNPCs to vars. Let's say you got the following in -System/Inventory:
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
inventory this;
  
// more stuff..
}

public function 
Toggle() {
  
// toggle

Then you could do something like this in -System/InputHandler:
PHP Code:
//#CLIENTSIDE
function HandleKey(key) {  // careful, I made this one up, assuming it was implemented in the WNPC earlier
  
if (key == "q")
    
inventory.Toggle();
  
// probably more stuff..

http://forums.graalonline.com/forums...ht=tips+tricks
Reply With Quote