• Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 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.
  • 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!

Tree Revival System [Reviewed: Ralle]

Level 6
Joined
Mar 17, 2008
Messages
150
Tutorial by: SkyTainted or underscore and

DieHard@Azeroth


INTRODUCTION: Hi, this is my

third tutorial and the topic is tree revival system. Tree

Revival occurs when you chop down or put down a tree. In a

matter of seconds the tree grows back. I guess Keeper of the

Grove got angry. Let's Start!

Part One: Variables
Before we're going to create triggers, let's create

variables. We only need one variable for this type of

tutorial.
1.)"Variable Name"=Real
We're done! I labeled mine "TreeReviveInt" and made it into

a real variable.

Part Two:Trigger One
Trigger one is the initialization. In this trigger, we're

going to use the variable we just created now. The variable

sets the time in which the tree will revive.
For the event:
  • Events
    • Map initialization
That seemed easy. Now we use the trigger, Go to

General-->Set Variables then click on the variable we just

created. Now for the value, we set it to "time you want to

revive trees"
For the actions:
  • Actions
    • -------- Set the time you want to revive the trees
  • --------
    • Set TreeReviveInt = 5.00
For the other actions, this means that the system must know

what type of trees you're going to chop down. It's very

simple so I'll just post it up..
For the continuing actions:
  • 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
      • Or - Any (Conditions) are true
        • Conditions
          • (Destructible-type of (Picked
  • destructible)) Equal to Ashenvale Tree Wall ----Take that
  • for example----
  • (Create more Tree types.)
That's just the example, you'll know all types when you test

the map.
For the Then-actions, we're going to add the trees that you

just put to the revival trigger.
For the Then-Actions:
  • Then - Actions
    • Trigger - Add to ReviveTrees <gen> the event
  • (Destructible - (Picked destructible) dies)
You're done with the First Trigger!

Part Three: Second Trigger
For the second trigger, you might be able to do this on your

own.
For the actions, we're going to use the variable time in the

General-->Wait. So it could know when it will revive. The

other action revives the tree without question. I'll post it

up for you.
For the Actions:
  • Actions
    • Wait TreeReviveInt seconds
    • Destructible - Resurrect (Dying destructible) with
  • 1000000000.00 life and Show birth animation

FINISH!
 
Last edited:
Level 19
Joined
Nov 16, 2006
Messages
2,165
It confuses me when I look at it.
Try to split things up and set them in 'chapters'.
Then, also try to explain things with a little more information, noobs will get stuck on some parts.
It would also be smart adding the end result (trigger) and a map attachment which contains the trigger (and is working for 100%).

And please do not double post,
we will look into it whenever we have time.


P.S: Did you checked out this thread?
 
Level 8
Joined
May 7, 2007
Messages
278
It is a good thread but you dont need to do:

this is a test this is

a test. this is a test. this

is a test.

Cleaned up:

This is a test. This is a test. This is a test

_____________________________________

You should keep it in a line instead of pressing enter every few words, makes it easier to read.

Other than that this is a very good tutorial.
 
Level 6
Joined
Mar 17, 2008
Messages
150
ehm, doesnt the (Dying destructible) need to be local? since else i could chop down two trees at the same time and only one would be ressurected?

Isn't local a jass function or something like that? A variable maybe.. or was that globals... uhhh.... I'm a jass noob.

No, what he means is remove the random linebreaks everywhere.

I'm embarrassed..... Ha-Ha! Thanks anyways!

@Razorbrain
Good luck on the finishing of your map!
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
Isn't local a jass function or something like that? A variable maybe.. or was that globals... uhhh.... I'm a jass noob.



I'm embarrassed..... Ha-Ha! Thanks anyways!

@Razorbrain
Good luck on the finishing of your map!
to localize something, you will require JASS, but you can do it in GUI too with a Custom script

simply do this
  • Events
  • Conditions
  • Actions
    • Custom script: local destructible udg_Destruct
    • Set Destruct = (Dying desctructible)
    • Wait for TempReviveInt seconds
    • Destructible - Revive Destruct
or atleast that is how i think it works. Im not sure that destructible is the right name for the local script, but anyhow

thanks anyway about the map. For some reason i always found a bug or a fault with the map when i was testing it, but now its done. Have started working on 3.0 already :p
 
Top