• 🏆 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!

[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