• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Bakabox



Description

Summons a large heavy toy box that will fall above the targeted location. The box will trap the nearest units inside it (item) for some time while knocking those who didn't made it, dealing damage.

How it Works


[trigger=Gui]Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Bakabox
Actions
Custom script: set udg_TempUnitB = null
Set TempUnitA = (Triggering unit)
Set TempPlayer = (Triggering player)
Set TempUnitB = (Target unit of ability being cast)
Set TempPointA = (Target point of ability being cast)
Set TempRealA = (Real((Level of (Ability being cast) for TempUnitA)))
-------- --------
Set VaultModel = buildings\other\WyvernCage\WyvernCage.mdl
Set VaultItem = Bakabox
Set VaultSize = 100.00
Set VaultItemSize = 30.00
Set VaultCatch = 80.00
Set VaultCapacity = 99
Set VaultDuration = (10.00 x TempRealA)
Set VaultMovement = 10.00
Set VaultHeight = 600.00
Set VaultReform = 0.30
Set VaultCollision = 150.00
Set VaultDamage = (100.00 x TempRealA)
Set VaultEffects = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Set VaultAttachment = chest
Set VaultKspeed = 20.00
Set VaultKpower = 40.00
Set VaultKeffects = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Set VaultLanding = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-------- --------
Trigger - Run Init <gen> (checking conditions)



[/trigger]


[trigger=Gui]Init
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultItem Not equal to (Item-type of No item)
Then - Actions
Item - Create VaultItem at TempPointA
Set TempItemA = (Last created item)
Item - Hide TempItemA
Else - Actions
Custom script: set udg_TempItemA = null
Unit - Create 1 Dummy for TempPlayer at TempPointA facing Default building facing degrees
Set TempUnitC = (Last created unit)
Unit Group - Add TempUnitC to GroupVault
Animation - Change TempUnitC flying height to VaultHeight at 0.00
Animation - Change TempUnitC's size to (0.00%, 0.00%, 0.00%) of its original size
Animation - Change TempUnitC's vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
Special Effect - Create a special effect attached to the origin of TempUnitC using VaultModel
Custom script: if (udg_TempUnitB == null) then
Custom script: call SetUnitX( udg_TempUnitC, GetLocationX( udg_TempPointA ) )
Custom script: call SetUnitY( udg_TempUnitC, GetLocationY( udg_TempPointA ) )
Custom script: else
Custom script: call SetUnitX( udg_TempUnitC, GetUnitX( udg_TempUnitB ) )
Custom script: call SetUnitY( udg_TempUnitC, GetUnitY( udg_TempUnitB ) )
Custom script: endif
Custom script: call RemoveLocation (udg_TempPointA)
Custom script: set udg_TempIntegerA = GetHandleId( udg_TempUnitC )
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Hashtable - Save Handle OfTempUnitA as 0 of TempIntegerA in HashtableVault
Hashtable - Save Handle OfTempUnitB as 1 of TempIntegerA in HashtableVault
Hashtable - Save Handle OfTempItemA as 2 of TempIntegerA in HashtableVault
Hashtable - Save VaultSize as 3 of TempIntegerA in HashtableVault
Hashtable - Save VaultItemSize as 4 of TempIntegerA in HashtableVault
Hashtable - Save VaultCatch as 5 of TempIntegerA in HashtableVault
Hashtable - Save VaultCapacity as 6 of TempIntegerA in HashtableVault
Hashtable - Save VaultDuration as 7 of TempIntegerA in HashtableVault
Hashtable - Save VaultMovement as 8 of TempIntegerA in HashtableVault
Hashtable - Save VaultHeight as 9 of TempIntegerA in HashtableVault
Hashtable - Save VaultReform as 10 of TempIntegerA in HashtableVault
Hashtable - Save VaultCollision as 11 of TempIntegerA in HashtableVault
Hashtable - Save VaultDamage as 12 of TempIntegerA in HashtableVault
Hashtable - Save VaultEffects as 13 of TempIntegerA in HashtableVault
Hashtable - Save VaultAttachment as 14 of TempIntegerA in HashtableVault
Hashtable - Save VaultKspeed as 15 of TempIntegerA in HashtableVault
Hashtable - Save VaultKpower as 16 of TempIntegerA in HashtableVault
Hashtable - Save VaultKeffects as 17 of TempIntegerA in HashtableVault
Hashtable - Save VaultLanding as 18 of TempIntegerA in HashtableVault
-------- --------
Hashtable - Save 0.00 as 20 of TempIntegerA in HashtableVault
Hashtable - Save VaultSize as 21 of TempIntegerA in HashtableVault
Hashtable - Save 0.00 as -21 of TempIntegerA in HashtableVault
-------- --------
Hashtable - Save 100.00 as -20 of TempIntegerA in HashtableVault
Hashtable - Save 0.00 as 22 of TempIntegerA in HashtableVault
Hashtable - Save 100.00 as -22 of TempIntegerA in HashtableVault
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Loop <gen> is on) Equal to False
Then - Actions
Trigger - Turn on Loop <gen>
Else - Actions




[/trigger]


[trigger=Gui]Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in GroupVault and do (Actions)
Loop - Actions
Set TempUnitA = (Picked unit)
Set TempPointA = (Position of TempUnitA)
Custom script: set udg_TempIntegerA = GetHandleId( udg_TempUnitA )
Set TempUnitB = (Load 0 of TempIntegerA in HashtableVault)
Set TempPlayer = (Owner of TempUnitB)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(1 is stored as a Real of TempIntegerA in HashtableVault) Equal to True
Then - Actions
Custom script: set udg_TempDestA = null
Set TempPointB = (TempPointA offset by (Load 2 of TempIntegerA from HashtableVault) towards (Load 1 of TempIntegerA from HashtableVault) degrees)
Destructible - Pick every destructible within 80.00 of TempPointB and do (Actions)
Loop - Actions
Set TempDestA = (Picked destructible)
Unit - Create 1 Peasant for TempPlayer at TempPointA facing Default building facing degrees
Set TempUnitC = (Last created unit)
Unit - Order TempUnitC to Harvest TempDestA
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of TempUnitC) Not equal to (Order(harvest))
Then - Actions
Custom script: set udg_TempDestA = null
Else - Actions
Unit - Remove TempUnitC from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempDestA Equal to No destructible
(Terrain pathing at TempPointB of type Walkability is off) Equal to False
Then - Actions
Custom script: call SetUnitX(udg_TempUnitA, GetLocationX (udg_TempPointB))
Custom script: call SetUnitY(udg_TempUnitA, GetLocationY (udg_TempPointB))
Else - Actions
Set TempRealA = ((Load 3 of TempIntegerA from HashtableVault) - 8.00)
Set TempRealB = ((Load -3 of TempIntegerA from HashtableVault) + TempRealA)
Animation - Change TempUnitA flying height to TempRealB at 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempRealB Less than or equal to 0.00
Then - Actions
Unit - Turn collision for TempUnitA On
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempUnitA is A flying unit) Equal to True
Then - Actions
Animation - Change TempUnitA flying height to (Default flying height of TempUnitA) at 200.00
Else - Actions
Special Effect - Create a special effect at TempPointB using (Load 4 of TempIntegerA from HashtableVault)
Special Effect - Destroy (Last created special effect)
Unit Group - Remove TempUnitA from GroupVault
Hashtable - Clear all child hashtables of child TempIntegerA in HashtableVault
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(GroupVault is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
Unit - Order TempUnitA to Stop
Unit - Turn collision for TempUnitA Off
Hashtable - Save TempRealA as 3 of TempIntegerA in HashtableVault
Hashtable - Save TempRealB as -3 of TempIntegerA in HashtableVault
Custom script: call RemoveLocation (udg_TempPointB)
Else - Actions
Custom script: set udg_TempUnitC = null
Set TempUnitC = (Load 1 of TempIntegerA in HashtableVault)
Set VaultHeight = (Load 9 of TempIntegerA from HashtableVault)
Set VaultCollision = (Load 11 of TempIntegerA from HashtableVault)
Set VaultDamage = (Load 12 of TempIntegerA from HashtableVault)
Set VaultEffects = (Load 13 of TempIntegerA from HashtableVault)
Set VaultAttachment = (Load 14 of TempIntegerA from HashtableVault)
Set VaultKspeed = (Load 15 of TempIntegerA from HashtableVault)
Set VaultKpower = (Load 16 of TempIntegerA from HashtableVault)
Set VaultKeffects = (Load 17 of TempIntegerA from HashtableVault)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultHeight Greater than 0.00
TempUnitC Not equal to No unit
Then - Actions
Set TempPointB = (Position of TempUnitC)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between TempPointA and TempPointB) Greater than TempRealB
Then - Actions
Set TempPointC = (TempPointA offset by (Load 8 of TempIntegerA from HashtableVault) towards (Angle from TempPointA to TempPointB) degrees)
Custom script: call SetUnitX(udg_TempUnitA, GetLocationX (udg_TempPointC))
Custom script: call SetUnitY(udg_TempUnitA, GetLocationY (udg_TempPointC))
Custom script: call RemoveLocation (udg_TempPointC)
Else - Actions
Custom script: call SetUnitX(udg_TempUnitA, GetUnitX (udg_TempUnitC))
Custom script: call SetUnitY(udg_TempUnitA, GetUnitY (udg_TempUnitC))
Custom script: call RemoveLocation (udg_TempPointB)
Else - Actions
-------- --------
Set TempRealA = (Load 21 of TempIntegerA from HashtableVault)
Set TempRealB = (Load -21 of TempIntegerA from HashtableVault)
Set TempRealC = (Load 22 of TempIntegerA from HashtableVault)
Set TempRealD = (Load -22 of TempIntegerA from HashtableVault)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempRealA Equal to TempRealB
TempRealC Equal to TempRealD
Then - Actions
Set TempItemA = (Load 2 of TempIntegerA in HashtableVault)
Set VaultSize = (Load 3 of TempIntegerA from HashtableVault)
Set VaultItemSize = (Load 4 of TempIntegerA from HashtableVault)
Set VaultCapacity = (Load -6 of TempIntegerA from HashtableVault)
Set TempIntegerB = (Load -1 of TempIntegerA from HashtableVault)
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Custom script: if ( udg_TempIntegerB == 0 ) then
Set TempRealA = ((Load -9 of TempIntegerA from HashtableVault) + 5.00)
Set VaultHeight = (VaultHeight - TempRealA)
Animation - Change TempUnitA flying height to VaultHeight at 0.00
Hashtable - Save VaultHeight as 9 of TempIntegerA in HashtableVault
Hashtable - Save TempRealA as -9 of TempIntegerA in HashtableVault
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultHeight Greater than 0.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultHeight Less than or equal to 100.00
Then - Actions
Destructible - Pick every destructible within VaultCollision of TempPointA and do (Actions)
Loop - Actions
Set TempDestA = (Picked destructible)
Unit - Create 1 Peasant for TempPlayer at TempPointA facing Default building facing degrees
Set TempUnitC = (Last created unit)
Unit - Order TempUnitC to Harvest TempDestA
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of TempUnitC) Equal to (Order(harvest))
Then - Actions
Destructible - Kill TempDestA
Else - Actions
Unit - Remove TempUnitC from the game
Else - Actions
Set TempGroupA = (Units within VaultCollision of TempPointA matching (((Matching unit) is alive) Equal to True))
Unit Group - Pick every unit in TempGroupA and do (Actions)
Loop - Actions
Set TempUnitC = (Picked unit)
Set TempPointB = (Position of TempUnitC)
Set TempRealA = (Current flying height of TempUnitC)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultHeight Greater than or equal to TempRealA
VaultHeight Less than or equal to (TempRealA + 80.00)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempItemA Not equal to No item
VaultCapacity Not equal to (Load 6 of TempIntegerA from HashtableVault)
(Distance between TempPointA and TempPointB) Less than or equal to (Load 5 of TempIntegerA from HashtableVault)
Then - Actions
Unit - Hide TempUnitC
Unit - Pause TempUnitC
Set VaultCapacity = (VaultCapacity + 1)
Hashtable - Save VaultCapacity as -6 of TempIntegerA in HashtableVault
Hashtable - Save Handle OfTempUnitC as (100 + VaultCapacity) of TempIntegerA in HashtableVault
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempUnitC is selected by (Owner of TempUnitC)) Equal to True
Then - Actions
Hashtable - Save True as (200 + VaultCapacity) of TempIntegerA in HashtableVault
Else - Actions
Else - Actions
Unit - Cause TempUnitB to damage TempUnitC, dealing VaultDamage damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the VaultAttachment of TempUnitC using VaultEffects
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempUnitC is A structure) Equal to False
Then - Actions
Unit - Add Crow Form to TempUnitC
Unit - Remove Crow Form from TempUnitC
Set TempRealB = (Angle from TempPointA to TempPointB)
Set TempPointC = (TempPointA offset by VaultCollision towards TempRealB degrees)
Custom script: call SetUnitX(udg_TempUnitC, GetLocationX (udg_TempPointC))
Custom script: call SetUnitY(udg_TempUnitC, GetLocationY (udg_TempPointC))
Custom script: call RemoveLocation (udg_TempPointC)
Custom script: set udg_TempIntegerB = GetHandleId( udg_TempUnitC )
Hashtable - Save Handle OfTempUnitB as 0 of TempIntegerB in HashtableVault
Hashtable - Save TempRealB as 1 of TempIntegerB in HashtableVault
Hashtable - Save TempRealA as -3 of TempIntegerB in HashtableVault
Hashtable - Save VaultKspeed as 2 of TempIntegerB in HashtableVault
Hashtable - Save VaultKpower as 3 of TempIntegerB in HashtableVault
Hashtable - Save VaultKeffects as 4 of TempIntegerB in HashtableVault
Unit Group - Add TempUnitC to GroupVault
Else - Actions
Else - Actions
Custom script: call RemoveLocation (udg_TempPointB)
Custom script: call DestroyGroup (udg_TempGroupA)
Else - Actions
Hashtable - Save 1 as -1 of TempIntegerA in HashtableVault
For each (Integer TempIntegerB) from 1 to 8, do (Actions)
Loop - Actions
Set TempPointB = (TempPointA offset by (VaultCollision - 100.00) towards ((360.00 / 8.00) x (Real(TempIntegerB))) degrees)
Special Effect - Create a special effect at TempPointB using (Load 18 of TempIntegerA from HashtableVault)
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_TempPointB)
Hashtable - Save VaultSize as 20 of TempIntegerA in HashtableVault
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultCapacity Greater than 0
Then - Actions
Hashtable - Save VaultItemSize as 21 of TempIntegerA in HashtableVault
Else - Actions
Hashtable - Save 0.00 as 21 of TempIntegerA in HashtableVault
-------- --------
Hashtable - Save 0.00 as -20 of TempIntegerA in HashtableVault
Hashtable - Save 100.00 as 22 of TempIntegerA in HashtableVault
Custom script: else
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Custom script: if ( udg_TempIntegerB == 1 ) then
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultCapacity Greater than 0
Then - Actions
Hashtable - Save 2 as -1 of TempIntegerA in HashtableVault
Custom script: call UnitRemoveAbility( udg_TempUnitA, 'Aloc' )
Unit - Hide TempUnitA
Item - Show TempItemA
Item - Move TempItemA to TempPointA
Custom script: set udg_TempIntegerB = GetHandleId( udg_TempItemA )
Hashtable - Save Handle OfTempUnitA as 0 of TempIntegerB in HashtableVault
Else - Actions
Item - Remove TempItemA
Unit - Remove TempUnitA from the game
Unit Group - Remove TempUnitA from GroupVault
Hashtable - Clear all child hashtables of child TempIntegerA in HashtableVault
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(GroupVault is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Custom script: else
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Custom script: if ( udg_TempIntegerB == 2 ) then
Custom script: set udg_TempIntegerB = GetHandleId( udg_TempItemA )
Set TempRealA = ((Load 7 of TempIntegerA from HashtableVault) - 0.03)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempRealA Greater than 0.00
(Current life of TempItemA) Greater than 0.00
Then - Actions
Hashtable - Save TempRealA as 7 of TempIntegerA in HashtableVault
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempItemA is owned) Equal to True
Then - Actions
Set TempUnitC = (Load 1 of TempIntegerB in HashtableVault)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempUnitC is hidden) Equal to False
Then - Actions
Custom script: call SetUnitX(udg_TempUnitA, GetUnitX(udg_TempUnitC))
Custom script: call SetUnitY(udg_TempUnitA, GetUnitY(udg_TempUnitC))
Else - Actions
Hero - Drop TempItemA from TempUnitC
Else - Actions
Custom script: call SetUnitX(udg_TempUnitA, GetItemX(udg_TempItemA))
Custom script: call SetUnitY(udg_TempUnitA, GetItemY(udg_TempItemA))
Else - Actions
Hashtable - Save 3 as -1 of TempIntegerA in HashtableVault
Unit - Unhide TempUnitA
Custom script: call UnitAddAbility( udg_TempUnitA, 'Aloc' )
Custom script: call SetUnitX(udg_TempUnitA, (GetRandomReal(-0.01, 0.01) + GetLocationX(udg_TempPointA)))
Custom script: call SetUnitY(udg_TempUnitA, (GetRandomReal(-0.01, 0.01) + GetLocationY(udg_TempPointA)))
Hashtable - Save VaultSize as 21 of TempIntegerA in HashtableVault
Hashtable - Save VaultItemSize as 20 of TempIntegerA in HashtableVault
Hashtable - Clear all child hashtables of child TempIntegerB in HashtableVault
Item - Remove TempItemA
Custom script: else
-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Hashtable - Save 1 as -1 of TempIntegerA in HashtableVault
Hashtable - Save 0 as -6 of TempIntegerA in HashtableVault
For each (Integer TempIntegerB) from 1 to VaultCapacity, do (Actions)
Loop - Actions
Set TempUnitC = (Load (100 + TempIntegerB) of TempIntegerA in HashtableVault)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultCapacity Greater than 1
Then - Actions
Set TempRealA = (VaultCollision / 5.00)
Else - Actions
Set TempRealA = 0.00
Set TempPointB = (TempPointA offset by TempRealA towards ((360.00 / (Real(VaultCapacity))) x (Real(TempIntegerB))) degrees)
Custom script: call SetUnitX(udg_TempUnitC, GetLocationX (udg_TempPointB))
Custom script: call SetUnitY(udg_TempUnitC, GetLocationY (udg_TempPointB))
Custom script: call RemoveLocation (udg_TempPointB)
Unit - Unhide TempUnitC
Unit - Unpause TempUnitC
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load (200 + TempIntegerB) of TempIntegerA from HashtableVault) Equal to True
Then - Actions
Selection - Add TempUnitC to selection for (Owner of TempUnitC)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempUnitC is A flying unit) Equal to True
Then - Actions
Animation - Change TempUnitC flying height to 0.00 at 0.00
Animation - Change TempUnitC flying height to (Default flying height of TempUnitC) at 200.00
Else - Actions
Hashtable - Save VaultSize as 20 of TempIntegerA in HashtableVault
Hashtable - Save 0.00 as 21 of TempIntegerA in HashtableVault
Hashtable - Save 0.00 as -20 of TempIntegerA in HashtableVault
Hashtable - Save 100.00 as 22 of TempIntegerA in HashtableVault
Custom script: endif
Custom script: endif
Custom script: endif
Else - Actions
Set VaultReform = (0.03 / (Load 10 of TempIntegerA from HashtableVault))
Set TempRealE = (Load 20 of TempIntegerA from HashtableVault)
Set TempRealF = ((TempRealA - TempRealE) x VaultReform)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempRealA Not equal to TempRealB
Then - Actions
Set TempRealF = (TempRealB + TempRealF)
Else - Actions
Set TempRealF = TempRealA
Hashtable - Save TempRealF as -21 of TempIntegerA in HashtableVault
Animation - Change TempUnitA's size to (TempRealF%, 0.00%, 0.00%) of its original size
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempRealA Greater than TempRealE
Then - Actions
Set TempRealE = (VaultCollision / (TempRealA / TempRealF))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VaultHeight Less than or equal to 100.00
Then - Actions
Destructible - Pick every destructible within TempRealE of TempPointA and do (Actions)
Loop - Actions
Set TempDestA = (Picked destructible)
Unit - Create 1 Peasant for TempPlayer at TempPointA facing Default building facing degrees
Set TempUnitC = (Last created unit)
Unit - Order TempUnitC to Harvest TempDestA
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of TempUnitC) Equal to (Order(harvest))
Then - Actions
Destructible - Kill TempDestA
Else - Actions
Unit - Remove TempUnitC from the game
Else - Actions
Set TempGroupA = (Units within TempRealE of TempPointA matching (((Matching unit) is alive) Equal to True))
Unit Group - Pick every unit in TempGroupA and do (Actions)
Loop - Actions
Set TempUnitC = (Picked unit)
Set TempRealA = (Current flying height of TempUnitC)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempRealA Greater than or equal to VaultHeight
TempRealA Less than or equal to (VaultHeight + 80.00)
Then - Actions
Set TempPointB = (Position of TempUnitC)
Unit - Cause TempUnitB to damage TempUnitC, dealing VaultDamage damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the VaultAttachment of TempUnitC using VaultEffects
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempUnitC is A structure) Equal to False
Then - Actions
Unit - Add Crow Form to TempUnitC
Unit - Remove Crow Form from TempUnitC
Set TempRealB = (Angle from TempPointA to TempPointB)
Set TempPointC = (TempPointA offset by TempRealE towards TempRealB degrees)
Custom script: call SetUnitX(udg_TempUnitC, GetLocationX (udg_TempPointC))
Custom script: call SetUnitY(udg_TempUnitC, GetLocationY (udg_TempPointC))
Custom script: call RemoveLocation (udg_TempPointC)
Custom script: set udg_TempIntegerB = GetHandleId( udg_TempUnitC )
Hashtable - Save Handle OfTempUnitB as 0 of TempIntegerB in HashtableVault
Hashtable - Save TempRealB as 1 of TempIntegerB in HashtableVault
Hashtable - Save TempRealA as -3 of TempIntegerB in HashtableVault
Hashtable - Save VaultKspeed as 2 of TempIntegerB in HashtableVault
Hashtable - Save VaultKpower as 3 of TempIntegerB in HashtableVault
Hashtable - Save VaultKeffects as 4 of TempIntegerB in HashtableVault
Unit Group - Add TempUnitC to GroupVault
Else - Actions
Custom script: call RemoveLocation (udg_TempPointB)
Else - Actions
Custom script: call DestroyGroup (udg_TempGroupA)
Else - Actions
-------- --------
Set TempRealE = (Load -20 of TempIntegerA from HashtableVault)
Set TempRealF = ((TempRealC - TempRealE) x VaultReform)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempRealC Not equal to TempRealD
Then - Actions
Set TempRealE = (TempRealD + TempRealF)
Else - Actions
Set TempRealE = TempRealC
Hashtable - Save TempRealE as -22 of TempIntegerA in HashtableVault
Animation - Change TempUnitA's vertex coloring to (100.00%, 100.00%, 100.00%) with TempRealE% transparency
Custom script: call RemoveLocation (udg_TempPointA)




[/trigger]
Read This

- The triggers and testmap has been redone, I NEED ANOTHER REVIEW! :D
- Don't tell me to use the "prop angle" thing, I used "Pause" intentionally.
- And please, don't comment about the font being black. Here's my reply in advance: I like it that way!

Keywords:
COOL, EYE-CANDY, vault, pokeball, container, fall, captures, knocks, unit, item, waiting, for, a, new, review
Contents

Bakabox (Map)

Reviews
16:36, 25th Oct 2012 Magtheridon96: Approved.
  • Set TempPoint[0] = (Position of Vault_TargetUnit)
  • Custom script: call SetUnitX( GetLastCreatedUnit(), GetLocationX( udg_TempPoint[0] ) )
  • Custom script: call SetUnitY( GetLastCreatedUnit(), GetLocationY( udg_TempPoint[0] ) )
  • Custom script: call RemoveLocation (udg_TempPoint[0])
->
  • Custom script: call SetUnitX(bj_lastCreatedUnit, GetUnitX(udg_Vault_TargetUnit))
  • Custom script: call SetUnitY(bj_lastCreatedUnit, GetUnitY(udg_Vault_TargetUnit))
You could also store repeating function calls (Like (Last created unit)) into variables so you wouldn't have to constantly repeat the calls over and over again.

The Vault Init function is repeating the (Key (Last created unit)) function call far too many times.
You can store this into a variable like so:
Custom script: set udg_TempInt = GetHandleId(bj_lastCreatedUnit)

You can apply this to pretty much any instance in which you're repeating something in parentheses more than once, like here:
  • Hashtable - Save Handle Of(Load 0 of (Key TempHandle) in Vault_Hashtable) as 0 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 5 of (Key TempHandle) from Vault_Hashtable) as 1 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 36 of (Key TempHandle) from Vault_Hashtable) as 2 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 37 of (Key TempHandle) from Vault_Hashtable) as 3 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 6 of (Key TempHandle) from Vault_Hashtable) as 4 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 10 of (Key TempHandle) from Vault_Hashtable) as 5 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 15 of (Key TempHandle) from Vault_Hashtable) as 6 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 38 of (Key TempHandle) from Vault_Hashtable) as 7 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 39 of (Key TempHandle) from Vault_Hashtable) as 8 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 19 of (Key TempHandle) from Vault_Hashtable) as 9 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 40 of (Key TempHandle) from Vault_Hashtable) as 10 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 41 of (Key TempHandle) from Vault_Hashtable) as 11 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 30 of (Key TempHandle) from Vault_Hashtable) as 12 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 31 of (Key TempHandle) from Vault_Hashtable) as 13 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 32 of (Key TempHandle) from Vault_Hashtable) as 14 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 33 of (Key TempHandle) from Vault_Hashtable) as 15 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
    • Hashtable - Save (Load 34 of (Key TempHandle) from Vault_Hashtable) as 16 of (Key (Load 35 of (Key TempHandle) in Vault_Hashtable)) in Vault_Hashtable
Things like this:
  • If (Vault_Count Greater than 0) then do (For each (Integer Vault_Integer) from 1 to Vault_Count, do (Hashtable - Save Handle Of(Load (50 + Vault_Integer) of (Key Vault_Handle) in Vault_Hashtable) as (50 + Vault_Integer) of (Key (Last created unit)) in Vault_Hashtable)) else do (Do nothing)
Are totally unreadable and hard to modify, we always recommend using the If blocks that execute multiple actions at all times.



  • Animation - Change (Last created unit)'s size to (Vault_SizeCurrent%, Vault_SizeCurrent%, Vault_SizeCurrent%) of its original size
does the same thing as
  • Animation - Change (Last created unit)'s size to (Vault_SizeCurrent%, 0.00%, 0.00%) of its original size
except the second one is slightly faster and shorter.
 
Level 14
Joined
Oct 8, 2012
Messages
498
ruleofiron99 said:
Please change the text colour though D:
CoLd Bon3 said:
Black text against dark background is just bad

It seems like you two don't understand its beauty.
BLACK IS COMPATIBLE OF ALL COLORS! BLACK IS GOOD! GOOD! GOOD! GOOD!
The spoilers are black, so I want the text to be black too, it merges! :p
 
Top