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 10-14-2005, 12:16 AM
MysticX2X MysticX2X is offline
Prince
MysticX2X's Avatar
Join Date: Sep 2005
Posts: 2,529
MysticX2X will become famous soon enough
need some help

Hi im just learning scripting right now(yes im learning gs2), i got some basics known right now. Im asking what triggeraction is and how to use it. May someone help me out? Also your not funny if your gonna insult me asking.
__________________
-Mystic

former acc: mystic2k


RIP Matt (NBK)
Reply With Quote
  #2  
Old 10-14-2005, 12:23 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
triggeraction x,y,action,params;
triggers a ‘if (action<action>)...’ on the objects on (x,y)

-From Chad's updated commands.rtf
__________________
Reply With Quote
  #3  
Old 10-14-2005, 02:00 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
Also can be used to cross the clientside line, so you can have something clientside that acts serverside, etc.
Reply With Quote
  #4  
Old 10-14-2005, 06:05 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by MysticX2X
Hi im just learning scripting right now(yes im learning gs2), i got some basics known right now. Im asking what triggeraction is and how to use it. May someone help me out? Also your not funny if your gonna insult me asking.
Those examples they gave you is using old-gscript.

The new engine code is something along the lines of:

NPC Code:
triggeraction(x,y,action,params);



NPC Code:
function onaction(params) {
// Do stuff
}




an example would be:
NPC Code:
function onWeaponFired() {
triggeraction(player.x+1.5+vecx(player.dir)*2,play er.y+1.5+vecy(player.dir)*2,"TestAction","This is parameter one.");
}



NPC Code:
function onTestAction(param1) {
player.chat = param1;
}



(Someone please correct me if I'm wrong, I haven't been able to use the new engine in awhile :x)
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #5  
Old 10-14-2005, 07:45 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
Quote:
Originally Posted by excaliber7388
Also can be used to cross the clientside line, so you can have something clientside that acts serverside, etc.
It does no such thing.

It has the potential to allow a script on the clientside to tell a script on the serverside to do something, and vice versa.
__________________
Skyld
Reply With Quote
  #6  
Old 10-14-2005, 08:46 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
Quote:
Originally Posted by Skyld
It does no such thing.

It has the potential to allow a script on the clientside to tell a script on the serverside to do something, and vice versa.
Eh thats what I meant You just said it better XD
Reply With Quote
  #7  
Old 10-14-2005, 09:27 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by excaliber7388
Eh thats what I meant You just said it better XD
What you said is incorrect. You are not 'having something clientside that acts serverside', you are meerly telling a script to preform an action on the serverside.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
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 03:24 PM.


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