View Single Post
  #1  
Old 08-14-2003, 11:47 PM
ApeHex ApeHex is offline
Registered User
Join Date: Jun 2003
Location: USA
Posts: 72
ApeHex is on a distinguished road
Send a message via AIM to ApeHex
triggeraction stuff

ok, im having some trouble with triggeraction
the following code is in an npc that is sent to the players weapons
NPC Code:

if (actionserverside){
// Damage taking.
if (strequals(#p(0),0)){
this.damPower=strtofloat(#p(1));
this.damType=strtofloat(#p(2));
this.finalPower=int(this.damPower+this.damType-this.playArmor);
this.curHP-=this.finalPower;
setcharprop #c,OUCH! #v(this.curHP)/#v(this.maxHP).;
}
}


the next code is in a seperate npc
NPC Code:

if (playerchats&&startswith(/hurt,#c)){
triggeraction playerx,playery,serverside,0,1,1;
}


it doesnt seem to work for me ;\
could someone give me the correct way to use triggeraction (if thats wrong)
__________________
Reply With Quote