Enemies not registering player in hub maps

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

Enemies not registering player in hub maps

Postby ramon.dexter » Tue Jun 14, 2022 4:22 am

So, I have a hub map. One hub with three sub-maps. I start in the hub(map02), go into map05, kill enemies there, then return to the hub map02, then go into map03...and realize, that enemies are completely ignoring me. Funny is that when I start in hub and go directly to map03, the enemies work as expected. But when I go first to any other map, enemies on other following maps are in some weird dormant like state. Then walk around, but not wake up upon hearing or seeing player. The only way to make them react is to punch them or make any toher slight damage. After damage they wake up and start attacking/chasing player.

And another thing, even more weird, this bug happens completely randomly. Sometimes it dont appear at all, sometimes every second start of the game, sometimes every start of the game.

I jnow that this ehaviour bug is hard to explain and even test, when the bug appears randomly. I'll post link to the wad later.

But if anyone encountered something like this, I would love to know how it was solved.

edit: Small update. I think I solved it by moving the A_ALertMonsters() from weapon's fire action into death state of weapon's projectile. Since Most of my weapons are projectile ones, it seems like better approach, than when I put it into fire actions. But still, I'm wondering what's the correct place to put A_AlertMonsters()...
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Enemies not registering player in hub maps

Postby Player701 » Wed Jun 15, 2022 12:52 pm

ramon.dexter wrote:I jnow that this ehaviour bug is hard to explain and even test, when the bug appears randomly. I'll post link to the wad later.

In this case, it might be better to report it as an actual bug. Hard to tell without looking at the WAD first, but I'd say this kind of stuff shouldn't happen regardless of the weapon code and where your A_AlertMonsters calls are.

ramon.dexter wrote:But if anyone encountered something like this, I would love to know how it was solved.

Sorry, I think it's been several years since I last played a hub. I generally prefer vanilla or limit-removing megaWADs instead. But if I have the time, I will try to construct a simple hub myself and see if I can reproduce the behavior you've described.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest