HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Killing Trees?

02-14-2007, 04:31 AM#1
notor
here is my trig, that doesn't work. I want to reward the player for felling a tree. Thing is... it looks like the person who fells a tree is not considered the Killing Unit? hmmmmmmmm

Trigger:
LumberHarvest
Collapse Events
Destructible - A destructible within (Playable map area) dies
Collapse Conditions
(Destructible-type of (Dying destructible)) Equal to Summer Tree Wall
Collapse Actions
Player - Add 1000 to (Owner of (Killing unit)) Current lumber
Game - Display to (All players) the text: Lumberjacks recieve...
Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + killed a tree)
02-14-2007, 08:08 AM#2
Av3n
Killing unit has nothing to do with destrutables, Make it an pain and use units if you want it to work. Or modify the lumber abilty and detructable to 1000 hp and max lumber to 1000. Then use dying destructable to say an tree has been felled

-Av3n
02-14-2007, 10:06 AM#3
The)TideHunter(
Trigger:
Events
Destructible - A destructible within (Playable map area) dies

That event is your problem.
If you read what it says:
Quote:
Originally Posted by World Editor
Only the first 64 destructables within the region when this event is registered are monitored for death. It is best to use this event for regions containing only a few destructables

So if you have hundreds of trees (which i think you will if your making a tree-killing map), then the chances of you killing a tree that is registered for this is very slim.
What i suggest is using the Eat Tree ability instead of attack, that way, you can use a trigger like this:
Trigger:
LumberHarvest
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Eat Tree
Collapse Actions
Player - Add 1000 to (Owner of (Triggering unit)) Current gold
Game - Display to (All players) the text: Lumberjacks recieve...
Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + killed a tree.)
02-14-2007, 12:11 PM#4
Vexorian
Quote:
Originally Posted by The)TideHunter(
Trigger:
Events
Destructible - A destructible within (Playable map area) dies

That event is your problem.
If you read what it says:


So if you have hundreds of trees (which i think you will if your making a tree-killing map), then the chances of you killing a tree that is registered for this is very slim.
What i suggest is using the Eat Tree ability instead of attack, that way, you can use a trigger like this:
Trigger:
LumberHarvest
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Eat Tree
Collapse Actions
Player - Add 1000 to (Owner of (Triggering unit)) Current gold
Game - Display to (All players) the text: Lumberjacks recieve...
Game - Display to (All players) the text: ((Name of (Owner of (Triggering unit))) + killed a tree.)
Nah.

Just have a trigger at map initialization that picks all the trees in playable map area and adds a destructable dies event for picked destructable.

Last time I checked, killing unit did work with the destructable death event.