E1M8 etc. not working correctly?

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!)

E1M8 etc. not working correctly?

Postby Dan_The_Noob » Mon Nov 22, 2021 2:18 pm

So, I use randomspawners to replace enemies using the "replaces" function.
example:
Code: Select allExpand view
actor BaronSpawner : RandomSpawner replaces BaronofHell

but the barons which spawn from this method don't trigger the scripts for E1M7 correctly.
would i need to go through each individual Baron to add A_Bossdeath and BOSSDEATH flags?
or is there another way i can add something to the spawner itself which would fix this?
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: E1M8 etc. not working correctly?

Postby Blue Shadow » Mon Nov 22, 2021 10:11 pm

Tested with the following:

Code: Select allExpand view
class BaronOfHell2 : BaronOfHell {}

class BaronSpawner : RandomSpawner replaces BaronOfHell
{
   Default
   {
      DropItem "Zombieman";
      DropItem "LostSoul";
      DropItem "BaronOfHell2";
   }
}

Regardless of what monster or combination of monsters the spawner picks, the boss-death trigger works.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: E1M8 etc. not working correctly?

Postby Dan_The_Noob » Mon Nov 22, 2021 11:54 pm

that's what i thought, but it just randomly stopped working :|
is it maybe because my creatures have differently defined death states?
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: E1M8 etc. not working correctly?

Postby wildweasel » Mon Nov 22, 2021 11:58 pm

Only way to know for sure is to see the code for whatever monsters you're using.
User avatar
wildweasel
from a different perspective.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: E1M8 etc. not working correctly?

Postby Dan_The_Noob » Tue Nov 23, 2021 2:23 am

wildweasel wrote:Only way to know for sure is to see the code for whatever monsters you're using.

it's a total mess of a spaghetti code situation, i don't know where some of them even are in the mess.

I do intend to eventually tidy it up once i get it to where i'm happy with it.
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: E1M8 etc. not working correctly?

Postby swc132994 » Mon Nov 29, 2021 6:35 pm

I just recently had this problem with my own mod.
From what I understand the problem you are having if after your BaronOfHell2 is killed on E1M8 the walls which should lower are not lowering so you cannot finish the map.

I believe you are right this is being caused by any new death states lacking the "A_Bossdeath" flag.
From my own mod I forgot to add the "A_Bossdeath" flag to the new defined death states "Death.Plasma" and "Xdeath" so if killed by rocket or the plasma rifle the walls would not lower. After adding the flag it worked normally again.

Hope this helps.

Regards,
Swc
swc132994
 
Joined: 12 Jun 2014

Re: E1M8 etc. not working correctly?

Postby Blue Shadow » Wed Dec 01, 2021 12:32 am

^ That sounds like you're replacing the monster directly with another monster, not with a random spawner. In that case, yes, the replacement needs to call A_BossDeath upon death.

In the case of using a random spawner; if the spawner detects that either what it's replacing or what it has spawned is a boss (it checks for the presence of either the BOSSDEATH or BOSS flags), then it'll stay behind and monitor the spawned monster's health so that itself (the spawner) calls A_BossDeath upon the spawned monster's death.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: E1M8 etc. not working correctly?

Postby Dan_The_Noob » Wed Dec 01, 2021 4:54 am

Blue Shadow wrote:^ That sounds like you're replacing the monster directly with another monster, not with a random spawner. In that case, yes, the replacement needs to call A_BossDeath upon death.

In the case of using a random spawner; if the spawner detects that either what it's replacing or what it has spawned is a boss (it checks for the presence of either the BOSSDEATH or BOSS flags), then it'll stay behind and monitor the spawned monster's health so that itself (the spawner) calls A_BossDeath upon the spawned monster's death.


I am using a randomspawner but i don't think i have boss flags on the baron replacements. I swear it used to work before, and before i fixed it originally the walls used to be open when the map started. (and tower of babel would just end immediately)
I think the original fix was to tag the randomspawner as a monster...?? but i could be misremembering.
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest