Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-10-2011, 03:58 PM
Toxen Toxen is offline
A Toxic Fellow
Join Date: Jan 2008
Location: Georgia
Posts: 36
Toxen is on a distinguished road
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!
__________________
UN NAT.
Reply With Quote
  #2  
Old 04-10-2011, 10:33 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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.
__________________
Quote:
Reply With Quote
  #3  
Old 04-26-2011, 04:36 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:39 PM.


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