Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Feature request
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-20-2011, 03:45 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
New shoot commands variables

As far as I know there is no way to read the current anistep, or stop a projectile while in mid-air.

so basically I would like

shoot.anistep
shoot.stop(); ( or end(); or destroy()

edit: While I'm at it would be nice to be able to read the current x/y/z a shoot is at while, so I could add like a sparkle trail or something behind the gani.
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!

Last edited by MrOmega; 01-20-2011 at 04:49 AM..
Reply With Quote
  #2  
Old 01-20-2011, 05:27 AM
smirt362 smirt362 is offline
Tee Hee
smirt362's Avatar
Join Date: Feb 2005
Location: Texas
Posts: 2,101
smirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant future
Send a message via AIM to smirt362 Send a message via MSN to smirt362
Vouch
__________________

Don Hertzfeldt <3
Reply With Quote
  #3  
Old 01-20-2011, 05:35 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by MrOmega View Post
edit: While I'm at it would be nice to be able to read the current x/y/z a shoot is at while, so I could add like a sparkle trail or something behind the gani.
Couldn't you add that sparkle trail in the gani using an emitter?
Reply With Quote
  #4  
Old 01-20-2011, 05:53 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Twinny View Post
Couldn't you add that sparkle trail in the gani using an emitter?
Not just could, but should!

-----

Also, I remember reading something about an onPlayerShoots serverside event, where the first parameter is the player object and the second parameter is a TProjectile object, which in theory should allow you to remove projectiles in flight. As mentioned in the other thread, I haven't done anything like that so I have no personal experience with it.

TProjectile exposes these, which may or may not be useful for your purposes:
Quote:
angle - float (read only)
fromplayer - object
horiz - boolean (read only)
params - string
speed - float (read only)
x - float (read only)
y - float (read only)
z - float (read only)
zspeed - float (read only)
destroy()
Reply With Quote
  #5  
Old 01-20-2011, 06:30 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
I currently do use it in the gani and how with TServerProjectile do I determine which projectile needs to modified?
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #6  
Old 01-20-2011, 06:45 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by MrOmega View Post
I currently do use it in the gani and how with TServerProjectile do I determine which projectile needs to modified?
Give each projectile a unique identifier in the parameters, and then check the parameters to verify that it is the correct projectile. There are quite a few ways to find projectile objects. Here is one example:
PHP Code:
for (temp.pthis.level.projectiles) {
  if (
temp.p.params[0] == "specialprojectile") {
    
temp.p.destroy();
  }

Or something of this sort. I don't quite remember how I was doing it on Unholy Nation about 4 years ago.

This will destroy any projectile in the level with the parameter "specialprojectile."

Another great way to capture the projectile object is by using onPlayerShoots(player, projectile).
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”

Last edited by Tigairius; 01-20-2011 at 06:55 AM..
Reply With Quote
  #7  
Old 01-20-2011, 08:56 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Quote:
Originally Posted by Tigairius View Post
Give each projectile a unique identifier in the parameters, and then check the parameters to verify that it is the correct projectile. There are quite a few ways to find projectile objects. Here is one example:
PHP Code:
for (temp.pthis.level.projectiles) {
  if (
temp.p.params[0] == "specialprojectile") {
    
temp.p.destroy();
  }

Or something of this sort. I don't quite remember how I was doing it on Unholy Nation about 4 years ago.

This will destroy any projectile in the level with the parameter "specialprojectile."

Another great way to capture the projectile object is by using onPlayerShoots(player, projectile).
Did not know of that function, cool thanks Tig.
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
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 08:01 AM.


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