- Joined
- Jun 20, 2017
- Messages
- 380
I have 28 item in map, when my unit cast a spell, then unit move to random item.
this way is right?
this way is right?
-
RandomTeleport
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to (==) RandomTeleport [Human]
-
-
Actions
-
Game - Display to (All players matching ((Matching player) Equal to (==) (Picked player))) the text: (String_PlayerColors[(Player number of (Picked player))] + you've survived for 12 minutes, all the surviving Humans have now gained 2 gold.)
-
Set RandomTeleport = (Random integer number between 1 and 28)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Target item of ability being cast)) Equal to (==) Bundle of Lumber
-
RandomTeleport Greater than or equal to (>=) 1
-
-
Then - Actions
-
Set RandomItemTel = (Random item in (Playable map area))
-
Unit - Move (Casting unit) instantly to (Position of RandomItemTel)
-
-
Else - Actions
-
-
-
Wait 60.00 seconds
-
Set UnitGroup = (Units in (Playable map area))
-
Unit Group - Pick every unit in UnitGroup and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Picked unit)) Equal to (==) Builder (Male)
-
(Unit-type of (Picked unit)) Equal to (==) Builder (Female)
-
-
-
-
Then - Actions
-
Unit - Remove RandomTeleport [Human] from (Picked unit)
-
Unit - Add Teleport [Human] to (Picked unit)
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_UnitGroup)
-
-
Last edited: