Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   Triggeraction only triggers the top NPC (https://forums.graalonline.com/forums/showthread.php?t=83941)

Tyhm 01-30-2009 09:37 AM

Triggeraction only triggers the top NPC
 
Just like it says; if you have 2 NPCs trying to share the same space, and you triggeraction the lot of them, whichever one has the highest index gets hit, and whichever one has a lower index gets missed. So if, say, you wanted to script two hordes of zombies to run into each other, and the larger horde absorbs members from the smaller horde - tough noogies, the second horde can only trigger the second horde, and the first horde can only trigger Also the second horde.

(So I'll be using callnpc...)

Tigairius 01-30-2009 09:51 AM

It makes sense because triggeraction actually triggers an action at the specified x,y coordinates, it's not localized to the NPC you triggered it in.

Tyhm 01-30-2009 11:24 AM

That may make sense to you, but not to me; if I trigger an action with a shotgun at a dogpile full of zombies, I'm not expecting it to trigger an action on zombie #5 ignoring zombies #1-4.

xXziroXx 01-30-2009 05:57 PM

Quote:

Originally Posted by Tyhm (Post 1461301)
That may make sense to you, but not to me; if I trigger an action with a shotgun at a dogpile full of zombies, I'm not expecting it to trigger an action on zombie #5 ignoring zombies #1-4.

That's not what actions is supposed to be used for, I'd advise you to use getareanpcs(x, y, width, height); and cycle through the returned array of objects.

Tyhm 01-30-2009 11:33 PM

Duly noted. 's what I'm doing now. 's also why I resisted using triggeractions in the first place.


All times are GMT +2. The time now is 06:31 AM.

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