Raised This Month: $51 Target: $400
 12% 

[Solved] Editing door entity?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Boonie
Member
Join Date: Aug 2015
Old 08-27-2015 , 04:21   [Solved] Editing door entity?
Reply With Quote #1

I was wondering if it is possible to edit a doors settings. I need to edit the "ignoredebris" setting to 0. I have tried using SetVariantBool,SetVariantString and SetVariantInt, but none work, or am I just going about this the wrong way?
PHP Code:
public void EditRelay() {
    
int entity = -1;
    
char ent[10];
    while ((
entity FindEntityByClassname(entity"func_door")) != -1) {
        
GetEntPropString(entityProp_Data"m_iName"entsizeof(ent));
        if (
StrEqual(ent"red_hq_door3")) {
            
SetVariantBool(false);             // I tried this
            //SetVariantString("0");           // And this
            //SetVariantInt(0);                 // And this
            
AcceptEntityInput(entity"ignoredebris");
        }
    }

Boonie is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 08-27-2015 , 05:13   Re: Editing door entity?
Reply With Quote #2

all I can add to this is are you sure it's func_door ? there are many door entities..
hamilton5 is offline
SoulSharD
Member
Join Date: Oct 2013
Location: United Kingdom
Old 08-27-2015 , 06:28   Re: Editing door entity?
Reply With Quote #3

You want DispatchKeyValue, not AcceptEntityInput.

PHP Code:
DispatchKeyValue(entity"ignoredebris""0"); 
__________________


Last edited by SoulSharD; 08-27-2015 at 06:30. Reason: Thought you wanted true, not false.
SoulSharD is offline
Boonie
Member
Join Date: Aug 2015
Old 08-27-2015 , 08:43   Re: Editing door entity?
Reply With Quote #4

I don't know if it makes a difference, but this is on an already spawned entity (so I'm just editing it). I tried DispatchKeyValue on "ignoredebris" and it doesnt work, yet I can change "speed" of all doors with it?
Any ideas?

Last edited by Boonie; 08-27-2015 at 08:46.
Boonie is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 08-27-2015 , 09:18   Re: Editing door entity?
Reply With Quote #5

You can see Inputs of entity on Valve Developer Community: https://developer.valvesoftware.com/wiki/Func_door or in Hammer Editor.
No inputs that edit Ignore Debris.
But i think you can do it with:
PHP Code:
SetVariantString("ignoredebris false");
AcceptEntityInput(entity"AddOutput"); 
If this not work, try dump entity props and find that can change Ignore Debris.
Kailo is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 08-27-2015 , 09:21   Re: Editing door entity?
Reply With Quote #6

the datamaps prop for this seems to be m_bIgnoreDebris
Miu is offline
Boonie
Member
Join Date: Aug 2015
Old 08-27-2015 , 09:57   Re: Editing door entity?
Reply With Quote #7

This below does not work.
PHP Code:
SetVariantString("ignoredebris false");
AcceptEntityInput(entity"AddOutput"); 
I will try with a datamap once I get back.
Boonie is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 08-27-2015 , 11:03   Re: Editing door entity?
Reply With Quote #8

For some key "DispatchKeyValue" still work even if the entity is dispatched.
But if DispatchKeyValue(entity, "ignoredebris", "0"); doesn't work then try to set the netprop collisiongroup it should work.
__________________
Benoist3012 is offline
Boonie
Member
Join Date: Aug 2015
Old 08-28-2015 , 01:30   Re: Editing door entity?
Reply With Quote #9

So I set everything up, but I'm not quite sure what collision group to use to make fire or the righteous bison collide? I have tried 1,3,4,13

PHP Code:
SetEntProp(entityProp_Send"m_CollisionGroup", ?); 
PHP Code:
    COLLISION_GROUP_NONE  0
    
COLLISION_GROUP_DEBRIS,            // Collides with nothing but world and static stuff 
    
COLLISION_GROUP_DEBRIS_TRIGGER// Same as debris, but hits triggers 
    
COLLISION_GROUP_INTERACTIVE_DEBRIS,    // Collides with everything except other interactive debris or debris 
    
COLLISION_GROUP_INTERACTIVE,    // Collides with everything except interactive debris or debris 
    
COLLISION_GROUP_PLAYER
    
COLLISION_GROUP_BREAKABLE_GLASS
    
COLLISION_GROUP_VEHICLE
    
COLLISION_GROUP_PLAYER_MOVEMENT,  // For HL2, same as Collision_Group_Player 
                                         
    
COLLISION_GROUP_NPC,            // Generic NPC group 
    
COLLISION_GROUP_IN_VEHICLE,        // for any entity inside a vehicle 
    
COLLISION_GROUP_WEAPON,            // for any weapons that need collision detection 
    
COLLISION_GROUP_VEHICLE_CLIP,    // vehicle clip brush to restrict vehicle movement 
    
COLLISION_GROUP_PROJECTILE,        // Projectiles! 
    
COLLISION_GROUP_DOOR_BLOCKER,    // Blocks entities not permitted to get near moving doors 
    
COLLISION_GROUP_PASSABLE_DOOR,    // Doors that the player shouldn't collide with 
    
COLLISION_GROUP_DISSOLVING,        // Things that are dissolving are in this group 
    
COLLISION_GROUP_PUSHAWAY,        // Nonsolid on client and server, pushaway in player code 

    
COLLISION_GROUP_NPC_ACTOR,        // Used so NPCs in scripts ignore the player. 

    
LAST_SHARED_COLLISION_GROUP 
Boonie is offline
SoulSharD
Member
Join Date: Oct 2013
Location: United Kingdom
Old 08-28-2015 , 08:50   Re: Editing door entity?
Reply With Quote #10

Well you might try some trial and error, see which one gives the effect you want.

I'm not sure what you're trying to achieve, as the very concept of a door is supposed to block things from going through it.
__________________

SoulSharD 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 11:35.


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