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
  #4  
Old 08-17-2008, 01:41 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by Inverness View Post
Here is an alternative.
PHP Code:
function onActionGrab() {
  
this.level.chair.trigger("ActionShock""");

PHP Code:
function onCreated() {
  
this.setshape(13232);
  
this.level.chair this;
}
function 
onActionShock() {
  
// do stuff

The this. prefix isn't required in this instance but it is my preference to do it like that so you clearly know what the variable belongs to.
I like this idea, I didn't think of this! [However, you'd need to remove the 'this.level.chair' to replace it with 'level.chat' and also make the 'onActionShock' a public function]
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 09:43 AM.


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