Enemy randomised (but only of one type).

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.

Enemy randomised (but only of one type).

Postby Hidden Hands » Wed Oct 13, 2021 9:46 pm

I'm not sure if its possible and if it is I'm certainly notnsure how to do it. Example: we have Baron Of Hell, plus more baron variants I created. So let's say 6 different demons / colours of the baron. They are all identical in their decorate code... the only difference ces are aesthetic *colour etc*. But here is what I want.

I place a baron in a map using GZDoom Builder. When you play the game, WHICH VERSION of the baron that spawns out of the 6 is random. They are all the same essentially but the aesthetic differences make it a little more interesting each time.

How can I do this? Is there some code I can use in DECORATE, ZSCRIPT or anything at all to lump all 6 variants into one 'group' so the game can pick one from the 6 at random each time a baron is meant to appear? So different play through may have different results each time?
User avatar
Hidden Hands
Cherub
 
Joined: 20 Sep 2016
Location: London, England
Discord: VGCtm
Operating System: Windows Vista/7/2008 32-bit

Re: Enemy randomised (but only of one type).

Postby SanyaWaffles » Wed Oct 13, 2021 10:02 pm

https://zdoom.org/wiki/Classes:RandomSpawner

You really need to check the Wiki More often.
User avatar
SanyaWaffles
Certified Heretic and Grill Champion
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest