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

[JASS] script doesnt work

Status
Not open for further replies.
  • Destroy Tree
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ---------------------------------------- --------
      • -------- Creating Tree Cutter --------
      • -------- ---------------------------------------- --------
      • Set DT_Loc = (Center of (Playable map area))
      • Unit - Create 1 Peasant for Neutral Extra at DT_Loc facing Default building facing degrees
      • Set DT_Cutter = (Last created unit)
      • Unit - Hide DT_Cutter
      • Custom script: call UnitAddAbility(udg_DT_Cutter,'Aloc')
      • Custom script: call RemoveLocation(udg_DT_Loc)
      • Custom script: endfunction
      • -------- ---------------------------------------- --------
      • -------- This function checks if a destructable is a tree or not --------
      • -------- ---------------------------------------- --------
      • Custom script: function IsDestructableTree takes nothing returns boolean
      • Custom script: return IssueTargetOrderById(udg_DT_Cutter, OrderId("harvest"), udg_DT_Dest) and IssueImmediateOrderById(udg_DT_Cutter, OrderId("stop"))
      • Custom script: endfunction
      • -------- ---------------------------------------- --------
      • -------- This function destroy trees --------
      • -------- ---------------------------------------- --------
      • Custom script: function DestroyTree takes nothing returns nothing
      • Destructible - Kill DT_Dest
      • Custom script: endfunction
      • -------- ---------------------------------------- --------
      • -------- Reset --------
      • -------- ---------------------------------------- --------
      • Custom script: function InitDestroyTree takes nothing returns nothing
      • Custom script: local trigger t = GetTriggeringTrigger()
      • Custom script: call TriggerClearActions(t)
      • Custom script: call TriggerAddAction(t,function DestroyTree)
      • Custom script: call TriggerAddCondition(t,Filter(function IsDestructableTree))





I have been figuring that one,i dont know whats wrong,i just follower Mag's tips and it doesnt work.
 
Status
Not open for further replies.
Top