Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   file naming HELP (https://forums.graalonline.com/forums/showthread.php?t=134264419)

greggiles 08-31-2011 07:02 AM

Thor, please explain why detecting gani is not a good idea (assuming more ganis are NOT added)

ffcmike 08-31-2011 09:21 PM

Quote:

Originally Posted by greggiles (Post 1666348)
Thor, please explain why detecting gani is not a good idea (assuming more ganis are NOT added)

What would take up more CPU?

Triggering one time to all NPCs within a box at the time you slash (which can also be done throughout every frame of the attack gani if desired).

Or having a 0.05 timeout within multiple different NPCs checking the same thing?

Gunderak 09-01-2011 01:14 AM

maybe only check for that if the player is on the screen?
PHP Code:

for(temp.pl players) { 


ffcmike 09-01-2011 01:22 AM

Quote:

Originally Posted by Gunderak (Post 1666518)
maybe only check for that if the player is on the screen?
PHP Code:

for(temp.pl players) { 


That will loop through all of the players within the entire level or nearby on the GMAP rather than players on your screen, in terms of serverside there is no screen.
The issue at hand is detecting damage from a single player, though if this was a serverside baddy the inefficiency of this method would be even more serious.


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

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