Quote:
Originally Posted by Crow
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
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