question

velnias

New Member
Reaction score
13
how to make this trigger shorter

now:
Code:
P1 Growing40
    Events
        Unit - A unit enters RED <gen>
    Conditions
        (Owner of (Entering unit)) Equal to Player 12 (Brown)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 40
            Then - Actions
                Unit - Set life of (Entering unit) to 50.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 39
            Then - Actions
                Unit - Set life of (Entering unit) to 51.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 38
            Then - Actions
                Unit - Set life of (Entering unit) to 52.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 37
            Then - Actions
                Unit - Set life of (Entering unit) to 53.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 36
            Then - Actions
                Unit - Set life of (Entering unit) to 54.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 35
            Then - Actions
                Unit - Set life of (Entering unit) to 55.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 34
            Then - Actions
                Unit - Set life of (Entering unit) to 56.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 33
            Then - Actions
                Unit - Set life of (Entering unit) to 57.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 32
            Then - Actions
                Unit - Set life of (Entering unit) to 58.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 31
            Then - Actions
                Unit - Set life of (Entering unit) to 59.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 30
            Then - Actions
                Unit - Set life of (Entering unit) to 60.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 29
            Then - Actions
                Unit - Set life of (Entering unit) to 61.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 28
            Then - Actions
                Unit - Set life of (Entering unit) to 62.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 27
            Then - Actions
                Unit - Set life of (Entering unit) to 63.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 26
            Then - Actions
                Unit - Set life of (Entering unit) to 64.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 25
            Then - Actions
                Unit - Set life of (Entering unit) to 65.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 24
            Then - Actions
                Unit - Set life of (Entering unit) to 66.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 23
            Then - Actions
                Unit - Set life of (Entering unit) to 67.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 22
            Then - Actions
                Unit - Set life of (Entering unit) to 68.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 21
            Then - Actions
                Unit - Set life of (Entering unit) to 69.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 20
            Then - Actions
                Unit - Set life of (Entering unit) to 70.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 19
            Then - Actions
                Unit - Set life of (Entering unit) to 71.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 18
            Then - Actions
                Unit - Set life of (Entering unit) to 72.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 17
            Then - Actions
                Unit - Set life of (Entering unit) to 73.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 16
            Then - Actions
                Unit - Set life of (Entering unit) to 74.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 15
            Then - Actions
                Unit - Set life of (Entering unit) to 75.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 14
            Then - Actions
                Unit - Set life of (Entering unit) to 76.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 13
            Then - Actions
                Unit - Set life of (Entering unit) to 77.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 12
            Then - Actions
                Unit - Set life of (Entering unit) to 78.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 11
            Then - Actions
                Unit - Set life of (Entering unit) to 79.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 10
            Then - Actions
                Unit - Set life of (Entering unit) to 80.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 9
            Then - Actions
                Unit - Set life of (Entering unit) to 81.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 8
            Then - Actions
                Unit - Set life of (Entering unit) to 82.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 7
            Then - Actions
                Unit - Set life of (Entering unit) to 83.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 6
            Then - Actions
                Unit - Set life of (Entering unit) to 84.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 5
            Then - Actions
                Unit - Set life of (Entering unit) to 85.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 4
            Then - Actions
                Unit - Set life of (Entering unit) to 86.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 3
            Then - Actions
                Unit - Set life of (Entering unit) to 87.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 2
            Then - Actions
                Unit - Set life of (Entering unit) to 88.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                P1_Lives Equal to 1
            Then - Actions
                Unit - Set life of (Entering unit) to 89.00%
            Else - Actions

i want that it would be like for every -1 lives +1% hp to next waves life points
 

Grymlax

Probably not around
Reaction score
138
will this trigger do?

Code:
P1 Growing40
    Events
        Unit - A unit enters RED <gen>
    Conditions
        (Owner of (Entering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Set life of (Entering unit) to (90.00 - P1_Lives)%
 

Stefanman

Member
Reaction score
10
confusing

it is confusing you code (makes no sense) ,write what you want to have in triger.u want that for some TD?
 

velnias

New Member
Reaction score
13
mm good idea but wont work :/
dont know why

EDIT:i want make this trigger
Code:
P1 Growing40
shorter.
 

Pineapple

Just Smile.
Reaction score
576
Unit enters region

(Owner of (Entering unit)) Equal to Player 12 (Brown)

Set life of (Entering unit) to real(90-LIFES)%

This should work.

the real is convert Integer to Real.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top