Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-17-2002, 05:30 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Triggeraction.

example:
[/code]
if (actionserverside){
do stuffs;
}

//#CLIENTSIDE
if (weaponfired){
triggeraction 0,0,serverside,Apple Seed,;
}

[/code]

Explaination:
The triggeraction in this NPC Weapon works like this:
NPC Code:

triggeraction x,y,serverside,Weapon Name,params;


In this case, you don't really need an x/y, so I set it to 0.
I put serverside to trigger the action SERVERSIDE. Hence the actionserverside above the clientside part of the script.
params, I'll explain them when you need them. They're tidbits of information, read by #p(NUMBER OF PARAM);

ANYWAYS.
Another example of triggeraction:
NPC Code:

if (actionseed){
do stuffs;
}

//#CLIENTSIDE
if (weaponfired){
triggeraction X,Y,seed,;
}



Explaination:
NPC Code:

triggeraction X,Y,action name,params;


Again, X/Y is the X/Y you want to trigger this action.
The action name is seen in
(actionseed).
Then there are params again.


IMPORTANT
The ACTON-whatevers are Case sensitive.
For instance, if you had WeAPon as the NPC Weapon name:
you would have to use
triggeraction 0,0,serverside,WeAPon,;
in order for it to work.

Hope it helped.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:37 AM.


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