AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   How would I modify a trigger_hurt... (https://forums.alliedmods.net/showthread.php?t=232738)

SephirothSG 01-04-2014 06:32

How would I modify a trigger_hurt...
 
Hey guys, just wondering how I would go about modifying an (already existing) trigger_hurt's damage type in a map with a sourcemod plugin?
Is this even possible?

MasterOfTheXP 01-04-2014 07:23

Re: How would I modify a trigger_hurt...
 
You can probably just use Stripper:Source to change it, but if you need code to do it in a SourceMod plugin:
PHP Code:

DispatchKeyValueFloat(entityIndex"damage"5.0); 

or...
PHP Code:

SetEntPropFloat(entityIndexProp_Data"m_flDamage"5.0); 

or possibly even...
PHP Code:

SetVariantFloat(5.0);
AcceptEntityInput(entityIndex"SetDamage"); 

Damage datamaps for trigger_hurt

SephirothSG 01-04-2014 07:35

Re: How would I modify a trigger_hurt...
 
Quote:

Originally Posted by MasterOfTheXP (Post 2080915)
You can probably just use Stripper:Source to change it, but if you need code to do it in a SourceMod plugin:
PHP Code:

DispatchKeyValueFloat(entityIndex"damage"5.0); 

or...
PHP Code:

SetEntPropFloat(entityIndexProp_Data"m_flDamage"5.0); 

or possibly even...
PHP Code:

SetVariantFloat(5.0);
AcceptEntityInput(entityIndex"SetDamage"); 

Damage datamaps for trigger_hurt

Boy do I feel dumb, completely forgot that that stripper:source even existed... Thanks heaps mate :)


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

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