• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Battle System And Monster Spawn

Status
Not open for further replies.
Level 2
Joined
Apr 14, 2019
Messages
5
Hi! So this is my first attempt in mapmaking, i've created this small map to test things, and i need your help! My current battle system is not good, i need some advices how to make it more usable..
 

Attachments

Well, the biggest thing that on a quick look-through popped in my eyes was the spawn system: add the regions to a variable array as well as the units.

So first make a trigger:
  • Set SpawnRegion[1] = DarkForestSpawn1 <gen>
  • Set SpawnRegion[2] = DarkForestSpawn2 <gen>
  • Set SpawnRegion[3] = DarkForestSpawn3 <gen>
  • ... etc
  • Set EnemyUnit[1] = Ghoul
  • Set EnemyUnit[2] = Bone Mage
Then you can basically give the spawn trigger just one function:
  • Unit - Create 1 EnemyUnit[Random integer bumber between 1 and 2] for Player 12 (Brown) at (Center of SpawnRegion[Random integer number between 1 and [your number of regions]) facing 270.00 degrees
Also, you have a lot of stuff hard-coded (i.e. you have added units, for example, on triggers directly from the world map). It is generally a good practice to add all units (and everything else, quite frankly) to a variable and set all the variables at startup. This way, if for whatever reason, you have to change a certain unit, you don't have to go through all your code and search for every single use of that unit, instead, you have to only the change the one variable.

Also, you're leaking a lot in your map. Check out Memory Leaks.
 
Last edited:
Status
Not open for further replies.
Back
Top