Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Bush and Bow problem. (https://forums.graalonline.com/forums/showthread.php?t=134262764)

Toxen 04-10-2011 03:58 PM

Bush and Bow problem.
 
Is there anyway to 1, stop an arrow being shot using shootarrow() , or even detect if you are being hit by one, and 2, stop a bush being thrown at you or detect if you are about to be hit by one? Any feedback would be greatly appreciated!

fowlplay4 04-10-2011 10:33 PM

1. You can remove arrows in a level like this:

PHP Code:

for (temp.0temp.arrowscounttemp.i++) {
  echo(
arrows[temp.i].x SPC arrows[temp.i].y);
  
removearrow(temp.i);


Docs (from commands.rtf still relevant):

PHP Code:

arrowscount          the arrows count (arrows balls)
arrows[index].x          an arrows horizontal position
arrows
[index].y          an arrows vertical position
arrows
[index].dx          the horizontal speed per tick (0.05secs)
arrows[index].dy          the vertical speed per tick (0.05secs)
arrows[index].dir          the flying direction (0,1,2,3)
arrows[index].type      the shottype (--> ball0..3 -> arrow with power 1..4)
arrows[index].from      the shooter (-> baddy-> current player

2. Don't think you can track bushes, so that would require something custom and would probably be more work than it's worth.

scriptless 04-26-2011 04:36 PM

I was actually not aware you could do that with arrows.

As for the bush thing. Since you can make npc's throwabe you could rescript the bush in itself, and use npcs[] to manipulate it. The bush's are actually very simple scripts if I am remembering correctly. Sorry it has been a while.


All times are GMT +2. The time now is 03:59 AM.

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