• 🏆 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!

Issue with generated mobs

Status
Not open for further replies.
Level 3
Joined
Dec 30, 2015
Messages
33
As of now I'm working on a map that spawns units that eventually fight each other, and as time goes on, more and more of them spawn. I spawn all of them in separate regions so the commands (I think) don't overlap. As more units spawn, though, they start to stutter step and not even attack the opponent for a good few seconds, and sometimes they just clutter up on top of each other and don't move at all. Neutral hostile doesn't let the mobs follow orders because they just return to the region for some reason, so I made the mobs that currently don't work as player 12 (Brown), but the ones on my team (Team 2 (Blue)) are just fine, although maybe because less of the units spawn potentially, but I can't be too sure. Any ideas to fix this?
 
Level 11
Joined
Nov 23, 2013
Messages
665
Neutral has a different AI and will ignore orders most of the time. That's why you did well to replace them with player 12.
As for the rest, why don't you copy your triggers here? That way, we'll be able to check them and somebody will probably see where the issue comes from. To do so, right-click on your trigger and hit "copy as text", then in your post use the tags [trigger ] [ /trigger] (without spaces) and paste your triggers content inside. :cwink:
 
Level 3
Joined
Dec 30, 2015
Messages
33
Time - Every 17.00 seconds of game time
Unit - Create 6 Fel Lord for Player 12 (Brown) at (Center of Region 002 <gen>) facing 270.00 degrees
Unit Group - Order (Units in Region 001 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Unit Group - Order (Units in Region 002 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Unit Group - Order (Units in Region 003 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Unit Group - Order (Units in Region 004 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Unit Group - Order (Units in Region 005 <gen>) to Attack-Move To (Center of Region 000 <gen>)


An example of the rest of the triggers is like this
Time - Every 15.00 seconds of game time
Unit - Create 4 Fel Lord for Player 12 (Brown) at (Center of Region 003 <gen>) facing 90.00 degrees




Rest of the triggers are that minus the actual unit group ordering them to move, originally I had every single one order the units, meaning I had a ton of orders to attack, however that also resulted in massive clumps of units for some reason.

If it helps, I use a trigger enabler as well, which looks like this as an example:
Time - Elapsed game time is 300.00 seconds
Trigger - Turn on Felhound Spawn <gen>
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
You are running into the typical path finder overload problem WC3 has. Each player gets a finite number of path finder calculations per unit game time. This means there is a limit to how many moving units they can support at any given time. This limit is greatly reduced by units colliding into each other or if there is highly complex pathing.

The solution is to spawn less units, which also happens to be a good idea from the game design perspective. Instead of spawning hundreds of weak "trash" mobs, spawn a few much stronger ones. As the game progresses the spawns progress to be better rather than more numerous. You can even see Blizzard using this in the campaign where later attack waves contain more high tech units and fewer lower tech units. The same applies to StarCraft II where the path finder is not a limit, with Blizzard dropping Zerglings in later attack waves for tougher units like Ultralisks or Hybrids.

ime - Every 17.00 seconds of game time
Unit - Create 6 Fel Lord for Player 12 (Brown) at (Center of Region 002 <gen>) facing 270.00 degrees
Unit Group - Order (Units in Region 001 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Unit Group - Order (Units in Region 002 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Unit Group - Order (Units in Region 003 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Unit Group - Order (Units in Region 004 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Unit Group - Order (Units in Region 005 <gen>) to Attack-Move To (Center of Region 000 <gen>)
Be aware that trigger like this leak a lot. Leaks like this can be considered severe as they will cause game performance problems late game.
 
Level 3
Joined
Dec 30, 2015
Messages
33
So is there a trigger that after x amount of time I can, say just make the units have double HP or even just replace the mobs with other custom ones with the same model but double stats etc?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
So is there a trigger that after x amount of time I can, say just make the units have double HP or even just replace the mobs with other custom ones with the same model but double stats etc?
Yes it is called a unit type variable (or integer in JASS). Instead of creating a hard coded unit type in the actions, you create the type of the unit type variable. Other triggers change this unit type variable after X time (single fire time event).

One can raise the HP for all units of a player by modifying their handicap. I believe there were some unintended side effects of this, possibly units rehealing or dying under certain conditions, but I forget them exactly. One can also raise unit health and mana permanently using the item bonus ability with multiple levels as it has bugged level up code allowing level changes to permanently modify the unit's health and mana. Finally one can throw tomes of life at the unit, however one must remember to remove the item after use and make sure the unit has an inventory that supports item use when the tomes are added.
 
Level 3
Joined
Dec 30, 2015
Messages
33
What are the specific trigger names I would have to use to add a bonus ability item after, say 12-15 minutes?
 
Level 3
Joined
Dec 30, 2015
Messages
33
I was able to get it to work thanks to that, thank you so much for all the help, it really helped the map come along nicely.
 
Status
Not open for further replies.
Top