Create monster that does not count in kills

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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.

Create monster that does not count in kills

Postby NaturalTvventy » Wed Nov 14, 2018 9:16 pm

Hi all,

I'd like one of custom monsters to not count towards kills (because it's a machine). Think lost souls in the original DOOM2. Is there a way to do this with ACS?

Thanks.
NaturalTvventy
 
Joined: 22 May 2010

Re: Create monster that does not count in kills

Postby TheMightyHeracross » Wed Nov 14, 2018 10:16 pm

You don't use ACS for that, you use DECORATE or ZScript in the actor's definition. Simply unset the COUNTKILL flag, like so:

Code: Select allExpand view
-COUNTKILL
User avatar
TheMightyHeracross
Close Combat!
 
Joined: 18 Aug 2013
Location: Philadelphia, PA
Discord: TheMightyHeracross#1716

Re: Create monster that does not count in kills

Postby NaturalTvventy » Sat Nov 17, 2018 12:52 pm

Thanks! I’m using ZDoom so no ZScript. How can it be done with decorate? Does the monster need to be created completely using decorate?

Thanks.
NaturalTvventy
 
Joined: 22 May 2010

Re: Create monster that does not count in kills

Postby Enjay » Sat Nov 17, 2018 1:06 pm

You can add the
Code: Select allExpand view
-COUNTKILL

line to the decorate of the monster concerned as TheMightyHeracross said (put it towards the end of the section where the other flags are) or, if you only want some of them not to count, you can inherit from the original one and only change the flag. e.g. this creates a zombieman that does not count towards the kill total and can be placed using edit number 1234*. So, only the ones specifically placed using a map editor and using number 1234 would not count, the standard zombieman would be unchanged.

Code: Select allExpand view
actor NJTestZombieman : Zombieman 1234
{
   -COUNTKILL
}


*In current GZDoom it's best to define editor numbers in MAPINFO but given that you are using ZDoom, that won't be an option.

The same actor can be used to auto-replace all zombiemen like this:

Code: Select allExpand view
actor NJTestZombieman : Zombieman replaces Zombieman
{
   -COUNTKILL
}


Depends exactly what you want to do really.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Create monster that does not count in kills

Postby Graf Zahl » Sat Nov 17, 2018 2:13 pm

Furthermore, MAPINFO based editor numbers were done before ZDoom was discontinued.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Create monster that does not count in kills

Postby NaturalTvventy » Sat Nov 17, 2018 7:57 pm

Oh! That was easy. Thanks.
NaturalTvventy
 
Joined: 22 May 2010


Return to Scripting

Who is online

Users browsing this forum: Collegia Titanica and 2 guests