AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do I replace map entities without requiring a map reload? (https://forums.alliedmods.net/showthread.php?t=49492)

Drek 01-05-2007 11:24

How do I replace map entities without requiring a map reload?
 
I know this is possible, because this is what Stripper2 does, however, I don't know if it is possible with AMXX, I'm guessing that with FakeMeta, it might be. Does anyone have any idea how you could do this? A code example would be greatly appreciated.

stupok 01-08-2007 22:49

Re: How do I replace map entities without requiring a map reload?
 
http://forums.alliedmods.net/showthr...light=stripper

I'm sure you can find a lot of useful code in this plugin.

Drek 01-09-2007 07:57

Re: How do I replace map entities without requiring a map reload?
 
Ya, I've already been looking at that. Thanks.

cybermind 01-10-2007 03:29

Re: How do I replace map entities without requiring a map reload?
 
Quote:

Originally Posted by Drek (Post 423931)
I know this is possible, because this is what Stripper2 does

Well, Stripper2 does it during the loading process so it's not really the sameas dong it during the middle of a map.

dutchmeat 01-10-2007 09:20

Re: How do I replace map entities without requiring a map reload?
 
Can't you just use find_ent_by_model ?
Code:
new ent = find_ent_by_model(-1,"classname_to_find","model_to_find") remove_entity(ent)

Bad_Bud 01-10-2007 16:19

Re: How do I replace map entities without requiring a map reload?
 
Unless a ton of ents use that model...

Try looking at the entlist in the .bsp file, locate the # of the ent you want to remove, and then use remove_entity.

If you don't know what the entlist is, just try opening a .bsp file in wordpad. You'll get a dumpload of jibborish, but if you scroll down about halfway through the crap, you'll run into a list of entities. Just remember, don't save it after you've opened it; just copy what you need.


All times are GMT -4. The time now is 22:24.

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