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

Creating Trees {spawning trees that will surround a target or an area}

Status
Not open for further replies.
Level 6
Joined
Jul 10, 2016
Messages
167
Hello thanks for viewing!
I know this is a bit easy, but I cant figure it out.

How can I spawn trees at a target or an area? Like the Sprout ability of Furion (Prophet) in Dota..

Thanks in advance
 
Level 9
Joined
Apr 23, 2011
Messages
527
From the target point, create another point offset from the target by, say, 0 degrees and place a tree there. Now add it by 45 degrees and place another tree. And so on, and so on...

  • Set point[0] = (Target point of ability being cast)
  • For each (Integer loop) from 0 to 7, do (Actions)
    • Loop - Actions
      • Set facing = (0.00 + (45.00 x (Real(loop))))
      • Set point[1] = (point[0] offset by 250.00 towards facing degrees)
      • Destructible - Create a Summer Tree Wall at point[1] facing (Random angle) with scale 1.00 and variation 0
      • Set dest[loop] = (Last created destructible)
      • Custom script: call RemoveLocation(udg_point[1])
  • Custom script: call RemoveLocation(udg_point[0])
I set the destructibles to a variable so you can remove them later like Sprout. (You'd need to index the destructibles properly using an indexing system if you want the trigger to be MUI, which this trigger isn't)
 
Level 6
Joined
Jul 10, 2016
Messages
167
From the target point, create another point offset from the target by, say, 0 degrees and place a tree there. Now add it by 45 degrees and place another tree. And so on, and so on...

  • Set point[0] = (Target point of ability being cast)
  • For each (Integer loop) from 0 to 7, do (Actions)
    • Loop - Actions
      • Set facing = (0.00 + (45.00 x (Real(loop))))
      • Set point[1] = (point[0] offset by 250.00 towards facing degrees)
      • Destructible - Create a Summer Tree Wall at point[1] facing (Random angle) with scale 1.00 and variation 0
      • Set dest[loop] = (Last created destructible)
      • Custom script: call RemoveLocation(udg_point[1])
  • Custom script: call RemoveLocation(udg_point[0])
I set the destructibles to a variable so you can remove them later like Sprout. (You'd need to index the destructibles properly using an indexing system if you want the trigger to be MUI, which this trigger isn't)

Thanks sir I already +rep you and I will be honest.

Im new to triggers and im looking for tutorials to learn this trigger because I could barely understand it. And im not sure what variables to use for this one.
 
Level 6
Joined
Jul 10, 2016
Messages
167
This is the triggers I tried and it creates the trees in the middle of the map


upload_2018-6-12_12-35-32.png
 
Level 6
Joined
Jul 10, 2016
Messages
167
I tried your suggestion but still the same results.
Here's what I changed.
(Changed the slow ability to entangling roots)
upload_2018-6-12_16-16-56.png


and i tried using blink for the target point and still the same results.

upload_2018-6-12_16-18-12.png
 
Level 11
Joined
May 16, 2016
Messages
730
Hello thanks for viewing!
I know this is a bit easy, but I cant figure it out.

How can I spawn trees at a target or an area? Like the Sprout ability of Furion (Prophet) in Dota..

Thanks in advance
Here is MUI version with configurations. + Remove from the game, because dead desctuctibles can't be removed by decaying like corpses. and as consequence they load the game memory each spell use.
 

Attachments

  • I speak for the trees!.w3x
    19.5 KB · Views: 58
Status
Not open for further replies.
Top