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