AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity ID (https://forums.alliedmods.net/showthread.php?t=64613)

alien 12-19-2007 11:01

Entity ID
 
Ho!

Just a quick one:
Do map entities have always the same entity ID? I mean those entities loaded from the map.

Cheers!

purple_pixie 12-19-2007 11:16

Re: Entity ID
 
Yes.

I'm fairly sure they will.

They always seem to for me, at any rate.

Probably not a brilliant idea to hard-code it, but if you need to, eh?

alien 12-19-2007 11:22

Re: Entity ID
 
Yes. I did an utility which I use to remove malicious map entities (mostly those dropping FPS). The IDs are stored and loaded on every map change.

It works, but I've notice a strange behaviour on some maps and I've encountered missing entities I've never removed. Those I did were still there.

That's why I ask :)

purple_pixie 12-20-2007 06:11

Re: Entity ID
 
Have it dump classname on remove - then you can check your logs to see if you might have done that.

alien 12-20-2007 07:25

Re: Entity ID
 
They're not reliable. Oh no ... what now?
I need to remove certain entities and I can't rely on their IDs? All I can think about now is origin.

purple_pixie 12-20-2007 08:50

Re: Entity ID
 
Origin should do it.

What are you removing?
Are there instances of that class that you don't want to remove?

Otherwise go with classname, but you may have to do origin.

I can't see how entity ID's could vary, but I don't doubt they do if you've found they do.


All times are GMT -4. The time now is 10:59.

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