Need help setting up teams.

Cdo

New Member
Reaction score
5
ok i've been working on a game and at the start there a four regions (1-4), if you enter region 1 your are put in team 1, if you enter region 2 you are put in team 2, if you enter 3 then team 3 your are in and so on...

now what i need is to make is so that all players in the Team_1 player group treat all players in the Team_1 player group as alli's with shared vision... now for some reason i can't find a way to do this and i would really appreciate any help... :):thup:
 

jig7c

Stop reading me...-statement
Reaction score
123
its in the triggers...
if you have any triggers made, post them here so we can help u on it

i can free code the trigger for you:

event
a unit enters region
condition
(put here your conditions if you have any, for example only when certain unit enters the region, the alliance is determined)
action
if/then/else
if
owner of triggering unit equal to player 1
then
add player 1 to team1group (pre-made player group variable)
make player 1 an ally to team1group
visibilty - share vision of 1 player to team1group
else
etc.. for all the players!
 

Cdo

New Member
Reaction score
5
Here's the trigger i used to set up groups, thanks for the help i'll go fix it now :)
Trigger:
  • team 1
    • Events
      • Unit - A unit enters Team1 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Selector
    • Actions
      • Quest - Display to (All players) the Quest Update message: ((Name of (Triggering player)) + has joined team 1)
      • Set NUM_Team1 = (NUM_Team1 + 1)
      • Player Group - Remove (Owner of (Triggering unit)) from Unchosen
      • Player Group - Add (Owner of (Triggering unit)) to TEAM1
      • Unit - Kill (Triggering unit)


ok so i still can't find the action for (treat group as alli) part of the trigger... what's it under?
(as in the make player 1 alli to team1group)
 

Cdo

New Member
Reaction score
5
found it under player group- ... i was looking under player- thanks for the help
 

jig7c

Stop reading me...-statement
Reaction score
123
no problem, just post your finished trigger here so i can review it and help you if you forgot anything!
 

Cdo

New Member
Reaction score
5
ok well i have two triggers... there's the first one as posted above which i didn't change because it would run every time a player joins a team, it would still work but i found another spot to put it which is the second trigger... anyway here's the first trigger

Trigger:
  • team 1
    • Events
      • Unit - A unit enters Team1 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Selector
    • Actions
      • Quest - Display to (All players) the Quest Update message: ((Name of (Triggering player)) + has joined team 1)
      • Set NUM_Team1 = (NUM_Team1 + 1)
      • Player Group - Remove (Owner of (Triggering unit)) from Unchosen
      • Player Group - Add (Owner of (Triggering unit)) to TEAM1
      • Unit - Kill (Triggering unit)

basically every time someone enteres Team1 regions (which i put a circle of power around to make it look pritty :) ) it adds them to team 1,

{unchosen is used so i can tell when everyone has entered a team so just ignore that}

now the other part i put under this trigger
Trigger:
  • check if all palyers have team
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Number of players in Unchosen) Equal to 0
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Picked player) to (Center of hero chooser spawn <gen>) over 0.01 seconds
      • Quest - Display to (All players) the Quest Update message: |cffff0000YOU MAY N...
      • Unit - Kill Circle of Power (large) 0012 <gen>
      • Unit - Kill Circle of Power (large) 0013 <gen>
      • Unit - Kill Circle of Power (large) 0014 <gen>
      • Unit - Kill Circle of Power (large) 0015 <gen>
      • Player Group - Pick every player in TEAM1 and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Hero Selector for (Picked player) at (Center of hero chooser spawn <gen>) facing Default building facing degrees
      • Player Group - Pick every player in TEAM2 and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Hero Selector for (Picked player) at (Center of hero chooser spawn <gen>) facing Default building facing degrees
      • Player Group - Pick every player in TEAM3 and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Hero Selector for (Picked player) at (Center of hero chooser spawn <gen>) facing Default building facing degrees
      • Player Group - Pick every player in TEAM4 and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Hero Selector for (Picked player) at (Center of hero chooser spawn <gen>) facing Default building facing degrees
      • Player Group - Make TEAM1 treat TEAM1 as an Ally with shared vision
      • Player Group - Make TEAM2 treat TEAM2 as an Ally with shared vision
      • Player Group - Make TEAM3 treat TEAM3 as an Ally with shared vision
      • Player Group - Make TEAM4 treat TEAM4 as an Ally with shared vision
      • Trigger - Turn on check for summoners <gen>
      • Trigger - Turn off (This trigger)

this allows you to buy your hero by giving you a hero selecter but that's not important, at the bottom i put
Trigger:
  • Player Group - Make TEAM1 treat TEAM1 as an Ally with shared vision
    • Player Group - Make TEAM2 treat TEAM2 as an Ally with shared vision
    • Player Group - Make TEAM3 treat TEAM3 as an Ally with shared vision
    • Player Group - Make TEAM4 treat TEAM4 as an Ally with shared vision

which alli's everyone in a team with everyone else in that team... hope that's not to complex... or annoying to read... anyway :thup:
it works 100% awesome and fine:)
 

jig7c

Stop reading me...-statement
Reaction score
123
by the way, your second trigger is leaking!

Point is a point variable!

Trigger:
  • Actions
    • ...
    • set Point = (Center of hero chooser spawn <gen>)
    • Player Group - Pick every player in TEAM1 and do (Actions)
      • Loop - Actions
        • Unit - Create 1 Hero Selector for (Picked player) at (Point) facing Default building facing degrees
    • Player Group - Pick every player in TEAM2 and do (Actions)
      • Loop - Actions
        • Unit - Create 1 Hero Selector for (Picked player) at (Point) facing Default building facing degrees
    • Player Group - Pick every player in TEAM3 and do (Actions)
      • Loop - Actions
        • Unit - Create 1 Hero Selector for (Picked player) at (Point) facing Default building facing degrees
    • Player Group - Pick every player in TEAM4 and do (Actions)
      • Loop - Actions
        • Unit - Create 1 Hero Selector for (Picked player) at (Point) facing Default building facing degrees
    • custom script: call RemoveLocation (udg_Point)
    • ...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top