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)