Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   help with script (https://forums.graalonline.com/forums/showthread.php?t=25104)

Cy36 03-05-2002 10:17 AM

help with script
 
can someone help me with a script that would make the npc disappear when it is hit by an arrow :(

screen_name 03-05-2002 10:21 AM

NPC Code:

if (wasshot) {
hide;
}


neomaximus2k 03-05-2002 02:46 PM

Quote:

Originally posted by screen_name
NPC Code:

if (wasshot) {
hide;
}


wouldn't that make it disapear if it was hit by a nukeshot as well?

Saga2001 03-05-2002 11:38 PM

Well yes it would. I would suggest that though, why would it matter?
If you want to be perfect:
NPC Code:

if (created) timeout=.05;
if (timeout)
{
for (i=0;i<arrowscount;i++;)
{
if (arrows[i].x in |x-.5,x+3| && arrows[i].y in |y-1,y+2|)
{
hide;
// destroy;
// If you want it to be destroyed uncomment this ^.
}
}
timeout=.05;
}



I am not sure if arrows[i] includes nukeshots...


All times are GMT +2. The time now is 07:05 PM.

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