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

Requesting a trigger please help

Status
Not open for further replies.
Level 2
Joined
Jul 6, 2004
Messages
28
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..
 
not exectly sure if it will work and you will have to modify it for your use.

Create a trigger:

Code:
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.

Code:
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:
 
Level 9
Joined
Nov 27, 2004
Messages
465
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)
 
Status
Not open for further replies.
Top