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 08-05-2005, 03:27 AM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
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();
Reply With Quote
  #2  
Old 08-05-2005, 04:01 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
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.
Reply With Quote
  #3  
Old 08-05-2005, 06:16 PM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
Yeah, that's what I thought. :/

But aren't arrows and bombs handled the same way?
Reply With Quote
  #4  
Old 08-11-2005, 10:04 AM
Luigi1 Luigi1 is offline
The OtherOther Shaded Leg
Join Date: Jul 2003
Location: In front of a monitor
Posts: 333
Luigi1 is on a distinguished road
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
__________________
Quote:
Originally Posted by mystic2k
that post did really makes me think how much braincells you have.
*waits for nifty Graal admin person to tell me what happened to vip.graal.net*
Reply With Quote
  #5  
Old 08-11-2005, 09:40 PM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
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
Reply With Quote
  #6  
Old 08-11-2005, 09:58 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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
Reply With Quote
  #7  
Old 08-12-2005, 08:17 PM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
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?
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 04:06 PM.


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