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

[Solved] Pre-place structures or create via triggers?

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
Hi guys,

I see some maps where structures for the map are not pre-placed, but instead added to the map via triggers once the game starts. I always assumed this is due to performance reasons. But if you place the structures after the game starts via triggers, the game has to load these assets anyhow, no?

So my question is: Is there any real benefit of preplacing structures vs adding structures via triggers?
 
Level 9
Joined
Mar 26, 2017
Messages
376
It may have several advantages:
-The map loading/saving in editor will take less time
-You can immediately assign variabes to the created units
-You can create the units at other times than map init
-You may have longer load time for your map if you have a large amount of preplaced units (I'm not too sure if so much can be gained this way though, and you have to consider lag spikes if you decide to create units at a later stage)

Disadvantage of the method is that you don't see the unit layout if you decide you want to change things later.
 
Level 9
Joined
Mar 26, 2017
Messages
376
Yes, unlike destructibles, for units the World Editor generates Create Unit statements that are run at Map Init. And it is similar to adding it to script yourself, in terms of map loading time.
 
Status
Not open for further replies.
Top