Page 1 of 1

[3.5.0] Map Markers

Posted: Sat Aug 18, 2018 4:32 am
by Enjay
This has probably been the case for a long time and it may even be how it's meant to be but it seems a bit screwy to me.

Example map attached. There are two rows of map markers (thing 9040) and particle fountains. The markers+fountains on the left are all tid 1 and set to be active in the editor. The ones on the right are all tid 2 and set to be dormant.

Map markers should be able to be activated/deactivated to make them appear/disappear on the automap. However, I have come across two problems.

1) When placed in a map, initially markers are visible regardless of whether they are set to dormant or not.

Load the map and look at the automap. Both rows of markers are visible but (correctly) only the left fountains are active.

2) The activation/deactivation seems to be reversed.

Use the switch on the left. It runs a script to deactivate tid 1 and activate tid 2. The fountains respond appropriately - the left ones stop, the right ones start. However, when you check the automap, the left markers are visible and the right ones have disappeared.

Use the switch on the right. It runs a script to deactivate tid 2 and activate tid 1. Again, the fountains respond appropriately - the right ones stop and the left ones start again. On checking the automap though, you'll find the map markers on the left have now gone and the ones on the right are visible.


I think I set up everything correctly in the example map. However, I was using GZDB which I'm still not fully familiar with so I could have cocked up something, but I tried a similar map in DeePsea and got the same result.

Re: [3.5.0] Mark Markers

Posted: Sat Aug 18, 2018 7:09 am
by gwHero
About the activation, deactivation:

if you look at the code in the gzdoom.pk3, the dormant flag is indeed set incorrectly:

Code: Select all

override void Activate (Actor activator)
	{
		bDormant = true;
	}

	override void Deactivate (Actor activator)
	{
		bDormant = false;
	}
	
This should be the other way around, so indeed a bug.

Re: [3.5.0] Mark Markers

Posted: Sat Aug 18, 2018 7:17 am
by _mental_
This seems to be true. The given behavior however was introduced with map markers themselves almost 12 years ago. Does anyone know some mod that actually uses map markers?

Re: [3.5.0] Map Markers

Posted: Sat Aug 18, 2018 11:19 am
by Mikk-
The City of the Damned II & SoulCrusher are two that come to mind

Re: [3.5.0] Map Markers

Posted: Sat Aug 18, 2018 12:52 pm
by Enjay
Do you know if they use them in a way where the activation/deactivation reversal would be a problem or are they just placed on the map?

Re: [3.5.0] Map Markers

Posted: Sun Aug 19, 2018 6:50 am
by _mental_
City of the Damned II (a.k.a Apocalypse) has 4 MoonMarker things derived from MapMarker class. They are just placed on the map and always active.
Two maps from Soulcrusher has 2 ShopMarker things each (derived from MapMarker too). Curiously enough things in both pairs are placed in the same location and differ only in dormant flags.
I think activation problem was here since map marker's inception. Strange that it was never reported before AFAIK.

Re: [3.5.0] Map Markers

Posted: Sun Aug 19, 2018 10:30 am
by Enjay
I've used them before but only as statically placed things that were visible at map startup and for the duration of the game.

It wasn't until a couple of days ago when I decided to try switching them on and off as objectives were updating in a map that I noticed things weren't doing what I expected. Specifically, I was trying to turn off a map marker but every time I checked the automap, the marker was there even though I knew that the script to deactivate it was running. So I made the test map and it became more obvious what was going on.

Re: [3.5.0] Map Markers

Posted: Sun Aug 19, 2018 2:31 pm
by Xaser
ZDCMP2's objective system uses them, but it opts to remove/create new markers rather than use activate/deactivate. May still be worth a test though.

Re: [3.5.0] Map Markers

Posted: Sun Aug 19, 2018 3:45 pm
by Kappes Buur
The map markers in Soulcrusher, for example in STADMIN, are quite interesting. When activated they indicate the objective

Re: [3.5.0] Map Markers

Posted: Wed Aug 22, 2018 8:17 am
by StroggVorbis
Rise of the Wool Ball & Dave Billing's SPAWN also use map markers.

Re: [3.5.0] Map Markers

Posted: Thu Aug 12, 2021 12:16 pm
by Graf Zahl
This is still open?
I think it goes without saying that changing this now would be ill-advised. I guess we have to accept that the logic here is screwed.
The only permanent remedy would be a new, properly working marker object but I have my doubt that this will actually work out.

Re: [3.5.0] Map Markers

Posted: Thu Aug 12, 2021 12:48 pm
by Enjay
I guess these days it would be reasonably easy for a modder to create a ZScripted marker that does what is required if the existing behaviour was problematic for them. I certainly agree that fixing the existing ones has the potential to break something that is already in the wild.