Wrong winning player bug

k0sA

New Member
Reaction score
9
Hey,

Description: I'm pretty new to this forum, but got some experience with World Editor. If anyone here got time to help me on this bug please download the map at the link and look at it. It may take some time...

The bug: Okey, when I play multiplayer games on battle.net there goes 5 minutes and then one of the players just win out of the blue. Player 13 is the one who has the biggest chance of winning with this "random" method. The Win trigger is only called from start waves trigger which is called from the kill and pause triggers, there are a few conditions that have to be met in the start waves trigger for the win trigger to run. You better download the map and take a look or the small snippets below here.

Map: http://www.mediafire.com/?nuvwudjrzmo

Triggers:
Win
Code:
Actions
    Game - Display to (All players) the text: (Name of playerTemp)
    Game - Display to (All players) the text: (String(intTemp))
    Game - Display to (All players) the text: (String(intKills[intTemp]))
    Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        Loop - Actions
             Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                     Multiple ConditionsOr - Any (Conditions) are true
                        Conditions
                            (Picked unit) Equal to (==) unitHero[intTemp]
                            (Unit-type of (Picked unit)) Equal to (==) Master
                Then - Actions
                    Do nothing
                Else - Actions
                    Unit - Remove (Picked unit) from the game
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            Cinematic - Disable user control for (All players)
            Camera - Set (Picked player)'s camera Height Offset to 100.00 over 0.00 seconds
            Camera - Set (Picked player)'s camera Angle of attack to 355.00 over 0.00 seconds
            Camera - Set (Picked player)'s camera Distance to target to 400.00 over 0.00 seconds
            Camera - Set (Picked player)'s camera Rotation to (Sin((Facing of unitHero[intTemp]))) over 0.00 seconds
            Camera - Pan camera for (Picked player) to (Position of unitHero[intTemp]) over 0.00 seconds
    Game - Display to (All players) for 15.00 seconds the text: (strColors[intTemp] + ((Name of playerTemp) + |r won the game!))
    Wait 15.00 game-time seconds
    Game - End game and Skip scores

Start Waves:
Code:
Actions
    Set intTemp = (Player number of playerTemp)
     Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            boolFighting[intTemp] Equal to (==) False
        Then - Actions
            Set boolFighting[intTemp] = True
            Set intCurrentWave[intTemp] = (intCurrentWave[intTemp] + 1)
            Unit - Create intWaves[intCurrentWave[intTemp]] unitWaves[intCurrentWave[intTemp]] for Neutral Hostile at (Center of rectSpawn[intTemp]) facing Default building facing (270.0) degrees
            Unit Group - Pick every unit in (Last created unit group) and do (Unit Group - Add (Picked unit) to ugWaves[intTemp])
            Game - Display to (Player group(playerTemp)) the text: (((|cffFFCC00Wave  + ((String(intCurrentWave[intTemp])) + :|r )) + ((|cff32CD32 + (String(intWaves[intCurrentWave[intTemp]]))) + (  + stringWaves[intCurrentWave[intTemp]]))) + <Empty String>)
            Game - Display to (Player group(playerTemp)) the text: (<Empty String> + ((|cff7777AA( + (String(intWavesAbility[intCurrentWave[intTemp]]))) + ( Ability Point /  + ((String(intWavesAttribute[intCurrentWave[intTemp]])) +  Attribute Points)))))
            Unit - Hide unitMaster[intTemp]
            Multiboard - Set the text for multiGeneral item in column 2, row (intTemp + 1) to (String(intCurrentWave[intTemp]))
        Else - Actions
             Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    intCurrentWave[intTemp] Greater than or equal to (>=) intNumberOfWaves
                Then - Actions
                    Trigger - Run Win <gen> (checking conditions)
                Else - Actions
                    Game - Display to (Player group(playerTemp)) the text: Wave finished. You ...
                    Unit - Set life of unitHero[intTemp] to 100.00%
                    Unit - Set mana of unitHero[intTemp] to 100.00%
                    Set boolFighting[intTemp] = False
                    Destructible - Open destPorts[intTemp]
                    Unit - Unhide unitMaster[intTemp]

Pause
Code:
Pause
    Events
        Unit - A unit enters Spawn 1 Red <gen>
        Unit - A unit enters Spawn 2 Blue <gen>
        Unit - A unit enters Spawn 3 Teal <gen>
        Unit - A unit enters Spawn 4 Purple <gen>
        Unit - A unit enters Spawn 5 Yellow <gen>
        Unit - A unit enters Spawn 6 Orange <gen>
        Unit - A unit enters Spawn 7 Green <gen>
        Unit - A unit enters Spawn 8 Pink <gen>
    Conditions
    Actions
        Set playerTemp = (Owner of (Entering unit))
        Set intTemp = (Player number of playerTemp)
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                boolFighting[intTemp] Equal to (==) True
            Then - Actions
            Else - Actions
                Destructible - Close destPorts[intTemp]
                Trigger - Run Start waves <gen> (checking conditions)

Kill
Code:
Kill
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Set playerTemp = (Owner of (Killing unit))
        Set intTemp = (Player number of playerTemp)
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                 Multiple ConditionsOr - Any (Conditions) are true
                    Conditions
                        (Dying unit) Equal to (==) unitHero[1]
                        (Dying unit) Equal to (==) unitHero[2]
                        (Dying unit) Equal to (==) unitHero[3]
                        (Dying unit) Equal to (==) unitHero[4]
                        (Dying unit) Equal to (==) unitHero[5]
                        (Dying unit) Equal to (==) unitHero[6]
                        (Dying unit) Equal to (==) unitHero[7]
                        (Dying unit) Equal to (==) unitHero[8]
            Then - Actions
                Set playerTemp = (Owner of (Dying unit))
                Set intTemp = (Player number of playerTemp)
                Countdown Timer - Start timerDie[intTemp] as a One-shot timer that will expire in 30.00 seconds
                Countdown Timer - Create a timer window for timerDie[intTemp] with title Respawn in:
                Set timerwDie[intTemp] = (Last created timer window)
                Countdown Timer - Hide timerwDie[intTemp]
                Countdown Timer - Show timerwDie[intTemp] for playerTemp
                Unit Group - Pick every unit in ugWaves[intTemp] and do (Actions)
                    Loop - Actions
                        Unit Group - Remove (Picked unit) from ugWaves[intTemp]
                        Unit - Remove (Picked unit) from the game
                Game - Display to (Player group(playerTemp)) the text: You died, you will ...
                Set intCurrentWave[intTemp] = (intCurrentWave[intTemp] - 1)
                Set intRespawns[intTemp] = (intRespawns[intTemp] + 1)
                Set boolFighting[intTemp] = False
                Multiboard - Set the text for multiGeneral item in column 2, row (intTemp + 1) to (String(intCurrentWave[intTemp]))
                Multiboard - Set the text for multiGeneral item in column 4, row (intTemp + 1) to (String(intRespawns[intTemp]))
                Destructible - Open destPorts[intTemp]
            Else - Actions
                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (All units of ugWaves[intTemp] are dead) Equal to (==) True
                    Then - Actions
                        Player - Set playerTemp Food used to ((playerTemp Food used) + intWavesAbility[intCurrentWave[intTemp]])
                        Player - Set playerTemp Current lumber to ((playerTemp Current lumber) + intWavesAttribute[intCurrentWave[intTemp]])
                        Set intKills[intTemp] = (intKills[intTemp] + 1)
                        Multiboard - Set the text for multiGeneral item in column 3, row (intTemp + 1) to (String(intKills[intTemp]))
                        Trigger - Run Start waves <gen> (checking conditions)
                    Else - Actions
                        Set intKills[intTemp] = (intKills[intTemp] + 1)
                        Multiboard - Set the text for multiGeneral item in column 3, row (intTemp + 1) to (String(intKills[intTemp]))

~k0sA
 

HappyPeasant

New Member
Reaction score
8
um... lol personally ive never had a trigger with more then one event work lol... and the 3rd you have like 8 events. you might have to make a seperate trigger for each. then try it it might work better also put your triggers all togeather cause how you have it right now i dont know if your events match your actions...
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
@Happy: Multiple events will work. It just means any of those can trigger it. But the regions aren't detectable from each other, so it has to be a general action.
 

k0sA

New Member
Reaction score
9
i dont know if your events match your actions...
My events match my actions? :S

Anyway, the trigger name could just as well be start ;)

Anyone with better ideas? =D

Edit: Got it working using some more conditions... But it should not be called anyway...
 
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