ACS Question

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
Chronos
Posts: 170
Joined: Tue Dec 30, 2008 1:58 pm
Location: Somewhere in your nightmare...

ACS Question

Post by Chronos »

1.Is there any way to count number of monsters/players on map(not to count dead).I heard about ThingCount but in this one you need to enter all types of monsters which can be a long time if map has alot of monsters.I was remembered thats in doom after each level you see how much monsters remain so i thought there must be some function.
2.How to loop script(To make it activate each tic or second.)?
User avatar
Remmirath
Posts: 2562
Joined: Sun Dec 23, 2007 3:53 am
Graphics Processor: nVidia with Vulkan support
Location: My house
Contact:

Re: ACS Question

Post by Remmirath »

About the point 2, use restart; at the end of the script.
User avatar
Chronos
Posts: 170
Joined: Tue Dec 30, 2008 1:58 pm
Location: Somewhere in your nightmare...

Re: ACS Question

Post by Chronos »

Just like Loop in DECORATE, ok.Thanks for fast reply :D
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: ACS Question

Post by HotWax »

Chronos wrote:1.Is there any way to count number of monsters/players on map(not to count dead).I heard about ThingCount but in this one you need to enter all types of monsters which can be a long time if map has alot of monsters.I was remembered thats in doom after each level you see how much monsters remain so i thought there must be some function.
[wiki]GetLevelInfo[/wiki] can tell you how many monsters there are total and how many have been killed. Extrapolating from that, it's easy to get the monster remaining count using basic math:

Code: Select all

int MonstersLeft = GetLevelInfo (LEVELINFO_TOTAL_MONSTERS) - GetLevelInfo (LEVELINFO_KILLED_MONSTERS);
User avatar
Chronos
Posts: 170
Joined: Tue Dec 30, 2008 1:58 pm
Location: Somewhere in your nightmare...

Re: ACS Question

Post by Chronos »

Oh thanks alot.
Locked

Return to “Editing (Archive)”