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

[GUI]Destroy trees system v1.2

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Destroy trees system (GUI)
by KhaosMachine

I made this system because I have not found any GUI destroy trees system, also maybe some map-makers want this system in GUI and not in vJASS or JASS.This is easily to configure, you have only to read the import and configure instructions into the map.

MAYBE THIS MAKE SOME LAG WHEN LOAD THE MAP (THIS IS BECAUSE THE ABILITY HAS 100 LEVELS)



  • @eubz for the recomendation of @D4RK_G4ND4LF's destroy trees system



  • Destroy trees system v1.1
    —More efficient
    —Now the system creates an unit at the initialization and use it for destroy the trees
    —Removed some variables, unit, ability, and changed some functions
  • Destroy trees system v1.0
    —First release

Made by
zH8Wj.png



IF ANYONE CAN POST THE TRIGGERS FOR ME, THANKS!!! (I can't because I have the software in spanish language)

Keywords:
destroy trees, destroy, destroy trees system, stun system, khaosmachine, resources, nice system, useful system, destroy circle, circle trees destroy,
Contents

DTSystem v1.2 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. July 21st 2012 Magtheridon96: Well, now you're using a much better algorithm, so this might actually be useful. One problem though, you have an extra line in there: Custom script...

Moderator

M

Moderator

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

July 21st 2012
Magtheridon96:

Well, now you're using a much better algorithm, so this might actually be useful.

One problem though, you have an extra line in there:
Custom script: call IssuePointOrderLoc(udg_TempUnit, udg_DTS_String_Order, udg_DTS_Point_TargetPoint)

This shouldn't be in there because TempUnit is specific to the testmap.

edit
maddeem suggested a much better algorithm.
Using it would get the rating up to "Useful" since no other "Tree Destroying" systems use an algorithm as efficient as this.

160036-albums4747-picture55861.png

Moderator: Pharaoh_
Date: 11:30, 18th May 2012

Review
I am afraid there is a much more efficient solution to destroying trees. You don't need 100 levels for an ability, you can loop through AoE/128 (this is the pathing of a common tree) and order the dummy to cast it x Loop times.

Nice presentation by the way (next time, consider posting the triggers as well).

Lacking
 

  • Destroy Trees System
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- |||||||||||||||||||||||||||||||||||||||||||||||||||||||XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
      • -------- CONFIGURE THE SPELL --------
      • -------- |||||||||||||||||||||||||||||||||||||||||||||||||||||||XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
      • -------- THE UNIT-TYPE OF THE DUMMY --------
      • Set DTS_UnitType_Dummy = Dummy
      • -------- THE ABILITY THAT DESTROY THE TREES --------
      • Set DTS_Ability_DestroyTrees = Destroy trees
      • -------- THE STRING ORDER OF THE ABILITY --------
      • Set DTS_String_Order = forceofnature
      • -------- |||||||||||||||||||||||||||||||||||||||||||||||||||||||XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
      • -------- CONFIGURE THE SPELL --------
      • -------- |||||||||||||||||||||||||||||||||||||||||||||||||||||||XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX||||||||||||||||||||||||||||||||||||||||||||||||||||||| --------
      • Set DTS_Point_TargetPoint = (Center of (Playable map area))
      • Unit - Create 1 DTS_UnitType_Dummy for Player 1 (Red) at DTS_Point_TargetPoint facing 0.00 degrees
      • Set TempUnit = (Last created unit)
      • Unit - Add DTS_Ability_DestroyTrees to TempUnit
      • Unit - Remove TempUnit from the game
      • Custom script: call RemoveLocation(udg_DTS_Point_TargetPoint)
      • Custom script: endfunction
      • Custom script: function DTS_Run takes nothing returns nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DTS_Real_AreaOfEffect Greater than 2000.00
        • Then - Actions
          • Game - Display to (All players) the text: The maximum radius ...
          • Set TempInteger = 2000
        • Else - Actions
      • Set TempInteger = (Integer((DTS_Real_AreaOfEffect / 20.00)))
      • Unit - Create 1 DTS_UnitType_Dummy for Neutral Hostile at DTS_Point_TargetPoint facing 0.00 degrees
      • Set TempUnit = (Last created unit)
      • Unit - Add DTS_Ability_DestroyTrees to TempUnit
      • Unit - Set level of DTS_Ability_DestroyTrees for TempUnit to TempInteger
      • Custom script: call IssuePointOrderLoc(udg_TempUnit, udg_DTS_String_Order, udg_DTS_Point_TargetPoint)
      • Unit - Add a 0.50 second Generic expiration timer to TempUnit
      • Custom script: call RemoveLocation(udg_DTS_Point_TargetPoint)



  • Example
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set TempUnit = Paladin 0001 <gen>
      • Set DTS_Real_AreaOfEffect = ActualRadius
      • Set DTS_Point_TargetPoint = (Position of TempUnit)
      • Custom script: call ExecuteFunc("DTS_Run")


Comments:

Well, what I first noticed was that you're controlling it using force of nature, which does work I suppose, but isn't the traditional method for destroying trees, because it doesn't actually detect that a tree is there, just gets rid of it if there is. Also this setup isn't the most useful (even if it is 4 functions to control it) Becuase your radius of the actual ability, is determined by object data levels for such an ability.

The traditional method:

Using a peasant to detect trees by matching commands and then doing as you want with the tree you've found Is mroe useful generally speaking, and already exists in the help sections when people don't know how to do it, and requires even less triggering than this does. For example:

Say you have a spell which needs to destroy trees in a given area:

You pick all the destructibles within (radius) of (Point)
- Set TempDestuct = (Picked destructible)
- Run (Trigger)

Other Trigger:

Order (Tree Checker) to (right click) (TempDestuct)
If then else
- Conditions
- - Current order of (Tree Checker) = "harvest"
- Actions
- - Kill (TempDestruct)

That should give you the basic gist of what I mean, in eithercase, it's longer than it needs to be, since all you actually need is to use this traditional order detection to do it. However setting the system to this would cause it to become too simple. Obviously (Tree Checker) has been created in another trigger which runs at map init, and is a peasant. (Which is invulnerable, hidden, etc.)

Edit: For the record, it could also be a function which is called, and have the peasant creation/setup in the same trigger as where the function is.
 
That's actually a nice method, and I would totally use it for my maps, but it would require the user to re-register destructables he creates during the game (you know, trees respawning for example :p)

Actually if you were referring to my post I meant the coder would do save all tree types into a hashtable like this:
JASS:
call SaveInteger(hashtable,'tree',0,1)
Then you load based off the destructible ID to check whether its a tree or not
JASS:
if LoadInteger(hashtable,ID,0)=1 then
 
Top