Raised This Month: $ Target: $400
 0% 

FindEntityByString


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 11-05-2009 , 21:14   FindEntityByString
Reply With Quote #1

I have a few questions about entities in game.

I noticed the hard way, that entities id are dynamic per load and per server ect.. Other things can throw the ranges off.

Now, once the map is loaded, is it safe enough to assume that the id's wont change? ie, cache them? Or should I always be FindEntityByString evey reference to it.

ALSO is there a way to Find all entities by a specific name? Like, if theres two door1 and door2. I can find just both door's (targetname btw).
Styles is offline
Send a message via AIM to Styles
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-05-2009 , 21:30   Re: FindEntityByString
Reply With Quote #2

Indexes don't change untill the entity is killed/remove.
If those ents are map ents, you can in lot of case find them by model, model is like "*17".
If model doesn't start with '*' but "models/....mdl, try to use origin or brush origin, or whatever is usable.
shptools could be very usefull for you.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 11-05-2009 , 21:42   Re: FindEntityByString
Reply With Quote #3

I don't understand the model part (*17).

Also, I'm not a mapper lol no clue. What are those exactly? How are they not moving // changing?
Styles is offline
Send a message via AIM to Styles
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-06-2009 , 10:53   Re: FindEntityByString
Reply With Quote #4

Quote:
Originally Posted by styles View Post
I don't understand the model part (*17).

Also, I'm not a mapper lol no clue. What are those exactly? How are they not moving // changing?

I don't remember exactly the explanations, but when you make a map each texture will be marked with an unique number *x at the compilation; which is actually an index.

To find an entity you have severals ways. Eg ; some engine functions.
__________________
Arkshine is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-06-2009 , 12:50   Re: FindEntityByString
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
I don't remember exactly the explanations, but when you make a map each texture entity will be marked with an unique number *x at the compilation; which is actually an index.
Note: Also the model (*x) changes only after re-compiling the map ( if you're making a map lol )
__________________
xPaw is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 11-06-2009 , 01:07   Re: FindEntityByString
Reply With Quote #6

This could help you maybe:

http://forums.alliedmods.net/showthread.php?t=103851
http://forums.alliedmods.net/showthread.php?t=103629
KadiR is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-06-2009 , 04:34   Re: FindEntityByString
Reply With Quote #7

I don't see the use of kadir links lol.

For shptools : http://forums.space-headed.net/viewtopic.php?f=43&t=111

You can aim an entity and get its index, then you can use command printent < index > that will print you all that ent properties (including model).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 11-06-2009 , 11:09   Re: FindEntityByString
Reply With Quote #8

You can see it with the BSP Viewer tool too..
I thought that only entities got a unique model index..
KadiR is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-06-2009 , 12:51   Re: FindEntityByString
Reply With Quote #9

Oops.
__________________
Arkshine 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 17:44.


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