(BEFORE YOU READ - I searched the forums already and none explained how to make it work right or none had the problem ive been having) I need help with actionprojectile. I put it in the control-npc and it never works when the projectile hits a player or npc. I did it clientside too and put it in a system npc, but it NEVER works. Here is the part of my script (NOTE: The shoot and setshootparams work perfectly because I tested it with actionprojectile2 and it works)
NPC Code:
if (actionprojectile) {//THIS ONE DOESN'T WORK!
if (strequals(#p(2),altairarrowhit)){
this.ax = strtofloat(#p(0));
this.ay = strtofloat(#p(1));
for (this.p = 0;this.p < playerscount;this.p++) {
hitplayer this.p, 3, this.ax, this.ay;
}
}
}
NPC Code:
if (actionprojectile2) {//THIS ONE DOES! Just hits everyone in the level
if (strequals(#p(2),altairarrowhit)){
this.ax = strtofloat(#p(0));
this.ay = strtofloat(#p(1));
for (this.p = 0;this.p < playerscount;this.p++) {
hitplayer this.p, 3, this.ax, this.ay;
}
}
}
Help if you can.
~Value (Manager of Altair)
Edit: Loriel added [code]-tags.