- Joined
- Jan 30, 2013
- Messages
- 12,879
I think these are two separate systems?
UTS INI config

Events


Map initialization

Conditions

Actions


-------- ------------------Set to false if no longer testing------------------------- --------


Set Debug_Mode = True


-------- ------------------------------------------- --------


Set UTS_Tower_Type[1] = Sniper Tower


Set UTS_Dummy_Type[1] = Sniper Tower (Dummy)


Set UTS_Dummy_FlyingHeight[1] = 150.00


Set UTS_Unit_Type[1] = Rifleman


-------- ------------------------------------------- --------


Set UTS_Tower_Type[2] = Mortar Tower


Set UTS_Dummy_Type[2] = Mortar Tower (Dummy)


Set UTS_Dummy_FlyingHeight[2] = 150.00


Set UTS_Unit_Type[2] = Mortar Team


-------- ------------------------------------------- --------


Set UTS_Tower_Type[3] = Archer Tower (No scout tower model)


Set UTS_Dummy_Type[3] = Archer Tower Dummy


Set UTS_Dummy_FlyingHeight[3] = 0.00


Set UTS_Unit_Type[3] = Archer


-------- ------------------------------------------- --------


Set UTS_Tower_Type[4] = Warlock Tower


Set UTS_Dummy_Type[4] = Warlock Tower (Dummy)


Set UTS_Dummy_FlyingHeight[4] = 120.00


Set UTS_Unit_Type[4] = Fel Orc Warlock


-------- ------------------------------------------- --------


-------- Adjust this number to the max amount of tower types you plan to use --------


Set UTS_Total_Towers = 4


-------- ------------------------------------------- --------


Set UTS_Spell_Type[1] = Enter Scout Tower


Set UTS_Spell_Type[2] = Ungarrison


Set UTS_Scout_Tower = Scout Tower


-------- ------------------------------------------- --------
UTS Start

Events


Unit - A unit Finishes an upgrade


Unit - A unit enters (Playable map area)

Conditions


((Triggering unit) is A structure) Equal to True

Actions


For each (Integer UTS_ThisTower) from 1 to UTS_Total_Towers, do (Actions)



Loop - Actions




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





If - Conditions






(Unit-type of (Triggering unit)) Equal to UTS_Tower_Type[UTS_ThisTower]





Then - Actions






Set UTS_Index = (UTS_Index + 1)






-------- ------------------------------------------------------------ --------






Set UTS_Caster[UTS_Index] = (Triggering unit)






Set UTS_Caster_Loc = (Position of UTS_Caster[UTS_Index])






-------- ------------------------------------------------------------ --------






Unit - Add Ungarrison to UTS_Caster[UTS_Index]






-------- ------------------------------------------------------------ --------






Unit - Create 1 UTS_Dummy_Type[UTS_ThisTower] for Neutral Passive at UTS_Caster_Loc facing Default building facing degrees






Set UTS_Setheight = UTS_Dummy_FlyingHeight[UTS_ThisTower]






-------- ------------------------------------------------------------ --------






Set UTS_Dummy[UTS_Index] = (Last created unit)






-------- ------------------------------------------------------------ --------






Unit - Turn collision for UTS_Dummy[UTS_Index] Off






Unit - Move UTS_Dummy[UTS_Index] instantly to UTS_Caster_Loc






Unit - Change color of UTS_Dummy[UTS_Index] to (Color of (Owner of UTS_Caster[UTS_Index]))






Unit - Add Crow Form to UTS_Dummy[UTS_Index]






Animation - Change UTS_Dummy[UTS_Index] flying height to UTS_Setheight at 0.00






Unit - Make UTS_Dummy[UTS_Index] Explode on death






-------- ------------------------------------------------------------ --------






Custom script: call RemoveLocation(udg_UTS_Caster_Loc)






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







If - Conditions








UTS_Index Equal to 1







Then - Actions








Trigger - Turn on UTS Attack <gen>








Trigger - Turn on UTS Death <gen>







Else - Actions





Else - Actions
UTS Attack

Events


Unit - A unit Is attacked

Conditions


((Attacking unit) is A structure) Equal to True

Actions


For each (Integer UTS_Loop) from 1 to UTS_Index, do (Actions)



Loop - Actions




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





If - Conditions






(Attacking unit) Equal to UTS_Caster[UTS_Loop]





Then - Actions






Unit - Make UTS_Dummy[UTS_Loop] face (Triggering unit) over 0.10 seconds






Animation - Play UTS_Dummy[UTS_Loop]'s attack animation






Animation - Queue UTS_Dummy[UTS_Loop]'s stand animation





Else - Actions
UTS Death

Events


Unit - A unit Dies

Conditions


((Triggering unit) is A structure) Equal to True

Actions


For each (Integer UTS_Loop2) from 1 to UTS_Index, do (Actions)



Loop - Actions




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





If - Conditions






UTS_Caster[UTS_Loop2] Equal to (Triggering unit)





Then - Actions






Animation - Change UTS_Dummy[UTS_Loop2] flying height to 0.00 at 0.00






-------- ---------- --------






Trigger - Turn off (This trigger)






Unit - Kill UTS_Dummy[UTS_Loop2]






Trigger - Turn on (This trigger)






-------- ---------- --------






Set UTS_Dummy[UTS_Loop2] = UTS_Dummy[UTS_Index]






Set UTS_Caster[UTS_Loop2] = UTS_Caster[UTS_Index]






Set UTS_Index = (UTS_Index - 1)






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







If - Conditions








UTS_Index Equal to 0







Then - Actions








Trigger - Turn off (This trigger)








Trigger - Turn off UTS Attack <gen>








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









If - Conditions










Debug_Mode Equal to True









Then - Actions










Game - Display to (All players) the text: (String(UTS_Index))









Else - Actions







Else - Actions






Custom script: exitwhen true





Else - Actions
UTS Garrison

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to UTS_Spell_Type[1]

Actions


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



If - Conditions




(Unit-type of (Target unit of ability being cast)) Equal to UTS_Scout_Tower



Then - Actions




For each (Integer UTS_Garrison_Integer) from 1 to UTS_Total_Towers, do (Actions)





Loop - Actions






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







If - Conditions








(Unit-type of (Triggering unit)) Equal to UTS_Unit_Type[UTS_Garrison_Integer]







Then - Actions








Unit - Replace (Target unit of ability being cast) with a UTS_Tower_Type[UTS_Garrison_Integer] using The old unit's relative life and mana








Unit - Remove (Triggering unit) from the game







Else - Actions



Else - Actions




Set Temp_loc = (Position of (Triggering unit))




Floating Text - Create floating text that reads I can't enter that. at Temp_loc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency




Floating Text - Change (Last created floating text): Disable permanence




Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds




Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds




Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees




Custom script: call RemoveLocation(udg_Temp_loc)
UTS Ungarrison

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to UTS_Spell_Type[2]

Actions


For each (Integer UTS_Ungarrison_Integer) from 1 to UTS_Total_Towers, do (Actions)



Loop - Actions




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





If - Conditions






(Unit-type of (Triggering unit)) Equal to UTS_Tower_Type[UTS_Ungarrison_Integer]





Then - Actions






For each (Integer UTS_Loop3) from 1 to UTS_Index, do (Actions)







Loop - Actions








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









If - Conditions










(Triggering unit) Equal to UTS_Caster[UTS_Loop3]









Then - Actions










Set Temp_loc = ((Position of UTS_Caster[UTS_Loop3]) offset by (Collision Size of (Triggering unit)) towards (Random angle) degrees)










-------- ---------------------------------------------------------------- --------










Unit - Replace (Triggering unit) with a UTS_Scout_Tower using The old unit's relative life and mana










Unit - Create 1 UTS_Unit_Type[UTS_Ungarrison_Integer] for (Owner of UTS_Caster[UTS_Loop3]) at Temp_loc facing Default building facing degrees










Unit - Set life of (Last created unit) to (Percentage life of UTS_Caster[UTS_Loop3])%










-------- ---------------------------------------------------------------- --------










Custom script: call RemoveLocation(udg_Temp_loc)










-------- ---------------------------------------------------------------- --------










Trigger - Turn off (This trigger)










Unit - Remove UTS_Dummy[UTS_Loop3] from the game










Trigger - Turn on (This trigger)










-------- ---------------------------------------------------------------- --------










Set UTS_Dummy[UTS_Loop3] = UTS_Dummy[UTS_Index]










Set UTS_Caster[UTS_Loop3] = UTS_Caster[UTS_Index]










Set UTS_Index = (UTS_Index - 1)










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











If - Conditions












Debug_Mode Equal to True











Then - Actions












Game - Display to (All players) the text: (String(UTS_Index))











Else - Actions










Custom script: exitwhen true









Else - Actions





Else - Actions