• 0

    posted a message on Needing Scripting Help for Map I am Making

    I've been having some issues getting alliances to work in the editor. Here are the steps I am taking to reproduce the problem:

    1. Create an empty test map

    2. Put a unit (Jim Reynor) for player 1 somewhere

    3. Put a unit (marine) for player 2 somewhere

    4. Put a unit (marine) for player 3 somewhere

    5. Go to Toolbar->Map->Game Variants->Player Attributes.

    6. Assign player 1 to Team 1 https://xender.vip/

    7. Assign player 2 to Team 1

    8. Assign player 3 to Team 2

    9. Close window.

    10. Open triggers window

    11. Create new trigger upon Map Initialization

    12. Create new action "Set Alliance for Player Group"

    13. Change Player Group variable to function->Players->"Players on Team (x)"

    14. Keep the other variable in the "Set Alliance for Player Group" action the same ("Ally with Shared Vision")

    15. Full Action should read: Make all players in (Players on team 1) treat each other as Ally With Shared Vision.

    16. Disable all other map initialization actions (such as initialize melee, win/lose conditions etc)

    17. Start game

    The Primary player (1) will still see that player 2 is a hostile enemy and does not share vision, despite setting them to be on team 1 together in the Player Attributes context menu, and after setting a trigger to set the appropriate alliances when the map starts.

    Note: I tried setting alliances another way using the more-basic Action/Function called "Set alliance". This allows you to set 2 player's alliances manually for one another (ie "Make Player 1 and Player 2 treat each other as Ally with Shared Vision"). When starting the game, this method does actually work but it is not a very good way to program larger maps and dynamic teams.

    I need a way to assign alliances according to the Teams in the lobby. How can I do this, and why is my previous method using the Player Groups failing?

    Posted in: Map Suggestions/Requests
  • To post a comment, please or register a new account.