Warcraft III resources & community, 2003–2006 · archived

Requesting a trigger please help

3 posts
#1

Requesting a trigger please help

Can Anyone make a trigger witch allows u to get wood from a certen unit but when the unit gets destryoed it dosnt give wood like having a building give u income.. i realy would use anyones help ots a kinda import map to me..
#2
not exectly sure if it will work and you will have to modify it for your use.

Create a trigger:

aa
    Events
        Unit - A unit Finishes construction
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Triggering unit)) Equal to Farm
                (Number of units in (Units of type Farm)) Equal to 1
            Then - Actions
                Set Farm = (Last created unit)
                Trigger - Run trig 1 <gen> (ignoring conditions)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Farm is dead) Equal to True
                    Then - Actions
                        Trigger - Turn off trig 1 <gen>
                    Else - Actions
                        Do nothing


then create another one and set it so it isnt instantly on.

trig 1
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Player - Add 100 to (Owner of Farm) Current gold


hope it works... thou I really dont know :roll:
#3
Or you may do this thing:

if building not a neutral, then

every X seconds

set variable Y = 0
Action pick every unit for player 1
loop
if
picked unit-type = A
then
y=y + 1
if
picked unit-type = B
then
y=y+something more
Add y*your number gold for player1
___________

"Add y*your number gold for player1" isn't in a picke every unit action

For making it for many users , just make an array varriable ..i take always integer Y(12)