shuffle players is wierd

exge

New Member
Reaction score
15
ok .. my code actually gives random teams and the main problem is that, some heroes still spawn at their old location ... thus getting killed by the firebush .. so .. im sorta stuck

Code:
shuffle players
    Events
        Player - Player 2 (Blue) types a chat message containing -sp as An exact match
    Conditions
    Actions
        Game - Display to (All players) the text: (playername[2] +  has chosen |cffff0000Shuffle Players|r mode)
        Player Group - Pick every player in Alliance and do (Actions)
            Loop - Actions
                Player Group - Add (Picked player) to Players
        Player Group - Pick every player in Horde and do (Actions)
            Loop - Actions
                Player Group - Add (Picked player) to Players
        Player Group - Remove all players from Alliance
        Player Group - Remove all players from Horde
        For each (Integer A) from 1 to (Number of players in Players), do (Actions)
            Loop - Actions
                Set player = (Random player from Players)
                Player Group - Remove player from Players
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Integer A) mod 2) Equal to 1
                    Then - Actions
                        Point - Move (player start location) to offset((X of (Center of good revive <gen>)), (Y of (Center of good revive <gen>)))
                        Player Group - Add player to Alliance
                    Else - Actions
                        Point - Move (player start location) to offset((X of (Center of hero revive bad <gen>)), (Y of (Center of hero revive bad <gen>)))
                        Player Group - Add player to Horde
        Player Group - Make Alliance treat Horde as an Enemy
        Player Group - Make Horde treat Alliance as an Enemy
        Player Group - Make Alliance treat Alliance as an Ally with shared vision
        Player Group - Make Horde treat Horde as an Ally with shared vision
        Player Group - Pick every player in Alliance and do (Actions)
            Loop - Actions
                Player - Make (Picked player) treat Player 1 (Red) as an Ally with shared vision
        Player Group - Pick every player in Horde and do (Actions)
            Loop - Actions
                Player - Make (Picked player) treat Player 7 (Green) as an Ally with shared vision
        Player Group - Pick every player in Horde and do (Actions)
            Loop - Actions
                Player - Make (Picked player) treat Player 1 (Red) as an Enemy
                Player - Make Player 1 (Red) treat (Picked player) as an Enemy
        Player Group - Pick every player in Alliance and do (Actions)
            Loop - Actions
                Player - Make (Picked player) treat Player 7 (Green) as an Enemy
                Player - Make Player 7 (Green) treat (Picked player) as an Enemy
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
I hadnt read the code but what you can do is if they are allied to your cpu players set them in a player group, in which you pick the players from the group to spawn wherever you make them spawn.
 

exge

New Member
Reaction score
15
i did, and in all my spawn/revive triggers, i had them spawn/revive at their own start location .. so i moved their start locations in the trigger above ... but they still spawn at their old location ... i think somethings wrong ..
 
G

Goauld

Guest
You can't move start locations in-game. Just have 2 regions at each fountain and when you want to revive a hero, check what alliance it has towards a creep player and revive it at the region which it should.
 

exge

New Member
Reaction score
15
i see .. ok .. so what does that function do .. its a weu function, sometimes it works, sometimes it dont ...
 
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