There is a player or there are players. There are lava sectors with TID=2. If player enters
lava sector and is without radiation suit he dies. Radiation suits are randomly spawned at dead monster
corpses before removing that corpse.(edited)
However sometimes monster is killed within lava sector and radion suit is spawned there. The player cannot go there.
I'm trying to create a script that spawns radion suits after checking whether this item is inside forbidden
sector with TID=2:
If some radiation suits that are not in lava pools less than all players then spawn more.
But something is wrong. In the game it spawns more suits than players. I'm alone but I see more
suits in unrestricted areas.
Check what is wrong - my logics - or deep in the code, check for rad suits is omitted.
You might think that there are more monsters with the same tag is spawned. But I doubt it.
Spawn mechanism (aka algorithm) is this:
Demo how to use frequiencer. Green light is used to set corpses remove rate of outside monsters. Blue light is used to set the rate of corpses within base perimeter to be removed. Powerful scripts that react whenever how fasat and in whatever order you press buttons. As you can see there are still more than one Radiation suit. Why?
In scripts text lump there are 30th and 25th scripts that are rersponsible for corpses remove. There I've written under what circumstances to spawn T_IRONFEET. It should not spawn more than there are players. But it does. I don't know what is wrong.
Maybe deep inside ZDoom libraries there is omitted check for radiation suits. Maybe some devs would check and tell me what's wrong.
P.S. If you will open the wad with doom builderII and start to test then there you will see that the button for sphere spawn doesn't work. I don't know why but it seems that in this way the program doesn't read data from BEHAVIOR but compiles from within text itself. If you will play the wad itself just with gzdoom then it should work. Besides, some buttons or lines still won't work properly. This is because I did a copy from original wad and removed many stuff that would take a lot of place.
On the screen and in console I was able to see real actual data like:
Spoiler:
----------------------------------------------------------------
all rad suits: 0 suits in lava: 0 players: 1
----------------------------------------------------------------
all rad suits: 1 suits in lava: 0 players: 1
Radiation Suit spawn cancelled
----------------------------------------------------------------
all rad suits: 2 suits in lava: 0 players: 1
Radiation Suit spawn cancelled
----------------------------------------------------------------//I took one here during gameplay
all rad suits: 2 suits in lava: 0 players: 1
Radiation Suit spawn cancelled
----------------------------------------------------------------
all rad suits: 3 suits in lava: 0 players: 1
Radiation Suit spawn cancelled
---------------------------------------------------------------
It really works and checks whether more than one actors with the same tag has spawn at once.
And it never shows that in the way it is made. I have to specifically do some extra loop to spawn more at once.
Only then text is printed on the screen specifying how many and what class spawned. And tids.