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

Realisitc wood system required

Status
Not open for further replies.
Level 3
Joined
Apr 19, 2011
Messages
32
Good hi everybody!
Ok so, here is what i actually want to do, something complex, but realistic for my map.
A wood cutter cuts a tree down, and gets no wood.
The dead tree drops raw wood (item) that can go into the wood cutter house (building), and automatically become usefull wood (item that can be used to give 50 wood).

Another thing, is that, another type of tree would make a different raw wood that can become a different usefull wood (100 wood).
Hope you guys can help me with this one.
 
Level 9
Joined
Dec 12, 2007
Messages
489
a headline for what you try to achieve:

requires triggering, at least GUI.
1. a trigger that fires when a tree dies.
2. two variable array which contain the list of tree type available and the amount of lumber given by that tree.
3. when the tree dies, it check what kind of tree that died, and spawn an item that worth a sum of lumber respective to point 2.
 
Level 9
Joined
Dec 12, 2007
Messages
489
i believe you're the one who didn't understand fully about what i said.
so let me explain each point.

1. for the wood cutter unit, you need to make it able to attack/damage a tree, either via an ability that target/auto-target tree, or able to attack tree. this is because you can't use "Harvest" ability as they give instant bounty for the tree.

2. the trigger is there to detect when a tree died, you check if the tree died because your wood cutter or not.
if it is, your trigger is run.

3.
2. two variable array which contain the list of tree type available and the amount of lumber given by that tree.
is there because you want:
another type of tree would make a different raw wood that can become a different usefull wood (100 wood)
so your trigger will check what kind of tree that died, and return an item based on the tree type.

4. now another trigger, you check if a unit comes within range of your wood cutter house, check if that unit carry the item from point 3. if it is, remove the item from the unit, and in return give that unit another item that worth the lumber you specify based on item he bring.
 
Level 3
Joined
Apr 19, 2011
Messages
32
Ugh....... I newer understanded the arrays and varables... dark_axl, can you show me a image with the variables or umh.... i dont know!
I simply dont know anything about array variables.
 
Level 3
Joined
Apr 19, 2011
Messages
32
Ok sorry for double post, here is what i want about the saw mill.
The woodcutter gives the item to the sawmill, that has a ability that can transform the raw wood (transformed in sawmill inventory, and created/transformed in inventory) will become wood.
 
Level 9
Joined
Dec 12, 2007
Messages
489
well then, let me try make an example map...
and considering the situation, i will make it in GUI this time.

EDIT
well the example map is finished.
it largely rely on Object Editor to set some value as using GUI for these is such task to accomplish.

and the trigger for those who might interested:

  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ======The ability used to transform the raw tree into lumber ======================= --------
      • Set RWS_TRANSABIL = Transform
      • -------- ===================================================== --------
      • -------- --------
      • -------- ======The database of what tree type will react to the trigger ============ --------
      • Set RWS_TREETYPE[0] = Cityscape Summer Tree Wall
      • Set RWS_TREETYPE[1] = Cityscape Fall Tree Wall
      • Set RWS_TREETYPE[2] = Cityscape Snowy Tree Wall
      • Set RWS_TREETYPE[3] = Cityscape Winter Tree Wall
      • Set RWS_TREETYPE[4] = Ashenvale Tree Wall
      • -------- ===================================================== --------
      • -------- --------
      • -------- ====== The database of what kind of raw tree that it will generate ========== --------
      • Set RWS_RAWTREE[0] = Raw Wood (Bad)
      • Set RWS_RAWTREE[1] = Raw Wood (Not Bad)
      • Set RWS_RAWTREE[2] = Raw Wood (Normal)
      • Set RWS_RAWTREE[3] = Raw Wood (Good)
      • Set RWS_RAWTREE[4] = Raw Wood (Best)
      • -------- ===================================================== --------
      • -------- --------
      • -------- ====== The database of what item it will generate when transformed ========== --------
      • Set RWS_REALWOOD[0] = Bundle of Lumber [+1]
      • Set RWS_REALWOOD[1] = Bundle of Lumber [+5]
      • Set RWS_REALWOOD[2] = Bundle of Lumber [+10]
      • Set RWS_REALWOOD[3] = Bundle of Lumber [+50]
      • Set RWS_REALWOOD[4] = Bundle of Lumber [+100]
      • -------- ===================================================== --------
      • -------- --------
      • -------- ======Set this equal to the last index of all arrays ========== --------
      • Set RWS_MAXTREETYPE = 4
      • -------- ===================================================== --------
      • -------- --------
      • -------- ======Set this to effect path which will be played when transforming ========== --------
      • Set RWS_TEMPSFX = Abilities\Spells\Items\AIim\AIimTarget.mdl
      • -------- ===================================================== --------
      • -------- --------
  • DestroyTree
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
    • Actions
      • Set RWS_TEMPDEST = (Dying destructible)
      • Set RWS_TEMPPOINT = (Position of RWS_TEMPDEST)
      • Set RWS_DESTTYPE = (Destructible-type of RWS_TEMPDEST)
      • For each (Integer RWS_TEMPINT) from 0 to RWS_MAXTREETYPE, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RWS_DESTTYPE Equal to RWS_TREETYPE[RWS_TEMPINT]
            • Then - Actions
              • Set RWS_TEMPINT2 = RWS_TEMPINT
            • Else - Actions
      • Item - Create RWS_RAWTREE[RWS_TEMPINT2] at RWS_TEMPPOINT
      • Custom script: call RemoveLocation(udg_RWS_TEMPPOINT)
  • Transform
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to RWS_TRANSABIL
    • Actions
      • Set RWS_TEMPUNIT = (Triggering unit)
      • For each (Integer RWS_TEMPINT) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set RWS_TEMPITEM = (Item carried by RWS_TEMPUNIT in slot RWS_TEMPINT)
          • For each (Integer RWS_TEMPINT2) from 0 to RWS_MAXTREETYPE, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of RWS_TEMPITEM) Equal to RWS_RAWTREE[RWS_TEMPINT2]
                • Then - Actions
                  • Item - Remove RWS_TEMPITEM
                  • Hero - Create RWS_REALWOOD[RWS_TEMPINT2] and give it to RWS_TEMPUNIT
                  • Special Effect - Create a special effect attached to the origin of RWS_TEMPUNIT using RWS_TEMPSFX
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
 

Attachments

  • RealWoodSys.w3x
    14.5 KB · Views: 40
Last edited:
Level 3
Joined
Apr 19, 2011
Messages
32
well then, let me try make an example map...
and considering the situation, i will make it in GUI this time.

EDIT
well the example map is finished.
it largely rely on Object Editor to set some value as using GUI for these is such task to accomplish.

and the trigger for those who might interested:

  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ======The ability used to transform the raw tree into lumber ======================= --------
      • Set RWS_TRANSABIL = Transform
      • -------- ===================================================== --------
      • -------- --------
      • -------- ======The database of what tree type will react to the trigger ============ --------
      • Set RWS_TREETYPE[0] = Cityscape Summer Tree Wall
      • Set RWS_TREETYPE[1] = Cityscape Fall Tree Wall
      • Set RWS_TREETYPE[2] = Cityscape Snowy Tree Wall
      • Set RWS_TREETYPE[3] = Cityscape Winter Tree Wall
      • Set RWS_TREETYPE[4] = Ashenvale Tree Wall
      • -------- ===================================================== --------
      • -------- --------
      • -------- ====== The database of what kind of raw tree that it will generate ========== --------
      • Set RWS_RAWTREE[0] = Raw Wood (Bad)
      • Set RWS_RAWTREE[1] = Raw Wood (Not Bad)
      • Set RWS_RAWTREE[2] = Raw Wood (Normal)
      • Set RWS_RAWTREE[3] = Raw Wood (Good)
      • Set RWS_RAWTREE[4] = Raw Wood (Best)
      • -------- ===================================================== --------
      • -------- --------
      • -------- ====== The database of what item it will generate when transformed ========== --------
      • Set RWS_REALWOOD[0] = Bundle of Lumber [+1]
      • Set RWS_REALWOOD[1] = Bundle of Lumber [+5]
      • Set RWS_REALWOOD[2] = Bundle of Lumber [+10]
      • Set RWS_REALWOOD[3] = Bundle of Lumber [+50]
      • Set RWS_REALWOOD[4] = Bundle of Lumber [+100]
      • -------- ===================================================== --------
      • -------- --------
      • -------- ======Set this equal to the last index of all arrays ========== --------
      • Set RWS_MAXTREETYPE = 4
      • -------- ===================================================== --------
      • -------- --------
      • -------- ======Set this to effect path which will be played when transforming ========== --------
      • Set RWS_TEMPSFX = Abilities\Spells\Items\AIim\AIimTarget.mdl
      • -------- ===================================================== --------
      • -------- --------
  • DestroyTree
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
    • Actions
      • Set RWS_TEMPDEST = (Dying destructible)
      • Set RWS_TEMPPOINT = (Position of RWS_TEMPDEST)
      • Set RWS_DESTTYPE = (Destructible-type of RWS_TEMPDEST)
      • For each (Integer RWS_TEMPINT) from 0 to RWS_MAXTREETYPE, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RWS_DESTTYPE Equal to RWS_TREETYPE[RWS_TEMPINT]
            • Then - Actions
              • Set RWS_TEMPINT2 = RWS_TEMPINT
            • Else - Actions
      • Item - Create RWS_RAWTREE[RWS_TEMPINT2] at RWS_TEMPPOINT
  • Transform
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to RWS_TRANSABIL
    • Actions
      • Set RWS_TEMPUNIT = (Triggering unit)
      • For each (Integer RWS_TEMPINT) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set RWS_TEMPITEM = (Item carried by RWS_TEMPUNIT in slot RWS_TEMPINT)
          • For each (Integer RWS_TEMPINT2) from 0 to RWS_MAXTREETYPE, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of RWS_TEMPITEM) Equal to RWS_RAWTREE[RWS_TEMPINT2]
                • Then - Actions
                  • Item - Remove RWS_TEMPITEM
                  • Hero - Create RWS_REALWOOD[RWS_TEMPINT2] and give it to RWS_TEMPUNIT
                  • Special Effect - Create a special effect attached to the origin of RWS_TEMPUNIT using RWS_TEMPSFX
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
Nice system over there!
Yet, i thought i can configure it somehow to do this:
First, a planter plants a acorn (building), and transforms into a tree (destructible).
Yet your system fails to detect it, even if changed the setup's event (map init) to (every 2.00 second). So um, this thread is still not solved.
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
Hmm not exactly sure what your looking for. But here is an attachted map which a friend was making ages ago. You can use the system here and modify it to your needs. Well i hope it is what your asking for if not. Can you detail exactly what you want and i will create it.

-- The only difference with this system is that it only has 1 lumber item. Although that can easilly be edited. The Lumber stored trigger needs to be changed so action give 25 wood is replaced with create item Refined lumber at target unit :p
 

Attachments

  • Forest Dominion v0.4.8_1.w3x
    368.4 KB · Views: 49
Level 9
Joined
Dec 12, 2007
Messages
489
Nice system over there!
Yet, i thought i can configure it somehow to do this:
First, a planter plants a acorn (building), and transforms into a tree (destructible).
Yet your system fails to detect it, even if changed the setup's event (map init) to (every 2.00 second). So um, this thread is still not solved.

that's why its called example map, you need to expand it yourself to meet your need.
besides, why would you change the Setup's event to "Every 2.00 seconds"?

so here is my question updated,
1. does your 'acorn' building really have transforms into a tree (destructible) or just have a model of a tree?
2. why need to change the setup event into 2 seconds periodic?
is there another thing you would like to achieve?
3. and have you updated the database array in the setup trigger?

and for a notice, i've updated the sample map, cleaning leaks.
 
Level 3
Joined
Apr 19, 2011
Messages
32
that's why its called example map, you need to expand it yourself to meet your need.
besides, why would you change the Setup's event to "Every 2.00 seconds"?

so here is my question updated,
1. does your 'acorn' building really have transforms into a tree (destructible) or just have a model of a tree?
2. why need to change the setup event into 2 seconds periodic?
is there another thing you would like to achieve?
3. and have you updated the database array in the setup trigger?

and for a notice, i've updated the sample map, cleaning leaks.
1.yes, transforms into a tree, via triggers of course. It something like this: event: a unit finishes building, condition unit type of triggering unit is Acorn. unit-remove acorn, destructible-create summer tree wall at the location of triggering unit.
2.Well, i thought that would fix,by founded the created destructible, if not..... i really dont know why.
3.erm, no, i am not a variable expert.
 
Last edited:
Level 9
Joined
Dec 12, 2007
Messages
489
then i would suggest you to check this:
1. does the tree type of the 'acorn' building has been registered in the database?
#if not, then register it into the variable array, either by adding the index or change the preset value in 'Setup' trigger.

2. why you change the 'Setup' event into 2 seconds periodic?
as it is a setup which meant to run at map initialization for setting everything the system need to be working.
if you mean to allow the system to recognize that tree you "build", then i repeat:
all you need to do is register the tree type into the variable array at 'Setup' trigger.
 
Level 2
Joined
Jun 4, 2011
Messages
27
i need that:
a ogre cuts a tree down, he take the tree to the town hall (with slow speed because of the tree), and get 50 wood.
and i need it atomatic, how can i do it??

Thanks!!!
 
Level 17
Joined
Apr 3, 2010
Messages
1,101
The system which is on my previous post ladymalwil. All you do is change the units around and give the wood a Speed Aura (endurance aura) based which has a minus increase . So (Speed aura (-15%). Or simply add action set carryin units speed to x and when delivered add action set speed back to normal
 
Status
Not open for further replies.
Top