How to create a "trigger" entity in running time?
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. |
Re: How to create a "trigger" entity in running time?
If the entity type exists you can spawn it, but if it's not networkable sourcemod can't use it yet.
|
Re: How to create a "trigger" entity in running time?
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"). |
Re: How to create a "trigger" entity in running time?
PHP Code:
|
Re: How to create a "trigger" entity in running time?
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. |
Re: How to create a "trigger" entity in running time?
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 |
Re: How to create a "trigger" entity in running time?
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. |
Re: How to create a "trigger" entity in running time?
Quote:
|
Re: How to create a "trigger" entity in running time?
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 |
Re: How to create a "trigger" entity in running time?
you can't make brushed entities from SourceMod, it just ain't possible.
|
| All times are GMT -4. The time now is 11:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.