Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   strange bow thingy (https://forums.graalonline.com/forums/showthread.php?t=61821)

excaliber7388 10-19-2005 09:28 PM

strange bow thingy
 
Okay, If a person is in a level with baddies that shoot stones, arrows, etc, the player's arrows reduce, I've looked through my own NPCs and I have no idea where this came from. Also, if you use this weapon, two arrows are taken away (this is my replacement for the bow, because i thought that it might be the problem, but, wrong. What could be doing this? (Note, this is not a problem with bombs, just arrows)
My bow:
NPC Code:
if(actionserverside){
if(strequals(#p(0),darts)){
playerdarts=playerdarts-1;
// ^ ^I know the right way to do this, I was just expirementing a bit
}
}
//#CLIENTSIDE
if(weaponfired){
triggeraction 0,0,serverside,*Bow,darts;
if(playerdarts>0){
setani shoot,;
if(playerdir==0){
shootarrow up;
}
if(playerdir==2){
shootarrow down;
}
if(playerdir==1){
shootarrow left;
}
if(playerdir==3){
shootarrow right;
}
}
}


napo_p2p 10-19-2005 09:52 PM

I think you can just do:
shootarrow playerdir;
or
shootarrow(player.dir);

I think you are losing two arrows because the shootarrow command is probably taking an arrow, and you have an additional triggeraction that also removes an arrow.

excaliber7388 10-19-2005 10:00 PM

but it also takes arrows when baddies shoot, but I'll try that. The problem with the baddies is why I created this bow.

napo_p2p 10-19-2005 10:22 PM

Oh, the baddy 'arrow problem' has always been around (or at least I think so).

excaliber7388 10-19-2005 10:43 PM

thats so lame ALWAYS? That really bites....anyway around it?

ApothiX 10-20-2005 01:05 AM

Quote:

Originally Posted by excaliber7388
thats so lame ALWAYS? That really bites....anyway around it?

Don't use predefined baddies, or script your own arrow system.

excaliber7388 10-20-2005 01:50 AM

Quote:

Originally Posted by ApothiX
Don't use predefined baddies, or script your own arrow system.

oh heh, didn't realize that would work, I'll try that I guess, thanks


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

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