Expose level flags to ZScript

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Expose level flags to ZScript

Re: Expose level flags to ZScript

by JPL » Sun Mar 17, 2019 12:48 pm

Graf Zahl wrote:Ok. So in other words, what you really need is something telling the map to execute all non-level-ending special actions, correct?
Hmm, good idea. Yes I suppose that would do nicely.

Re: Expose level flags to ZScript

by Graf Zahl » Sun Mar 17, 2019 12:39 pm

Ok. So in other words, what you really need is something telling the map to execute all non-level-ending special actions, correct?

Re: Expose level flags to ZScript

by JPL » Sun Mar 17, 2019 12:25 pm

I don't care about my mod working with every map ever created, and ACS scripting especially means all bets are off re: knowing what a monster's death will trigger. I mainly just want to provide generic best-effort handling of map07/E1M8/E4M6/E4M8-like cases without having to hardcode those specific map slots + specific enemies, so that the player isn't locked out of continuing the level because eg a floor didn't lower. There will definitely be maps where it fails, my goal is the largest number of maps supported with the least amount of special case scripting, knowing that that's all careful tradeoff connected to complicated engine behaviors.

To provide some context, monsters aren't allowed to die in Mr Friendly, they just wander around so you can talk to them. Currently I handle map07 like cases from WorldThingSpawned, saying "if level.MapName is MAP07 and you're a mancubus or spider, set your health to 0 and call A_BossDeath (and then set your health back to full), so that any level specials fire and unblock the way forward".

Re: Expose level flags to ZScript

by Graf Zahl » Sun Mar 17, 2019 1:41 am

Not yet. That's what I meant here. The flags are only a subset of means to change sectors. Even the special actions are only a subset. You'll also have to examine each monster's special, too, and let's not even start talking about scripts that trigger an action if a certain group of monsters is dead.

So as a first step here I need a bit of background info what precisely this mod wants to check.

Re: Expose level flags to ZScript

by JPL » Sat Mar 16, 2019 6:40 pm

Hmm, is there any other more robust way I could detect "this level has sectors that will change when (for example) Mancubi die" then?

Re: Expose level flags to ZScript

by Graf Zahl » Sat Mar 16, 2019 5:43 pm

I do not want to expose these old flags. They won't tell you the entire story anyway because you can also use the SpecialAction feature in which case you still won't be able to see if the map has special actions.

Expose level flags to ZScript

by JPL » Sat Mar 16, 2019 5:23 pm

I have some special handling in my mod Mr. Friendly for map07/E1M8/E4M6/E4M8-like cases where a monster's death does something to a sector, but it's all hard-coded based on the map name and doesn't work for maps that define eg "map07special" in their mapinfo. If a level's flags were exposed to ZScript, I could check them and handle such situations in a more robust way.

Top