• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to spawn unit from demon portal

Status
Not open for further replies.
Level 2
Joined
May 18, 2018
Messages
12
So I want to create a Demon Portal that spawns all sort of unit and attack the player, but still had a limit on how much and how often they spawn. Work like in the blood elf campaign Gates of the Abyss
 
Level 20
Joined
Feb 23, 2014
Messages
1,264
Wasn't it done with a simple, periodic unit spawn trigger?

If I were you, I would try this and see how it works in practice. Just remember to clear up leaks.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
As long as one periodically clears a unit group or removes units from it on their death, you can track all the units spawned using that single unit group.

To spawn a variety of units randomly one can use either an if then else decision tree or an array fed system that takes weights and unit types and quantities. Both would roll a single random number per spawning.

If the unit group contains less than the maximum number of spawned units then spawn more units and add them to the unit group. This is done periodically.

Either give the units to an AI player and let the AI order them around to attack players, or periodically order all units in the unit group to attack a point near an enemy player.
 
Status
Not open for further replies.
Top