View Single Post
  #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