• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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