resurrected monsters kill count problem

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!)
Post Reply
User avatar
chaingunner_hell
Posts: 17
Joined: Fri May 24, 2019 4:33 am
Graphics Processor: Intel (Modern GZDoom)
Contact:

resurrected monsters kill count problem

Post by chaingunner_hell »

Recently i have been making a mod called doomguys revenge viewtopic.php?f=43&t=65648 and in this mod you play as an archvile that can resurrect monsters.
Now, for the resurrection to occur i use the Revive() function, and this function sets the COUNTKILL flag of the resurrected monster, thus increasing the kill counter.
this is the line i use for this task

Code: Select all

a.Revive(); a.bFRIENDLY=1; a.height*=4; a.bCOUNTKILL=0; a.setstatelabel("Raise");


What does the Revive function does so that i can modified it so that it does not set the the countkill flag.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: resurrected monsters kill count problem

Post by Blue Shadow »

Instead of clearing the COUNTKILL flag, call [wiki]A_ChangeCountFlags[/wiki] to make the monster uncountable as a kill.
User avatar
chaingunner_hell
Posts: 17
Joined: Fri May 24, 2019 4:33 am
Graphics Processor: Intel (Modern GZDoom)
Contact:

Re: resurrected monsters kill count problem

Post by chaingunner_hell »

You rock dude!!! thanks man
Post Reply

Return to “Scripting”