AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   The Specialists: Hook Powerups (https://forums.alliedmods.net/showthread.php?t=82782)

Bad_Bud 12-29-2008 20:40

The Specialists: Hook Powerups
 
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?

Hawk552 12-30-2008 00:24

Re: The Specialists: Hook Powerups
 
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.

Bad_Bud 12-31-2008 23:57

Re: The Specialists: Hook Powerups
 
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.


All times are GMT -4. The time now is 09:17.

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