Quote:
Originally posted by nyghtGT
will someone please help me to comprende' the triggeraction params cause i just dont have a really good idea bout em ....
|
triggeraction x,y,action,params;
Take this example:
NPC Code:
if (weaponfired) {
triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,myaction,#a;
}
That will trigger an action at the specified X and Y coordinates. The action name is myaction. There is 1 parameter, which is the account name of the player.
NPC Code:
if (actionmyaction) {
message #p(0);
}
If this npc gets activated by the weapon triggeraction, it displays the first parameter as it's message.
#p(n) is a string value which holds the nth action. n is any number between 0 and whatever Stefan made the maximum value be, which I think is 4.