Thread: need some help
View Single Post
  #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