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

Setting Entity Flags


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
your-name-here
Member
Join Date: May 2007
Old 09-27-2008 , 10:09   Setting Entity Flags
Reply With Quote #1

Maybe BAILOPAN or LDuke can answer this one

I'm creating a prop_physics and spawning it. I have been able to modify it's properties and keyvalues. However, I want to set it to break on touch (it's an exploding prop ). I sigscanned for CBaseEntity::AddFlag(int iFlags) but when I call it, nothing happens.

If it helps, I tried to call it both BEFORE and AFTER I spawn the prop. Maybe I should try using spawnflags?

Any suggestions would be awesome
your-name-here is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 09-27-2008 , 13:05   Re: Setting Entity Flags
Reply With Quote #2

CBaseEntity:AddFlag set's m_fFlags flags to specific entity
So what FL_* flag would you use to set it to break on touch
Neither CBaseEntity::m_iEFlags i don't think can help you

Last edited by SAMURAI16; 09-27-2008 at 13:27.
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
your-name-here
Member
Join Date: May 2007
Old 09-27-2008 , 14:35   Re: Setting Entity Flags
Reply With Quote #3

Quote:
Originally Posted by SAMURAI16 View Post
CBaseEntity:AddFlag set's m_fFlags flags to specific entity
So what FL_* flag would you use to set it to break on touch
Neither CBaseEntity::m_iEFlags i don't think can help you
CBaseEntity::m_iEFlags sets the effect flags.

I'm referring to http://developer.valvesoftware.com/w..._physics#Flags. I tried using AddFlag but it has no effect. It is possibly that I may be doing it wrong, but I'd assume that the game would crash if I had an incorrect signature (it didn't).
your-name-here is offline
noob cannon lol
SourceMod Donor
Join Date: Sep 2005
Old 09-28-2008 , 13:53   Re: Setting Entity Flags
Reply With Quote #4

Set it in the spawn flags
noob cannon lol is offline
Send a message via AIM to noob cannon lol Send a message via MSN to noob cannon lol
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:37.


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