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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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