Making a unit invulerable for 10 seconds

TooSlowFcker

New Member
Reaction score
10
hey i want this dummy unit to cast this spell on the guy who rescues everone, but it doesn't work >.<
heres the trigger
Code:
Untitled Trigger 003 Copy
    Events
        Unit - A unit enters Starting Pointss <gen>
    Conditions
        (Unit-type of (Triggering unit)) Equal to YOUR SLAVE BIATCH
        (Number of units in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Wisp))) Greater than or equal to 1
    Actions
        Set red = (Number of players in PlayerGroupJail)
        Unit Group - Pick every unit in wispunitgroup and do (Unit - Kill (Picked unit))
        Unit - Create 1 dummy unit 3000 for (Triggering player) at (Center of Starting Pointss <gen>) facing Default building facing degrees
        Unit - Order (Last created unit) to Orc Shaman - Lightning Shield (Triggering unit)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Player Group - Pick every player in PlayerGroupJail and do (Actions)
            Loop - Actions
                Player - Add 25 to (Owner of (Triggering unit)) Current gold
                Unit - Create 1 YOUR SLAVE BIATCH for (Picked player) at (Random point in Starting Pointss <gen>) facing Default building facing degrees
                Hero - Create divine potion and give it to (Last created unit)
                Set item = (Last created item)
                Hero - Order (Last created unit) to use item
        Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
        Player Group - Pick every player in PlayerGroupJail and do (Player Group - Remove (Picked player) from PlayerGroupJail)
        Camera - Pan camera for (Owner of (Last created unit)) to (Position of (Last created unit)) over 1.00 seconds
        For each (Integer A) from 1 to red, do (Game - Display to (All players) the text: |c00ff03032|r|c00ff...)
second trigger
Code:
Untitled Trigger 028
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Lightning Shield 2000
    Actions
        Unit - Make (Targeted unit) Invulnerable
        Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\NightElf\Rejuvenation\RejuvenationTarget.mdl
        Wait 10.00 seconds
        Unit - Make (Targeted unit) Vulnerable
 

Tyman2007

Ya Rly >.
Reaction score
74
Change Unit - A unit Begins casting an ability
To Unit - A unit starts the effect of an ability

Change (Targeted unit)
To (Target unit of ability being cast)
 

DrEvil

FCRI Associate!
Reaction score
111
Here we go , i just made this trigger fresh for you , if you need help configuring just ask .

Code:
Invulnerable
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
         Ability Here 
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        InvulnerableUnit[(Integer A)] Equal to No unit
                    Then - Actions
                        Set InvulnerableUnit[(Integer A)] = (Triggering unit) / or target of ability 
                        Set InvulnerableTime[(Integer A)] = 10
                        Unit - Make InvulnerableUnit[(Integer A)] Invulnerable
                        SKIP THE REST HERE
                    Else - Actions
Code:
Invulnerable Timer
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        InvulnerableUnit[(Integer A)] Not equal to No unit
                    Then - Actions
                        Set InvulnerableTime[(Integer A)] = (InvulnerableTime[(Integer A)] - 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                InvulnerableTime[(Integer A)] Equal to 0
                            Then - Actions
                                Unit - Make InvulnerableUnit[(Integer A)] Vulnerable
                                Set InvulnerableUnit[(Integer A)] = No unit
                            Else - Actions
                    Else - Actions

InvulnerableUnit - unit array 100
InvulnerableTime - integer array 100
 

TooSlowFcker

New Member
Reaction score
10
im still not invulnerable, ill put the entire trigger up if that helps
wow thats really long lol. thanks, it looks hard but i think i can get it
why an array of 100?
where is condition invulnerableunir not equal to "no unit"
 

Tyman2007

Ya Rly >.
Reaction score
74
You just set a unit array 1-100 to the same unit.

The thing about this kindof stuff is that, you DON'T SET A UNIT TO A VARIABLE WITH A WAIT.

There are false rumers about you cant do something like pause triggering unit, wait a second, unpause triggering unit because if someother unit did it, it will cancel out the trigger and the unit wont get unpaused.
 

DrEvil

FCRI Associate!
Reaction score
111
Remember to use the array when seting variables...

And change the Invulnerableunit to Target or Whatever you want

EDIT :Well change the aray size to whatever 100 was just my quick choice
 

TooSlowFcker

New Member
Reaction score
10
it didn't work >.< here is the trigger
Code:
Untitled Trigger 028
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Lightning Shield 2000
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        invulnerable[(Integer A)] Not equal to No unit
                    Then - Actions
                        Set invulnerable[(Integer A)] = (Target unit of ability being cast)
                        Set inviulnerabletimer[100] = 10
                        Unit - Make invulnerable[(Integer A)] Invulnerable
                    Else - Actions
Code:
Untitled Trigger 027
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                    Then - Actions
                        Set inviulnerabletimer[(Integer A)] = inviulnerabletimer[((Integer A) - 1)]
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                inviulnerabletimer[(Integer A)] Equal to 0
                            Then - Actions
                                Unit - Make invulnerable[(Integer A)] Vulnerable
                                Set invulnerable[(Integer A)] = No unit
                            Else - Actions
                    Else - Actions
invulnerable is the unit array 100
 

TooSlowFcker

New Member
Reaction score
10
wh'ats no unit I can't find it >.<
Edit: ohhhhh it's a preset, no wonder im so stupid
EDIT: damn i didn't turn invulnerable, ill change the trigger above to what it is now
EDIT: ill change my very first trigger ( the one under my question at the very top) to give you more info
invulnerable is my unit array 100
 

TooSlowFcker

New Member
Reaction score
10
i changed the trigger at the very top of the page, the one under my original question.
annd i put new trigger above this post
(which i edited it, so the trigger above tyman is it)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top