Alter level monster/kill count

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
TheFortuneTeller
Posts: 36
Joined: Sun Oct 28, 2012 4:20 pm
Location: United States

Alter level monster/kill count

Post by TheFortuneTeller »

I don't see any function in the code that lets one get or change the numbers for total level monsters or killed monsters, but I thought to first ask here if I merely looked over it before I add a new ACS function.
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: Alter level monster/kill count

Post by Blue Shadow »

Get? [wiki=GetLevelInfo]Yes[/wiki]. Change? No.
Gez
 
 
Posts: 17945
Joined: Fri Jul 06, 2007 3:22 pm

Re: Alter level monster/kill count

Post by Gez »

To increase monster count, spawn a monster.

To decrease monster count, remove a monster.

To increase monster killed count, kill a monster.
User avatar
TheFortuneTeller
Posts: 36
Joined: Sun Oct 28, 2012 4:20 pm
Location: United States

Re: Alter level monster/kill count

Post by TheFortuneTeller »

Gez wrote:To increase monster count, spawn a monster.

To decrease monster count, remove a monster.

To increase monster killed count, kill a monster.
Though smarmy, you are right that this does not solve the root problem: when a monster is removed by a "stop" directive in DECORATE, without it being killed, it does not decrease the total monster count. Is this unintentional behavior?
Gez
 
 
Posts: 17945
Joined: Fri Jul 06, 2007 3:22 pm

Re: Alter level monster/kill count

Post by Gez »

The question then is why do you remove monsters in this way rather than through Thing_Remove?

Have you tried unsetting the COUNTKILL flag before it stops?
User avatar
TheFortuneTeller
Posts: 36
Joined: Sun Oct 28, 2012 4:20 pm
Location: United States

Re: Alter level monster/kill count

Post by TheFortuneTeller »

I was not using Thing_Remove (which works as expected, by the way) because I was not writing an ACS script, I was working with DECORATE code that randomly replaces monsters with A_SpawnItemEx (the code is old). I've just remembered the RandomSpawner class, though, and I'm going to try that instead.

Nonetheless, I was not expecting a monster removed even in an unconventional way to render the maximum kill count unattainable. Maybe this ought to be remedied, but I guess Thing_Remove is already a workaround.
Locked

Return to “Editing (Archive)”