Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-11-2005, 10:47 PM
raiden0899 raiden0899 is offline
Registered User
raiden0899's Avatar
Join Date: Oct 2004
Posts: 192
raiden0899 is on a distinguished road
Scripting Question

Can anyone explain the triggeraction command and #p() to me?
Reply With Quote
  #2  
Old 07-11-2005, 11:33 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
triggeraction x,y,name,params...;
Triggers actionname on x and y with params 0 and up.

triggeraction 30,30,lolname,bbq,plz;
Would result in:
if (actionlolname) in an npc at 30,30, with #p(0) being "bbq", and #p(1) being "plz".

Action names beginning with "server" (i.e. "serverside" or "serverfire") are automatically sent to the npcserver.

triggeraction 0,0,serverside,-System,test;
Would result in:
if (actionserverside) on the serverside of weapon -System, with #p(0) being "test".
__________________
Skyld
Reply With Quote
  #3  
Old 07-11-2005, 11:47 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
What Skyld said and take a look at the newfeatures*.txt files in your Graal folder, they contain lots of information.
__________________
Graal Statistics

Top 3 servers at the moment (players):


Reply With Quote
  #4  
Old 07-12-2005, 12:02 AM
raiden0899 raiden0899 is offline
Registered User
raiden0899's Avatar
Join Date: Oct 2004
Posts: 192
raiden0899 is on a distinguished road
Thanks for the explanation, Skyld.
Reply With Quote
  #5  
Old 07-12-2005, 12:21 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by raiden0899
Thanks for the explanation, Skyld.
Your welcome.
If you are interested in a practical example, I know Stefan's hitpoint system tutorial uses both triggeraction and projectile-based actions. It can be found in the NPC Scripting forum's advice thread (that can be found here).
Also, as Fry said, newfeatures documents contain the updates and fixes, and are full of useful information.
__________________
Skyld
Reply With Quote
Reply


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:35 AM.


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