Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   actionprojectile not working? (https://forums.graalonline.com/forums/showthread.php?t=54524)

sparkers 08-08-2004 03:30 PM

I have a question as well.
I figured I'd put it here since it has to do with actionprojectile.
How come this wont work.
This is the NPC:
NPC Code:

if (actionprojectile&&strequals(#p(1),jackin)&&haswea pon(*Tavi)){setlevel2 net_sunriseinc-maincomp.nw,31,29;
}


and this is the weapon:
NPC Code:


//#CLIENTSIDE
if (weaponfired&&this.inuse==0) {disableweapons;
replaceani idle,tavi_idle;replaceani walk,tavi_walk;sleep .1;this.inuse=1;sleep .4;showtext 999,screenwidth-1,100,verdana,r,;changeimgvis 999,0;

}

if (keypressed&&keydown(4)&&this.inuse==1) {enableweapons;replaceani idle,idle;replaceani walk,walk;
sleep .1;this.inuse=0;sleep 2;showtext 999,screenwidth-1,0,verdana,r,;changeimgvis 999,4;
}

if (keypressed&&keydown(5)&&this.inuse==1) {


freezeplayer .4;
setani jackin,;
setshootparams jackin;
if (playerdir=0) {sleep .3;
shoot playerx,playery-.25,playerz,3.14/2,.1,1.1,swordy,;

if (playerdir=1) {sleep .3;
shoot playerx-.25,playery,playerz,3.14,.1,1.1,swordy,;
}
if (playerdir=2) {sleep .3;
shoot playerx,playery+.25,playerz,3.14*1.5,.1,1.1,swordy ,;
}
if (playerdir=3) {sleep .3;
shoot playerx+.25,playery,playerz,0,.1,1.1,swordy,;
}sleep .5;setani tavi_idle,;
}
}


but when you use it right by the npc
it wont change ur level.

Lance 08-08-2004 09:57 PM

Split to another thread, please refer to the rules.

Also, please refer to KSI-GS and format your code properly if you're interested in receiving help.

The biggest problem (aside from your horrendous formatting) is that you are checking #p(1) rather than #p(2), which is the first parameter specified in setshootparams. #p(0) and #p(1) are coordinates.

falco10291029 08-08-2004 11:20 PM

use triggeraction for something like this

sparkers 08-08-2004 11:34 PM

I forgot to mention I did.
and chris stop acting like you know.
Since DUM DUM DUM
your my brother.
You had no need wat so ever to post in here.


All times are GMT +2. The time now is 11:18 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.