Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   need some help (https://forums.graalonline.com/forums/showthread.php?t=61729)

MysticX2X 10-14-2005 12:16 AM

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.

ZeLpH_MyStiK 10-14-2005 12:23 AM

triggeraction x,y,action,params;
triggers a ‘if (action<action>)...’ on the objects on (x,y)

-From Chad's updated commands.rtf

excaliber7388 10-14-2005 02:00 AM

Also can be used to cross the clientside line, so you can have something clientside that acts serverside, etc.

ApothiX 10-14-2005 06:05 PM

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)

Skyld 10-14-2005 07:45 PM

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.

excaliber7388 10-14-2005 08:46 PM

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

ApothiX 10-14-2005 09:27 PM

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.


All times are GMT +2. The time now is 03:36 PM.

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