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

How to create a "trigger" entity in running time?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 04-11-2008 , 13:44   How to create a "trigger" entity in running time?
Reply With Quote #1

I'm planning to create "trigger" entity such as "trigger_proximity", "trigger_multiple"...., in running time.

How to do that or it's impossible?

Thanks.
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
BAILOPAN
Join Date: Jan 2004
Old 04-11-2008 , 16:56   Re: How to create a "trigger" entity in running time?
Reply With Quote #2

If the entity type exists you can spawn it, but if it's not networkable sourcemod can't use it yet.
__________________
egg
BAILOPAN is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 04-11-2008 , 17:08   Re: How to create a "trigger" entity in running time?
Reply With Quote #3

I think that most trigger_ and func_ entities are tied to a brush in the bsp file. Entities tied to a brush can't be spawned dynamically, only built into the map.

Find an entity in the entity list of the type you want and check it's model name. I believe an entity tied to the world will have a number for the model name (something like "*8" or "8*" instead of "models/path/modelname.mdl").
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 04-11-2008 , 17:32   Re: How to create a "trigger" entity in running time?
Reply With Quote #4

PHP Code:
 
m_nModelIndex        is an integer 
 
m_ModelName          is a string 
Peoples Army is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 04-11-2008 , 17:49   Re: How to create a "trigger" entity in running time?
Reply With Quote #5

Right. So you'd be looking to see if m_ModelName is something like *8.

For example, on of the trigger_multiple entities in cs_office has the model name of "*18" which shows that it is a brush based entity and therefore can't be spawned dynamically.
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 04-11-2008 , 18:02   Re: How to create a "trigger" entity in running time?
Reply With Quote #6

no you got it backwords . m_ModelName is a string "models/player/t_arctic.mdl"

if your looking for the integer index for the model it would be

m_nModelIndex

Last edited by Peoples Army; 04-11-2008 at 18:05.
Peoples Army is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 04-17-2008 , 12:25   Re: How to create a "trigger" entity in running time?
Reply With Quote #7

Yes, that's exactly what I said.

If the string in m_ModelName is "models/somemodel.mdl" then you have an entity that is not tied to the bsp, but can be spawned dynamically. But, if m_ModelName is a string such as "*8" or "*17" then it is tied to a brush in the bsp. Trigger_multiple is an example of one entity that is tied to a brush like this.

If you want to create a trigger, you'll have to set one up in code. Set a min/max vector to define an area and then check every 0.X seconds if any players origin is in that area.
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 04-18-2008 , 21:08   Re: How to create a "trigger" entity in running time?
Reply With Quote #8

Quote:
Originally Posted by Peoples Army View Post
no you got it backwords . m_ModelName is a string "models/player/t_arctic.mdl"

if your looking for the integer index for the model it would be

m_nModelIndex
no he doesnt have it backwards. its right model index is basically the index id of the entity, " *8 " is not an index, if you make a loop on all entities and return their model names(not model index) you will get numbers like " *1" and such in the returned string which what LDuke said it makes it a brushed entity..
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
V0gelz
Senior Member
Join Date: Jun 2004
Old 05-01-2008 , 05:59   Re: How to create a "trigger" entity in running time?
Reply With Quote #9

Can someone make me an example how to make a brush entity?
Because i have no clue how to set the vecmax/min of the brush box and how to set the modelname is getting me confused lol.
I know this is kinda an old post sorry. But wanna know more about brush entitys

Thanks in advance
V0gelz
__________________
V0gelz is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 05-01-2008 , 09:56   Re: How to create a "trigger" entity in running time?
Reply With Quote #10

you can't make brushed entities from SourceMod, it just ain't possible.
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd 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 04:05.


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