Raised This Month: $ Target: $400
 0% 

The Specialists: Hook Powerups


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 12-29-2008 , 20:40   The Specialists: Hook Powerups
Reply With Quote #1

In The Specialists, players who have certain amounts of powerup points on themselves when they die drop the powerups they had. Such as a player who is "The Specialist" dropping a slowpause when they die.

Is there any way to prevent these powerups from spawning, or to catch them as soon as they spawn and delete them?
__________________
Bad_Bud is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 12-30-2008 , 00:24   Re: The Specialists: Hook Powerups
Reply With Quote #2

Create an FM hook for FM_Spawn, make a debug message printing the classname each time something is spawned, then give someone a powerup and kill them. You can also try the Ham spawn hook.

I think the classname is "ts_powerup" but it's been a long time since I've needed to mess with it.

Unfortunately, the TS module is almost totally broken so that won't be of much help.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 12-31-2008 , 23:57   Re: The Specialists: Hook Powerups
Reply With Quote #3

Solution:

Code:
RegisterHam(Ham_Spawn,"ts_powerup","PowerupDelete")
 
public PowerupDelete(PowerupEntid)
{
 remove_entity(PowerupEntid)
 
 return HAM_HANDLED
}
Works great. Deletes all of the powerups dropped when players die, but leaves the powerup spawners in the level, which is exactly what I wanted.

Thank you.
__________________
Bad_Bud is offline
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 -4. The time now is 09:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode