Raised This Month: $32 Target: $400
 8% 

How would I modify a trigger_hurt...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SephirothSG
SourceMod Donor
Join Date: Jun 2013
Old 01-04-2014 , 06:32   How would I modify a trigger_hurt...
Reply With Quote #1

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?

Last edited by SephirothSG; 01-04-2014 at 06:39.
SephirothSG is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 01-04-2014 , 07:23   Re: How would I modify a trigger_hurt...
Reply With Quote #2

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
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)

Last edited by MasterOfTheXP; 01-04-2014 at 07:25.
MasterOfTheXP is offline
SephirothSG
SourceMod Donor
Join Date: Jun 2013
Old 01-04-2014 , 07:35   Re: How would I modify a trigger_hurt...
Reply With Quote #3

Quote:
Originally Posted by MasterOfTheXP View Post
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
SephirothSG is offline
Reply


Thread Tools
Display Modes

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 03:52.


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