| 07-19-2007, 05:00 AM | #1 |
I've got a stack of the following: JASS:call UnitApplyTimedLife(CreateUnit(Player(12), 'H001', x, y, 270.), 'BTLF', 1.) |
| 07-19-2007, 06:36 AM | #2 |
Yes, that will preload the unit if run at map initialization, however, unless I'm mistaken it's more efficient to have the unit preplaced and remove it at start. |
| 07-19-2007, 06:45 AM | #3 |
call RemoveUnit(CreateUnit(...))
? |
| 07-19-2007, 07:03 AM | #4 |
Oops. Forgot about that native. Fixing. |
| 07-19-2007, 07:31 AM | #5 |
Someone else will have to confirm, but I seem to recall that preplaced units are run through CreateUnit. War3-the-game doesn't look at war3mapUnits.doo. |
| 07-19-2007, 07:38 AM | #6 | |
Quote:
Each unit pre-placed is a global unit, ... Each pre-placed unit is created though CreatePlayerUnits().. and CreatePlayerUnits() calls for CreateUnitsForPlayer0(), CreateUnitsForPlayer1(), CreateUnitsForPlayer2(), .... CreateUnitsForPlayer15(). And CreatePlayerUnits() is ran from CreateAllUnits(), which also runs CreatePlayerBuildings().. And CreateAllUnits() is ran from main(), that function is ran in MapInit.. |
| 07-19-2007, 09:42 AM | #7 |
editor cannot run map script soo it uses war3mapUnits.doo if you corrupt or delete it map will no longer work in editor. |
