Reproducing tree's

WackO_WilL

New Member
Reaction score
4
I am Making a viking map where tree's Will be used Through out the entire game, Youll never Get enough tree's. So i need some way. To make tree's appear, In a random direction, Around a random tree, Of the same typ, (Using 3 different trees) to appear.

This is what i have sofar.
Events
Time - Every 3.00 seconds of game time
Actions
Destructible - Create a Winter Tree Wall at ((Position of (Random destructible in (Entire map) matching ((Destructible-type of (Random destructible in (Entire map))) Equal to Winter Tree Wall))) offset by (3.00, 3.00)) facing (Random angle) with scale 1.00 and variation 0

That one really hurt my mind, Its super long. ANyways. It doesn't Work at all. But i know that you can some how do this, What i need is something like

Actions-
Every 3 seconds.
Results-
Select a random tree equal to Winter Tree wall
Create a Winter tree wall (Random variation) In a random spot Around the selected destructible, between 3 to 6 Feet.

I don't know howlarge a Warcraft III UNit is, If you answear this, Can you tell me a nice intinger for a tree that is 1.80-2.20 Scale? Thank you in advanced.
 

Nigerianrulz

suga suga how'd you get so fly?
Reaction score
198
a little note: Next time when you post your trigger post them with the # CODE so it would be more easier to read:)

Code:
Events
Time - Every 3.00 seconds of game time
Conditions - 
Actions - Destructible - Create a Winter Tree Wall at ((Position of (Random destructible in (Entire map) offset by (3.00, 3.00)) facing (Random angle) with scale 1.00 and variation 0

i dont think WE can create a tree next to the same type to be exact (Thats beocz i dont WE) but you can make a region where a type of trees will be there and create trees there, or make smaller ones everywhere buts thats my opion its your choice
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Code:
Grow Trees
    Events
        Time - Every 3.00 seconds of game time
    Conditions
    Actions
        Set MaxNewTrees = 3
        Destructible - Pick every destructible in (Playable map area) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        MaxNewTrees Greater than 0
                        (Destructible-type of (Picked destructible)) Equal to Snowy Tree Wall
                    Then - Actions
                        Set MaxNewTrees = (MaxNewTrees - 1)
                        Set Point1 = (Position of (Picked destructible))
                        Set Point2 = (Point1 offset by (Random real number between 150.00 and 300.00) towards (Random angle) degrees)
                        Destructible - Create a Snowy Tree Wall at Point2 facing (Random angle) with scale (Random real number between 0.80 and 1.50) and variation (Random integer number between 0 and 9)
                        Animation - Play (Last created destructible)'s birth animation
                        Custom script:   call RemoveLocation( udg_Point1 )
                        Custom script:   call RemoveLocation( udg_Point2 )
                    Else - Actions

Though this has the potential to grow a lot of trees... up to filling the entire map actually.
 

WackO_WilL

New Member
Reaction score
4
Thank you somuch :D This is the best website <3
Also The tree's are actually very few, And the map size is the largest, SO you have to situate your town, Just right, Production of things made from wood, Increase toomuch = Deforresting. I needed growing tree's to keep the game going.

I have a problem, I cant seem to find SET, Under the WE Commands. I searched for Set Point, and Set, But didn't find it.

Oooh, I see. This has to do with Variables... I never learned how to use Variables. I am so lost right now D:
Code:
Events
    Time - Every 3.00 seconds of game time
Actions
    Set MaxNewTrees = 3
    Destructible - Pick every destructible in (Playable map area) and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    MaxNewTrees Greater than 0
                    (Destructible-type of (Last created destructible)) Equal to Winter Tree Wall
                Then - Actions
                    Set Point1 = (Position of (Last created destructible))
                    Set Point2 = ((Point1 offset by ((Random real number between 150.00 and 300.00), 0.00)) offset by ((Random angle), 0.00))
                    Destructible - Create a Winter Tree Wall at (Point2 offset by (0.00, 0.00)) facing (Random angle) with scale (Random real number between 1.80 and 2.20) and variation (Random integer number between 0 and 9)
                    Animation - Play (Last created destructible)'s Birth animation
                    Custom script:   Call RemoveLocation (udg_point1)
                    Custom script:   Call RemoveLocation (udg_point2)
                Else - Actions
This is as close as i could get, But Call Removelocation causes an Error. What do i fix about it?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
JASS is case sensitive.
If your variable is called "Point1", you must use "udg_Point1" in the custom script line. "udg_point1" doesn't work...

"Call" should be "call" btw.
 

WackO_WilL

New Member
Reaction score
4
Thank you somuch, I didn't realise it was, And to tell you the truth, first time withing with variables, And a Trigger that branches like this, And first time using Custom script, But i learned somuch from you, Thank you somuch

Now, I seem to have a problem, IN game. It does nothing. I have 1 tree on the feild for testing. But it sits there. Nothing happens, Why?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Set Point2 = (Point1 offset by (Random real number between 150.00 and 300.00) towards (Random angle) degrees)

Set variable,
point with polar offset.

> Destructible - Create a Snowy Tree Wall at Point2 facing (Random angle) with scale (Random real number between 0.80 and 1.50) and variation (Random integer number between 0 and 9)

This uses "point", not point with any kind of offset.
 

WackO_WilL

New Member
Reaction score
4
Hmmm. I have everything set right? I check it in game, And nothing happens. The shadow doesn't even darken.

Code:
Events
    Time - Every 3.00 seconds of game time
Actions
    Set MaxNewTrees = 3
    Destructible - Pick every destructible in (Playable map area) and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    MaxNewTrees Greater than 0
                    (Destructible-type of (Last created destructible)) Equal to Winter Tree Wall
                Then - Actions
                    Set Point1 = (Position of (Last created destructible))
                    Set Point2 = (Point1 offset by (Random real number between 150.00 and 300.00) towards (Random angle) degrees)
                    Destructible - Create a Winter Tree Wall at Point2 facing (Random angle) with scale (Random real number between 1.80 and 2.20) and variation (Random integer number between 0 and 9)
                    Animation - Play (Last created destructible)'s Birth animation
                    Custom script:   call RemoveLocation( udg_Point1 )
                    Custom script:   call RemoveLocation( udg_Point2 )
                Else - Actions

The Variables are, Point 1 and 2 = Points and MaxNewtree = INtiger right?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> (Destructible-type of (Last created destructible)) Equal to Winter Tree Wall

This should use "picked destructible", not "last created".

> Set Point1 = (Position of (Last created destructible))

This too.


> with scale (Random real number between 1.80 and 2.20)

That's very big, try with less, like 0.8 - 1.2.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
You could create a new doodad based off of a tree and just increase its scaling value under Art - Scaling Value, then put that new doodad in your trigger.
 

WackO_WilL

New Member
Reaction score
4
Its cool, I just increased the Destructible Scale size, 1 Whole up. Also i just Redon my trigger, but it still doesn't work. Ill check it out in the morning, I Tired!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top