Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Request: findprojectile() (https://forums.graalonline.com/forums/showthread.php?t=60368)

ChibiChibiLuc 08-05-2005 03:27 AM

Request: findprojectile()
 
Could a command like findprojectile(id) be added?
I'm looking for something that lets you modify projectiles that have been shot by the 'shoot' command...

i.e. findprojectile(2).destroy();

Python523 08-05-2005 04:01 AM

Projectiles arent treated as NPCs... it would be too hard to impliment that because every client handles the projectiles on their own.... when a projectile is fired, information is sent to each client about the projectile which then fires it.

ChibiChibiLuc 08-05-2005 06:16 PM

Yeah, that's what I thought. :/

But aren't arrows and bombs handled the same way?

Luigi1 08-11-2005 10:04 AM

Quote:

Originally Posted by Python523
Projectiles arent treated as NPCs... it would be too hard to impliment that because every client handles the projectiles on their own.... when a projectile is fired, information is sent to each client about the projectile which then fires it.

Then send new information to every client? o_o

ChibiChibiLuc 08-11-2005 09:40 PM

z-z I'm mainly just interested in destroying projectiles and reading their params before they hit.

i.e. an NPC that removes any projectile the first param being 'fireball' in a 4 tile distance of the player, then shoots a projectile back using the angle of the one that was destroyed

Admins 08-11-2005 09:58 PM

It would be interesting to pass the projectile to the function that handles the projectile impact. Changing the flying projectile is not possible. You can access the currently flying projectiles by levels.projectiles[] (new scripting engine),

PHP Code:

  TProjectile (TGraalVar):
    
angle float (read only)
    
fromplayer object
    horiz 
boolean (read only)
    
params string
    speed 
float (read only)
    
float (read only)
    
float (read only)
    
float (read only)
    
zspeed float (read only


ChibiChibiLuc 08-12-2005 08:17 PM

Thanks, just two more things..

Like I said, would it be possible to add a removeprojectile(index) command, like removearrow(index) and removebomb(index)?

And I can't make my NPC read 'params' or 'fromplayer'...
Are they v4-only?


All times are GMT +2. The time now is 12:45 PM.

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