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

Building targetted as Tree?

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2007
Messages
201
I want to be able to build trees in my map, but not the literal destructible tree but a unit that simply looks like a tree and is targeted in every way like a tree, but selectable and able to be owned by a team.

I figured it would be as simple as setting it's classification to Tree and target type to Tree, but for some reason, Peasants and Siege Weapons (Demolishers, etc) can't target it, even though they have tree targetting attacks. How do I make my building targetable by only the usual tree destroying units? Right now with it targeted and classified as tree, when you click on it to target it, the click goes right through as if I was clicking the ground, but on an actual tree it makes the tree flash a little and then the unit begins attacking it.

EDIT: Idea: Make the building completely untargettable by attacks, and when it's built, add a pathable tree destructible over it. Then when that tree takes damage, pick the nearest unit that is like 0 units away and damage it an equal amount. I'll try this for now as a hack around. My only worry about this is that the placed tree will be harvestable for lumber, I'd like to avoid that.

EDIT EDIT: I'm having A LOT of trouble making the model even appear so much as make a custom destructible.

MORE EDIT: I got the modeling working fine, but anything that is targeted as Tree you can harvest from. Is there any way to make it so peasants only damage it and don't actually gather wood off of my fake tree?
 
Last edited:
Level 3
Joined
Jul 22, 2004
Messages
18
Having a similar problem

I'm having a similar problem. I'm having trouble with attacks. I want to give a unit a special attack that only targets a specific unit. So i enable both attacks, and set attack #2 to target "tree". Then I go to the unit i want it to target and make it targeted as "tree". But i can't attack the target. I can shoot ACTUAL trees all day long, but the "tree" target attack won't hit the targetted as "Tree" unit.

I've tried changing the attack (and unit to be hit) to target ward, wall, ancient, tauren, etc, with no result. What good is the "targetted as" field in the object editor if it doesn't actually allow you to target the unit as though it were that object? anyone have any thoughts/fixes?

Edit: Or maybe here's a better way to solve it. Is there some way to trigger an event to fire when a destructible is attacked? (not destroyed, just attacked.)
 
Last edited:
Level 19
Joined
Feb 25, 2009
Messages
2,004
Attack #1 = for units
Attack #2 = for trees
But don't forget to enable the both attacks so the unit can use them.

Use the already done units as an example, just copy/paste them, and change the specified values (damage/life/mana etc..) and try like that...

From your post the only thing I understand is that you want a building that look like a tree and it can be targeted only by specified units.. hm.. why not try to make that building an "Ancient" and allow the units to attack "Ancients"... I think that will be the easier way.

MORE EDIT: I got the modeling working fine, but anything that is targeted as Tree you can harvest from. Is there any way to make it so peasants only damage it and don't actually gather wood off of my fake tree?

Remove the "Harvest" ability from the Peasant, that should disallow them to gather woods and only to attack the tree.
 
Level 3
Joined
Jul 22, 2004
Messages
18
Yup.

Yeah, i think you misunderstood - I tried that, and it didn't work.

Here was my process:
1) On attacker unit, enable both attacks
2) Set attack 1 to target ground, structure, debris, air, item, ward
3) Set attack 2 to target tree

4) On "attackee" unit, set the "combat - targeted as" field to tree
5) On "attackee", set the "stats - unit classification" field to tree

Then I load up my map. First thing i do is try to attack an actual tree. So far so good. attack 2 is working like a charm.

Then I try to attack my "attackee" unit, but like madmuffin also saw, the click "lands" on the ground (red arrow animation as though i had issued and attack/move order). My attacker walks over and stands next to the attackee and does nothing.

I've tried doing this process, but substituting other unit classifications into steps 3, 4, and 5 to no avail. same result each time. If I set the classification to bridge, i can attack real bridges all day long, but my "dummy" bridge remains untargetable.
 
Level 5
Joined
Oct 18, 2009
Messages
149
Just change the properties of the building and switch "Targeted as : " and change it to tree. That should do it, but you need to set how much lumber it gives (Althought I may be wrong at this part)
 
Level 9
Joined
Oct 22, 2006
Messages
599
Just change the properties of the building and switch "Targeted as : " and change it to tree. That should do it, but you need to set how much lumber it gives (Althought I may be wrong at this part)

:grin:ROFL:xxd:

- On to the point, I had something like that problem, but it's solved somehow.. I used a building and modified it to be a Grave.
Targeted as: Ward
Is a Building: False
Unit Classification: <empty>


Although I am using an ability instead of simple attack. So my ability has this:
Targets Allowed: Friends, Ward

So I guess mayby you could try adding Neutral/Friends? If that doesn't work try disabling the building thingy. If nothing works then we'll reach to the conclusion that abilities work, while attacks don't?
 
Status
Not open for further replies.
Top