Confused on this

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Code:
For each (Integer CommanderOrders) from 1 to 12, do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Commander[CommanderOrders] Equal to No unit
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        JoinedBandits[CommanderOrders] Equal to True
                    Then - Actions
                        Unit - Create 1 Guard Commander for Player 10 (Light Blue) at (Player 10 (Light Blue) start location) facing Default building facing degrees
                        Set Commander[CommanderOrders] = (Last created unit)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                JoinedSoldiers[CommanderOrders] Equal to True
                            Then - Actions
                                Unit - Create 1 Guard Commander for Player 7 (Green) at (Player 7 (Green) start location) facing Default building facing degrees
                                Set Commander[CommanderOrders] = (Last created unit)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        TheUndead[CommanderOrders] Equal to True
                                    Then - Actions
                                        Unit - Create 1 Undead Commander for (Player(CommanderOrders)) at ((Player(CommanderOrders)) start location) facing Default building facing degrees
                                        Set Commander[CommanderOrders] = (Last created unit)
                                    Else - Actions
                                        Do nothing
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Commander[CommanderOrders] is dead) Equal to True
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                JoinedBandits[CommanderOrders] Equal to True
                            Then - Actions
                                Hero - Instantly revive Commander[CommanderOrders] at (Player 10 (Light Blue) start location), Hide revival graphics
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        JoinedSoldiers[CommanderOrders] Equal to True
                                    Then - Actions
                                        Hero - Instantly revive Commander[CommanderOrders] at (Player 7 (Green) start location), Hide revival graphics
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                TheUndead[CommanderOrders] Equal to True
                                            Then - Actions
                                                Hero - Instantly revive Commander[CommanderOrders] at ((Player(CommanderOrders)) start location), Hide revival graphics
                                            Else - Actions
                                                Do nothing
                    Else - Actions
                        Do nothing
        Unit - Order Commander[CommanderOrders] to Attack-Move To (Random point in (Playable map area))
        Cinematic - Ping minimap for (All players) at (Position of Commander[CommanderOrders]) for 3.00 seconds
        Game - Display to (All players) the text: (String((Unit-type of Commander[CommanderOrders])))
Wait 20.00 seconds
Trigger - Run (This trigger) (checking conditions)

I have no idea why but it stops ressurrecting the commanders randomly and the tests in there (Pinging and text of unit-type) focuses onto the center of the map and says nothing indicating to me that the units don't exist randomly, but do exist not allowing for others to be created.

The map is nothing but heros and a few buildings (depending), only player's heros revive, rest eventually get removed depending on the situation. Commanders are counted as a player's hero but for the computers.

4 commanders (2 undead 1 bandit 1 soldier) are created from the start, another is made for the opposite side depending on which a player joins (cannot join undead). But as I said, each eventually just dissappears....

Anyone have a clue?
 
E

eagleinga1

Guest
Maybe

For revival Might it be easier to just have a trigger for each players hero sinve only players hero's revive. something like...

Untitled Trigger 002
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
(Owner of (Dying unit)) Equal to Player 1 (Red)
Actions
Hero - Instantly revive (Dying unit) at (Your Location)), Hide revival graphics

Im kinda new to editor so if this makes no sense just ignore me :p
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Code:
Events
    Unit - A unit Dies
Conditions
    And - All (Conditions) are true
        Conditions
            (Race of (Dying unit)) Equal to Night Elf
            (Unit-type of (Dying unit)) Not equal to Guard Commander
            (Unit-type of (Dying unit)) Not equal to Undead Commander
Actions
    Wait 20.00 seconds
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            JoinedSoldiers[(Player number of (Owner of (Dying unit)))] Equal to True
        Then - Actions
            Hero - Instantly revive (Dying unit) at (Player 10 (Light Blue) start location), Hide revival graphics
        Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    JoinedBandits[(Player number of (Owner of (Dying unit)))] Equal to True
                Then - Actions
                    Hero - Instantly revive (Dying unit) at (Player 7 (Green) start location), Hide revival graphics
                Else - Actions
                    Hero - Instantly revive (Dying unit) at (Random point in Bottom Half <gen>), Hide revival graphics

You're thinking of this trigger I think...but yea, I tried just this, but they stopped ressurrecting also...even tho the user's heros never screw up like this...
I gave myself a commander and never had the issue which just threw me for a loop...
 
E

eagleinga1

Guest
Oh ok. well i was thinking of making it more simple and having a trigger for each player. that checks in conditions dying unit is a hero, and owner of dying unit. then since you have a trigger for each player just input the place you want it to spawn for each one rather than 1 trigger running all different ressurection locations

oh ok i thought the "commanders" were the units controlled by each player, sorry about that

ok im just editing this post to make it easier. without looking at your map i cant when, but at some point if you set the "commanders" each to a unit-variable, and set a point-location variable= to each ressurection location.
You Could revive like this

set blahunit=commander1
set blahlocation=commander1 respawn

blah
Events
Unit - A unit Dies
Conditions
(Dying unit) Equal to blahunit
Actions
Hero - Instantly revive blahunit at blahlocation, Hide revival graphics

well i hope this is of some help, and if not i hope you find the answers your looking for
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
I use both of those triggers...1 for player's, 1 for commanders (which is a computer controlled unit). Commanders and Heros are considered nightelf race, that way when they die, they spawn a soul instead of being removed and a zombie spawning. (Other units die and zombies spawn from them and removing the unit from the game etc.)

I tested multiple times ignoring the commander issue, and now I'm stuck trying to get commanders working...
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Bump...just making sure someone sees this thread...I have no idea how to solve this...I tried letting the commanders revive as heros (removing the 'Unit-type of (Dying Unit) Not Equal to Commander' of course), failed...computer's heros seem to just dissappear as I said, everything works for the players...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top