Hi all, my previus thread got lost some where o0
So i repost, i got the following issue: when map has initiated i want all units to be stored, to that i use the following:
All units gets removed (well for some reason not all, theres always some random units left behind), however none are re-created.
If i set the
I'm using the reload system by Ketila
Group Saving system v.1.0 - The Hive Workshop - A Warcraft III Modding Site
Can any one help me out, on how to respawn all the units (for all players)?
So i repost, i got the following issue: when map has initiated i want all units to be stored, to that i use the following:
-
Save units
-
Events
-
Time - Elapsed game time is 0.01 seconds
-
Conditions
-
Actions
-
-------- Set this variable to which units you want to save --------
-
Player Group - Pick every player in (All players) and do (Set UnitGroup = (Units in (Playable map area) owned by (Picked player)))
-
-------- --------------------------------------------------------------------------- --------
-
Unit Group - Add all units of UnitGroup to UnpickedUnits
-
Set NumberOfUnits = (Number of units in UnitGroup)
-
For each (Integer A) from 1 to NumberOfUnits, do (Actions)
-
Loop - Actions
-
Set Unit[(Integer A)] = (Random unit from UnpickedUnits)
-
Unit Group - Remove Unit[(Integer A)] from UnpickedUnits
-
Set CreepType[(Integer A)] = (Unit-type of Unit[(Integer A)])
-
Set SpawnPoint[(Integer A)] = (Position of Unit[(Integer A)])
-
Set UnitFacing[(Integer A)] = (Facing of Unit[(Integer A)])
-
Set Life[(Integer A)] = (Percentage life of Unit[(Integer A)])
-
Set Mana[(Integer A)] = (Percentage mana of Unit[(Integer A)])
-
Set UnitOwner[(Integer A)] = (Owner of Unit[(Integer A)])
-
-
-
-
-
Restore units
-
Events
-
Player - Player 2 (Blue) types a chat message containing -reload as An exact match
-
-
Conditions
-
Actions
-
Quest - Display to (All players) the Warning message: Blue has initiated ...
-
Cinematic - Fade out over 0.01 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
-
Unit Group - Pick every unit in allunitsreload and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
-
-
Unit Group - Pick every unit in UnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
-
-
For each (Integer A) from 1 to NumberOfUnits, do (Actions)
-
Loop - Actions
-
Unit - Create 1 CreepType[(Integer A)] for UnitOwner[(Integer A)] at SpawnPoint[(Integer A)] facing UnitFacing[(Integer A)] degrees
-
Unit - Set life of (Last created unit) to Life[(Integer A)]%
-
Unit - Set mana of (Last created unit) to Mana[(Integer A)]%
-
Unit Group - Add (Last created unit) to UnitGroup
-
Wait 2.00 seconds
-
Cinematic - Fade in over 0.01 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
-
Player Group - Pick every player in (All players) and do (Player - Set (Picked player) Current gold to 300)
-
-
-
-
All units gets removed (well for some reason not all, theres always some random units left behind), however none are re-created.
If i set the
-
Actions
-
Set UnitGroup = (Units in (Playable map area) owned by Player 2 (Blue))
I'm using the reload system by Ketila
Group Saving system v.1.0 - The Hive Workshop - A Warcraft III Modding Site
Can any one help me out, on how to respawn all the units (for all players)?