How do I stop npcs from persisting in ne Created 7 years ago2017-09-18 22:37:08 UTC by Dr.Cola Dr.Cola

Created 7 years ago2017-09-18 22:37:08 UTC by Dr.Cola Dr.Cola

Posted 7 years ago2017-09-18 22:37:51 UTC Post #337437
For example, I have map1 which has npcs everywhere. Map1 ends with an elevator which takes you to map2. Map2 is filled with npcs from map1, that are now either completely idle, floating or stuck in walls. Is there a way to delete npcs from previous levels on new map load?

Here's what I have :
trigger_changelevel
info_landmark

in map properties : new level unit has been put on different options and no different results.

Sorry if there's already a solution somewhere, I've tried googling a lot but all I get are basic hl2 or black mesa source stuff that aren't even hammer related
Posted 7 years ago2017-09-18 23:03:24 UTC Post #337438
You mention HL2 and BM:S, is this for the Source engine or for GoldSource? But this topic is in the GoldSource forum.

IIRC, (at least in GoldSource); entities are transferred through levels, I dunno if theres an option or another entity that can get rid of them, I'm not a mapper.
Posted 7 years ago2017-09-18 23:07:41 UTC Post #337439
Hl1, I just said that whenever I try to find a solution of this problem via google I keep getting unrelated stuff. I'm pulling my hair out from this problem and it's ruining my mapping experience
Posted 7 years ago2017-09-19 00:01:56 UTC Post #337440
Just make it impossible for the npcs to get to the changelevel/landmark. A simple monsterclip brush would be enough but there are other, more interesting ways to block npcs from getting somewhere you don't want them to be.
Posted 7 years ago2017-09-19 02:33:55 UTC Post #337441
It's a VIS problem. Your maps should be compiled with full VIS, otherwise NPCs will be transferred to another map with no matter where they are. After full VIS only those NPCs will be transferred, which are in your field of view in the moment of changelevel. Also check your map for leak errors, they prevent to make full VIS properly.
Posted 7 years ago2017-09-19 07:04:46 UTC Post #337442
iirc, if you have an associated trigger_transition only the entities inside it will be transferred on level change.
Posted 7 years ago2017-09-19 12:05:36 UTC Post #337443
Correct, if no transitions exist in the world then it will check if the entity can potentially be seen by the landmark, if so it will be moved over, up to 512 entities total.

There are some conditions that control it, but you should generally use transition volumes to control this.
Posted 7 years ago2017-09-19 13:51:45 UTC Post #337444
I have no leaks and am compiling with full VIS, but I never used trigger_transition, I will try that. Thanks!

Edit : This works!!! Thanks for suggesting trigger_transition, it now works!

I think this tutorial http://twhl.info/tutorial.php?id=62 should give info on trigger_transition for people who are making level changes via elevators and the like
Posted 7 years ago2017-09-20 02:26:08 UTC Post #337449
there really ought to be a good tutorial on level changes, I've run into several mods that have this problem or even worse, when the level change doesnt work due to that silly 'only the server may changelevel' rhetoric
Posted 7 years ago2017-09-21 12:37:28 UTC Post #337454
there really ought to be a good tutorial on level changes, I've run into several mods that have this problem
I agree. Up until a couple of years ago, The Core would have had this problem :P
monster_urby monster_urbyGoldsourcerer
You must be logged in to post a response.