Thread: triggeraction
View Single Post
  #3  
Old 09-24-2001, 01:01 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Re: triggeraction

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.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote