Joccaren
You can change this now in User CP.
- Reaction score
- 54
Could someone please help me find what I did wrong in this trigger? I want this trigger to spawn the appropriate number of units of the appropriate type of each players chosen race for each player, however, when I test the map it comes up with the error:
Thanks to anyone who helps.parameter in 'sUnitCreate' (value: 0)
Trigger Error in 'gt_Spawn_Func'.
Could not get 'unit type' from
parameter in 'sUnitCreate' (value: 0)
Code:
Spawn
Events
Game - Map initialization
Local Variables
Spawn Number = 0 <Integer[3][3]>
Player Race = 0 <Integer[6]>
Spawn Type = No Game Link <Game Link - Unit[3][3]>
Loop Integer = 0 <Integer[2]>
Start Point = No Point <Point[6]>
Conditions
Actions
Variable - Set Spawn Number[1][1] = 1
Variable - Set Spawn Number[1][2] = 11
Variable - Set Spawn Number[1][3] = 6
Variable - Set Spawn Number[2][1] = 3
Variable - Set Spawn Number[2][2] = 8
Variable - Set Spawn Number[2][3] = 3
Variable - Set Spawn Number[3][1] = 1
Variable - Set Spawn Number[3][2] = 3
Variable - Set Spawn Number[3][3] = 4
Variable - Set Spawn Type[1][1] = Terran Battlecruiser
Variable - Set Spawn Type[1][2] = Viking
Variable - Set Spawn Type[1][3] = Terran Raven
Variable - Set Spawn Type[2][1] = Zerg Leviathan
Variable - Set Spawn Type[2][2] = Zerg Corruptor
Variable - Set Spawn Type[2][3] = Zerg Mutalisk
Variable - Set Spawn Type[3][1] = Protoss Mothership
Variable - Set Spawn Type[3][2] = Protoss Pheonix
Variable - Set Spawn Type[3][3] = Protoss Carrier
General - For each integer Loop Integer[1] from 1 to 6 with increment 1, do (Actions)
Actions
Variable - Set Start Point[Loop Integer[1]] = (Random point in (Playable map area) between 200.0 and 200.0 distance from enemy units of player Loop Integer[1] (prefer points within 200.0 of an enemy building))
General - If (Conditions) then do (Actions) else do (Actions)
If
(Race of player Loop Integer[1]) == Protoss
Then
Variable - Set Player Race[Loop Integer[1]] = 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Race of player Loop Integer[1]) == Terran
Then
Variable - Set Player Race[Loop Integer[1]] = 2
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Race of player Loop Integer[1]) == Zerg
Then
Variable - Set Player Race[Loop Integer[1]] = 3
Else
General - For each integer Loop Integer[2] from 1 to 3 with increment 1, do (Actions)
Actions
Unit - Create Spawn Number[Player Race[Loop Integer[1]]][Loop Integer[2]] Spawn Type[Player Race[Player Race[Loop Integer[1]]]][Loop Integer[2]] for player Loop Integer[1] at Start Point[Loop Integer[1]] facing (Random angle) degrees (No Options)