• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Bunker System 1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.

[trigger=Bunker Setting]Bunker Setting
Events
Map initialization
Conditions
Actions
Set Bunker_Max = 3
Set Bunker_UnitInvis = False
Set Bunker_UnitHeight = 200.00
Set Bunker_UnitType[1] = Marine
Set Bunker_UnitDummy[1] = Marine [Bunker Dummy]
Set Bunker_UnitType[2] = Flame Thrower
Set Bunker_UnitDummy[2] = Flame Thrower [Bunker Dummy]
Set Bunker_UnitType[3] = Grenadier
Set Bunker_UnitDummy[3] = Grenadier [Bunker Dummy]
[/trigger]
[trigger=Bunker CV]Bunker CV
Events
Map initialization
Conditions
Actions
Set TempGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to (==) Scout Tower) or ((Unit-type of (Matching unit)) Equal to (==) Scout Tower 10)))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set Bunker_CV = (Bunker_CV + 1)
Unit - Set the custom value of (Picked unit) to Bunker_CV
Set Bunker_Unit[Bunker_CV] = (Picked unit)
Set Bunker_UnitGroup[Bunker_CV] = (Create Unit Group)
Custom script: call DestroyGroup(udg_TempGroup)
[/trigger]
[trigger=Bunker CV2]Bunker CV2
Events
Unit - A unit enters (Playable map area)
Conditions
Multiple ConditionsOr - Any (Conditions) are true
Conditions
(Unit-type of (Entering unit)) Equal to (==) Scout Tower
(Unit-type of (Entering unit)) Equal to (==) Scout Tower 10
Actions
Do Multiple ActionsFor each (Integer TempInteger) from 1 to (Bunker_CV + 1), do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Bunker_Unit[TempInteger] Equal to (==) No unit
Then - Actions
Unit - Set the custom value of (Entering unit) to TempInteger
Set Bunker_Unit[TempInteger] = (Entering unit)
Set Bunker_UnitGroup[TempInteger] = (Create Unit Group)
Custom script: exitwhen true
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempInteger Greater than (>) Bunker_CV
Then - Actions
Set Bunker_CV = (Bunker_CV + 1)
Unit - Set the custom value of (Entering unit) to Bunker_CV
Set Bunker_Unit[Bunker_CV] = (Entering unit)
Set Bunker_UnitGroup[Bunker_CV] = (Create Unit Group)
Else - Actions
[/trigger]
[trigger=Bunker Load]Bunker Load
Events
Unit - A unit Is loaded into a transport
Conditions
Multiple ConditionsOr - Any (Conditions) are true
Conditions
(Unit-type of (Transporting unit)) Equal to (==) Scout Tower
(Unit-type of (Transporting unit)) Equal to (==) Scout Tower 10
Actions
Do Multiple ActionsFor each (Integer TempInteger) from 1 to Bunker_Max, do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to (==) Bunker_UnitType[TempInteger]
Then - Actions
Set TempPoint = (Position of (Transporting unit))
Set TempPoint2 = (TempPoint offset by (Random real number between 0.00 and 30.00) towards (Random angle) degrees)
Unit - Create 1 Bunker_UnitDummy[TempInteger] for (Owner of (Triggering unit)) at TempPoint2 facing 90.00 degrees
Unit Group - Add (Last created unit) to Bunker_UnitGroup[(Custom value of (Transporting unit))]
Animation - Change (Last created unit) flying height to Bunker_UnitHeight at 0.00
If (Bunker_UnitInvis Equal to (==) True) then do (Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency) else do (Do nothing)
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call RemoveLocation(udg_TempPoint2)
Custom script: exitwhen true
Else - Actions
[/trigger]
[trigger=Bunker Attack]Bunker Attack
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to (==) Attack [Bunker]
Actions
Unit Group - Pick every unit in Bunker_UnitGroup[(Custom value of (Casting unit))] and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Stop
Unit - Order (Picked unit) to Attack (Target unit of ability being cast)
[/trigger]
[trigger=Bunker Stop]Bunker Stop
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to (==) Stop [Bunker]
Actions
Unit Group - Pick every unit in Bunker_UnitGroup[(Custom value of (Casting unit))] and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Stop
[/trigger]
[trigger=Bunker Unload Single]Bunker Unload Single
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Issued order) Equal to (==) Unload
Multiple ConditionsOr - Any (Conditions) are true
Conditions
(Unit-type of (Ordered unit)) Equal to (==) Scout Tower
(Unit-type of (Ordered unit)) Equal to (==) Scout Tower 10
Actions
Do Multiple ActionsFor each (Integer TempInteger) from 1 to Bunker_Max, do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Target unit of issued order)) Equal to (==) Bunker_UnitType[TempInteger]
Then - Actions
Set TempGroup = (Units owned by (Owner of (Target unit of issued order)) matching (((Unit-type of (Matching unit)) Equal to (==) Bunker_UnitDummy[TempInteger]) and (((Matching unit) is in Bunker_UnitGroup[(Custom value of (Ordered unit))]) Equal to (==) True)))
Set TempGroup2 = (Random 1 units from TempGroup)
Unit Group - Pick every unit in TempGroup2 and do (Actions)
Loop - Actions
Unit Group - Remove (Picked unit) from Bunker_UnitGroup[(Custom value of (Ordered unit))]
Unit - Remove (Picked unit) from the game
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: call DestroyGroup(udg_TempGroup2)
Custom script: exitwhen true
Else - Actions
[/trigger]
[trigger=Unload All]Unload All
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to (==) Unload [Bunker]
Multiple ConditionsOr - Any (Conditions) are true
Conditions
(Unit-type of (Ordered unit)) Equal to (==) Scout Tower
(Unit-type of (Ordered unit)) Equal to (==) Scout Tower 10
Actions
Unit Group - Pick every unit in Bunker_UnitGroup[(Custom value of (Casting unit))] and do (Actions)
Loop - Actions
Unit Group - Remove (Picked unit) from Bunker_UnitGroup[(Custom value of (Casting unit))]
Unit - Remove (Picked unit) from the game
[/trigger]
[trigger=Bunker Dead]Bunker Dead
Events
Unit - A unit Dies
Multiple ConditionsOr - Any (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Equal to (==) Scout Tower
(Unit-type of (Dying unit)) Equal to (==) Scout Tower 10
Actions
Unit Group - Pick every unit in Bunker_UnitGroup[(Custom value of (Dying unit))] and do (Actions)
Loop - Actions
Unit Group - Remove (Picked unit) from Bunker_UnitGroup[(Custom value of (Dying unit))]
Unit - Remove (Picked unit) from the game
Custom script: call DestroyGroup(udg_Bunker_UnitGroup[GetUnitUserData(GetDyingUnit())])
Set Bunker_Unit[(Custom value of (Dying unit))] = No unit
Unit - Set the custom value of (Dying unit) to 0
[/trigger]


Keywords:
Bunker,Garisoned,System,Tower
Contents

Bunker System by silvermoon1998 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Bunker System 1.0 | Reviewed by Maker | 21th Jul 2013 NEEDS FIX Don't use hard coded unit types Don't modify custom values Use either the normal World Editor or JNGP...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.


Bunker System 1.0 | Reviewed by Maker | 21th Jul 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • Don't use hard coded unit types
  • Don't modify custom values
  • Use either the normal World Editor or JNGP
  • You should have support for different bunker heights
126248-albums6177-picture66524.png
[tr]
 
Top