Raised This Month: $ Target: $400
 0% 

Help creating a "mine"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 06-15-2013 , 02:23   Re: Help creating a "mine"
Reply With Quote #2

So I've updated the entity code to the following:

Code:
        new ent = CreateEntityByName("prop_physics_override");
        SetEntityModel(ent,mdlMine);
        DispatchKeyValue(ent, "StartDisabled", "false");
        DispatchSpawn(ent);
        TeleportEntity(ent, end, normal, NULL_VECTOR);
        SetEntProp(ent, Prop_Send, "m_usSolidFlags", 152);
        SetEntProp(ent, Prop_Send, "m_CollisionGroup", 1);
        SetEntityMoveType(ent, MOVETYPE_NONE);
        //    SetEntProp(ent, Prop_Send, "m_MoveCollide", 0);
        SetEntProp(ent, Prop_Send, "m_nSolidType", 6);
        SetEntPropEnt(ent, Prop_Data, "m_hLastAttacker", client);
        DispatchKeyValue(ent, "targetname", beammdl);
        DispatchKeyValue(ent, "ExplodeRadius", "256");
        DispatchKeyValue(ent, "ExplodeDamage", "400");
        Format(tmp, sizeof(tmp), "%s,Break,,0,-1", beammdl);
        DispatchKeyValue(ent, "OnHealthChanged", tmp);
        Format(tmp, sizeof(tmp), "%s,Kill,,0,-1", beam);
        DispatchKeyValue(ent, "OnBreak", tmp);
        //  SetEntProp(ent, Prop_Send, "m_takedamage", 2);
        AcceptEntityInput(ent, "Enable");
        HookSingleEntityOutput(ent, "OnBreak", mineBreak, true);
Which now works perfectly! (and is really quite freaking cool). My remaining problem is friendly fire... Because this is a system environment, the explosion does damage indiscriminately (which is a problem!) Is there any way to get an entity explosion to respect the friend fire setting?
Remy Lebeau is offline
 



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 19:56.


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