• 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.

[Trigger] Siege Tower and Invisible Platform

Status
Not open for further replies.
Level 2
Joined
Aug 15, 2011
Messages
8
I know how to get units to climb a cliff using invisible platform, but I have a small problem doing so with siege towers.

What I am trying to do is:
1. Spawn an invisible platform when a Siege tower enters a zone
2. Remove the platform when the Siege tower dies

Problem is that I have problem finding the right place to spawn the invisible platform.

  • Tower Approaching
    • Events
      • Unit - A unit enters SiegeTowerZone <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Siege Tower
    • Actions
      • Set towerLocation = ((Position of (Triggering unit)) offset by (0.00, 100.00))
      • Unit - Replace (Triggering unit) with a Siege Tower (Immobile version) using The old unit's relative life and mana
      • Destructible - Create a Invisible Platform at towerLocation facing 90.00 with scale 1.00 and variation 0
      • Custom script: call RemoveLocation(udg_towerLocation)
  • Tower Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Siege Tower (Immobile version)
    • Actions
      • Destructible - Pick every destructible in SiegeTowerZone <gen> and do (Actions)
        • Loop - Actions
          • Destructible - Remove (Picked destructible)
I have attached a small test map if that makes life easier.

Just out of curiosity, is it possible to make it so that towers can just stop at any section of the wall and spawn the invisible platform, then remove the platform when they die? I know how to get them to spawn, just that I have no idea how to pick and remove them once the tower dies. Of course the once the tower spawn the platform, they will become immobile.

Any help/advice/idea is appreciated.
 

Attachments

  • Siege Tower Test.w3x
    23.6 KB · Views: 44
Level 37
Joined
Mar 6, 2006
Messages
9,243

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Use melee time of day (for all players)
      • Hashtable - Create a hashtable
      • Set ht = (Last created hashtable)
  • Tower Approaching
    • Events
      • Unit - A unit enters SiegeTowerZone <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Siege Tower
    • Actions
      • Game - Display to Player Group - Player 1 (Red) the text: enter
      • Set towerLocation = (Position of (Triggering unit))
      • Set point2 = (towerLocation offset by 20.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Replace (Triggering unit) with a Siege Tower (Immobile version) using The old unit's relative life and mana
      • Custom script: set bj_lastCreatedDestructable = CreateDeadDestructableZ('OTip', GetLocationX(udg_point2), GetLocationY(udg_point2), GetLocationZ(udg_point2) + 135, GetUnitFacing(bj_lastReplacedUnit), 1, 0)
      • Custom script: call SaveDestructableHandle(udg_ht, GetHandleId(bj_lastReplacedUnit), 0, bj_lastCreatedDestructable)
      • Custom script: call RemoveLocation(udg_towerLocation)
      • Custom script: call RemoveLocation(udg_point2)
  • Tower Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Siege Tower (Immobile version)
    • Actions
      • Custom script: call RemoveDestructable(LoadDestructableHandle(udg_ht, GetHandleId(GetTriggerUnit()), 0))
      • Custom script: call FlushChildHashtable(udg_ht, GetHandleId(GetTriggerUnit()))


Pastebin link

One issue however remains; the cliff has pathing texture that makes units unable to pass over it. Resolve it as you see fit.
 
Status
Not open for further replies.
Top