This is a really strange one and I have been trying to fix it for a fair while.
The issue is that no matter what the unit will always spawn in the same spot even though the TempPoint is set at random point in playable map area, as shown below:
Spawn Trigger
Events
Time - Every 4.00 seconds of game time
Conditions
Actions
-------- - --------
-------- - --------
-------- Set Temps --------
Set TempRegionI = (Playable map area)
-------- - --------
-------- - --------
Set RanUseIntType1 = (Random integer number between 1 and 2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RanUseIntType1 Equal to 1
(Number of living Thing units owned by Player 1 (Red)) Less than 35
Then - Actions
Set TempPointI = (Random point in (Playable map area))
Unit - Create 1 Thing for Player 1 (Red) at TempPointI facing (Random angle) degrees
Set TempPointII = TempPointI
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Terrain pathing at TempPointII of type Floatability is off) Equal to False
(Terrain pathing at TempPointII of type Walkability is off) Equal to True
Then - Actions
Unit - Remove (Last created unit) from the game
Else - Actions
Unit - Create 1 Animation Heal for Neutral Passive at TempPointII facing Default building facing degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Else - Actions
-------- - --------
-------- - --------
-------- Temp Kill --------
Custom script: call RemoveLocation (udg_TempPointI)
Custom script: call RemoveLocation (udg_TempPointII)
Custom script: call RemoveRect (udg_TempRegionI)
-------- - --------
-------- - --------
The issue is that no matter what the unit will always spawn in the same spot even though the TempPoint is set at random point in playable map area, as shown below:
Spawn Trigger
Events
Time - Every 4.00 seconds of game time
Conditions
Actions
-------- - --------
-------- - --------
-------- Set Temps --------
Set TempRegionI = (Playable map area)
-------- - --------
-------- - --------
Set RanUseIntType1 = (Random integer number between 1 and 2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RanUseIntType1 Equal to 1
(Number of living Thing units owned by Player 1 (Red)) Less than 35
Then - Actions
Set TempPointI = (Random point in (Playable map area))
Unit - Create 1 Thing for Player 1 (Red) at TempPointI facing (Random angle) degrees
Set TempPointII = TempPointI
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Terrain pathing at TempPointII of type Floatability is off) Equal to False
(Terrain pathing at TempPointII of type Walkability is off) Equal to True
Then - Actions
Unit - Remove (Last created unit) from the game
Else - Actions
Unit - Create 1 Animation Heal for Neutral Passive at TempPointII facing Default building facing degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Else - Actions
-------- - --------
-------- - --------
-------- Temp Kill --------
Custom script: call RemoveLocation (udg_TempPointI)
Custom script: call RemoveLocation (udg_TempPointII)
Custom script: call RemoveRect (udg_TempRegionI)
-------- - --------
-------- - --------