HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dynamically creating units

07-28-2004, 04:00 AM#1
Ceo
I'm creating a 10 player 256x256 bnet RPG map and lately I've been thinking that's going to be a lot of models on one map, so much that just the amount of them might actually make it lag. Would it help any to dynamically create units in certain areas whenever a hero enters them? It would also be cool to create them at different levels according to the entering heroes level. However what I really want to know is if creating/destroying them all the time would make the lag better or worse than having that many models on the map all the time.
07-28-2004, 04:07 AM#2
-Ragnarok-
It iwll create lag to remove them every second, make it do the following instead, this method will not make it lag.


make it select every unit in the region and if its a hero it will spawn.

Every 15 seconds of game time

Select Every unit in Enemy Zone 1

If then else, If picked unit = to a hero then do nothing, else do skip remaining actions.

if picked unit greater than = to level 10 then spawn level 10 Footman elso do nothing

if picked unit greater than = to level 6 then spawn level 6 footman else do nothing.


That's howd I make the trigger. But you will have to make a custom unit for each level of the monster.
07-28-2004, 10:17 AM#3
Anitarf
Creating and destroying units creates lag (if you do it to many units at once), but you could try hiding/unhiding units. However, just having units there, if they are behind the fog of war, I don't think they would lag the game too much by being there...

If the game starts to lag, it may not be due to the graphics, but due to the sheer ammount of units to calculate pathing and such stuff for. In that case, I am uncertain if hiding/showing can help... But anyway, if it's a 256x256 map, then I wouldn't worry. Maps can get bigger than that.