Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Spawn

Events


Time - Every 10.00 seconds of game time

Conditions

Actions


Set RandomAnimals = (Random integer number between 1 and 100)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




RandomAnimals Less than or equal to 30



Then - Actions




Unit - Create 1 Deer for Player 12 (Brown) at (Random point in (Playable map area)) facing Default building facing degrees



Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






RandomAnimals Less than or equal to 60





Then - Actions






Unit - Create 1 Rabbit for Player 12 (Brown) at (Random point in (Playable map area)) facing Default building facing degrees





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








RandomAnimals Less than or equal to 100







Then - Actions








Unit - Create 1 Sheep for Player 12 (Brown) at (Random point in (Playable map area)) facing Default building facing degrees







Else - Actions
Set Point = (Random point in (Playable map area))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

IF - Conditions


(Terrain pathing at Point of type Walkability is off) Equals False

Then - Actions


Unit - Create YourUnir for Player at Point facing 0 degrees

Else - Actions
Custom script: call RemoveLocation (udg_Point)
((Region) contains Point) Equalse False
Also, you may Set Variable - Point instead of using Random Point in Playable Map Area. Work with variables everytime it is possible.
This is partially true.
You should use a variable whenever the action is repeated twice or more.
In the case with random point though you need to use a variable as random point leaks if not removed.
Spawn

Events


Time - Every 10.00 seconds of game time

Conditions

Actions


Set RandomAnimals = (Random integer number between 1 and 100)


Set SpawnPoint = (Random point in (Playable map area))


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




RandomAnimals Less than or equal to 40




(Terrain pathing at SpawnPoint of type Walkability is off) Equal to False



Then - Actions




Unit - Create 1 Deer for Player 12 (Brown) at SpawnPoint facing Default building facing degrees



Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






RandomAnimals Less than or equal to 80






(Terrain pathing at SpawnPoint of type Walkability is off) Equal to False





Then - Actions






Unit - Create 1 Rabbit for Player 12 (Brown) at SpawnPoint facing Default building facing degrees





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








RandomAnimals Less than or equal to 20








(Terrain pathing at SpawnPoint of type Walkability is off) Equal to False







Then - Actions








Unit - Create 1 Sheep for Player 12 (Brown) at SpawnPoint facing Default building facing degrees







Else - Actions


Custom script: call RemoveLocation(udg_SpawnPoint)
(Terrain pathing at SpawnPoint of type Walkability is off) Equal to False
Else - Actions
If - Conditions

RandomAnimals Less than or equal to 40

Then - Actions


If - Conditions



(Terrain pathing at SpawnPoint of type Walkability is off) Equal to False


Then - Actions



Unit - Create 1 Deer for Player 12 (Brown) at SpawnPoint facing Default building facing degrees


Else - Actions



Set SpawnPoint = (Random point in (Playable map area))



Run (This Trigger).
|
This should be true instead of false
(Terrain pathing at SpawnPoint of type Walkability is off) Equal to False
|
No, friend, it shouldnt be true because you checking:
IF terrain pathing at point of type WALKABILITY is OFF = false
Means that you should do THEN - ACTIONS if the terrain at the point is walkable. If not walkable, the ELSE - ACTIONS should run.
for loop integer A from 0 to 2
actions
set integer A = 0
set point = (random point in map)
if (point walkability is on equal to true)

set integer A = 3 //this will ends the loop
else

destroy point
dude, you need a "respawn" unit or "spawn" unit system? respawn for me is reviving death unit..wait, sorry I didn't follow the comments..
I suggest you to use something I call "repeater". repeater is a looping integer that never ends until the matching conditions are met.
for example:
in that trigger, the system will always find a new point until the condition(point walkability blablabla) is met. I will explain more if you dont get clear enough..
for loop integer A from 0 to 2
actions
set integer A = 0
set point = (random point in map)
if (point walkability is on equal to true)
set integer A = 3 //this will ends the loop
else
destroy point
