Setting Alliance.

BassZ

New Member
Reaction score
1
Now I'm sure you have all seen numerous topics about setting an alliance but i looked all over the forums and could not find specifically what i needed...

I'm making a game where when you first start you are asked to join a faction. Either Empire of Legion.

I want a trigger that basically works like this...

When you enter the empire becon it sets your faction as lets say 1, legion would be 2.

Once you have chosen your faction the trigger constantly checks and depending on what team you are on it allies you to everyone in that team while setting you as an enemy to everyone else. so lets say...

player 1,3,4,5,11 are faction 1
player 2,6,12 are faction 2

Make it so everyone in faction 1 is allied with each other but enemy's with faction 2 and vice-versa.

Ive spent 3 hours racking my mind :banghead: on how to do this so if someone could help that would be awesome :shades:
 

mastah_

New Member
Reaction score
5
Now I'm sure you have all seen numerous topics about setting an alliance but i looked all over the forums and could not find specifically what i needed...

I'm making a game where when you first start you are asked to join a faction. Either Empire of Legion.

I want a trigger that basically works like this...

When you enter the empire becon it sets your faction as lets say 1, legion would be 2.

Once you have chosen your faction the trigger constantly checks and depending on what team you are on it allies you to everyone in that team while setting you as an enemy to everyone else. so lets say...

player 1,3,4,5,11 are faction 1
player 2,6,12 are faction 2

Make it so everyone in faction 1 is allied with each other but enemy's with faction 2 and vice-versa.

Ive spent 3 hours racking my mind :banghead: on how to do this so if someone could help that would be awesome :shades:
unless theres another way of changin faction you wouldn't need it constantly checked.. just make it
Event - Unit enters region
Condtions - whatever here
Actions - set alliance of etc etc
 

BassZ

New Member
Reaction score
1
unless theres another way of changin faction you wouldn't need it constantly checked.. just make it
Event - Unit enters region
Condtions - whatever here
Actions - set alliance of etc etc

ok i hate to say this but that did not help at all.

Basically i need it so if you are in faction 1 you join lets say force 1 and everyone in force 1 allies each other. But unfortunately unless someone can give specifics im at a loss here.
 

BassZ

New Member
Reaction score
1
anyone?

anyone? I understand what i am asking is semi complex but anyone know what i need?
 

Mike889

New Member
Reaction score
15
Hmm... You should make the factions in the Forces Editor. So, when the game starts you make your dialog screen and put the choices. If trig player choses Fact 1 then change player froce to fact 1 else change player force to Fact 2.
Ah, and the rules say that you need to wait 24 hours to bump your topic, xD


I hope i helped you. ^^
 

BassZ

New Member
Reaction score
1
Hmm... You should make the factions in the Forces Editor. So, when the game starts you make your dialog screen and put the choices. If trig player choses Fact 1 then change player froce to fact 1 else change player force to Fact 2.
Ah, and the rules say that you need to wait 24 hours to bump your topic, xD


I hope i helped you. ^^

Yes i have the forces made but how to change a player to another force and make them allied with everyone on that force even if someone new joins idk what commands that is in trig edditor.

btw sorry didnt know that i needed to wait 24hrs to bump my bad.
 

Sinan2

New Member
Reaction score
9
Code:
Player Group- Pick All Players in Empire and do (Actions)
Player Group - Make (Picked Player) treat (All players matching (((Matching player) is in Empire) Equal to True)) as an Ally with shared vision
Do the same for legion.
 

BassZ

New Member
Reaction score
1
Code:
Player Group- Pick All Players in Empire and do (Actions)
Player Group - Make (Picked Player) treat (All players matching (((Matching player) is in Empire) Equal to True)) as an Ally with shared vision
Do the same for legion.

Here is the thing in Player Group- i cant seam to be able to select a force, only a specific player.
 

Sinan2

New Member
Reaction score
9
Code:
Player Group - Pick every player in empire and do (Actions)
            Loop - Actions
                Player Group - Make (Player group((Picked player))) treat (All players matching (((Matching player) is in empire) Equal to True)) as an Ally with shared vision
Why shouldn't you be able to select the player? I can do it in the editor.
 

BassZ

New Member
Reaction score
1
Code:
Player Group - Pick every player in empire and do (Actions)
            Loop - Actions
                Player Group - Make (Player group((Picked player))) treat (All players matching (((Matching player) is in empire) Equal to True)) as an Ally with shared vision
Why shouldn't you be able to select the player? I can do it in the editor.

this is what is confusing me. How are you selecting empire? it dose not give me the option of choosing a force and every player in that force. It only gives me the option of picking specific players. Are you using a special editor? I'm using the standard wc3 editor.
 

Shadows

New Member
Reaction score
2
I have not really been paying attention to the other people posting or at least not there segments of code, but I am fairly sure they are using a variable. Probably a player group variable.
 

BassZ

New Member
Reaction score
1
I have not really been paying attention to the other people posting or at least not there segments of code, but I am fairly sure they are using a variable. Probably a player group variable.

Ok that makes sense, how would i assign players to variables?

edit: ok i got varibles and code set up just like that but its not working.
 

Shadows

New Member
Reaction score
2
Alrighty, I am paying full attention now. Post the code that you currently have up. I will take a look at it and try to find out whats wrong. Be sure to post anything involved with the trigger.
 

BassZ

New Member
Reaction score
1
Alrighty, I am paying full attention now. Post the code that you currently have up. I will take a look at it and try to find out whats wrong. Be sure to post anything involved with the trigger.

Events:
-A unit enters <choose empire>
Conditions:
Actions:
-Player Group-Pick every player in empire and do actions
-Loop actions
-Player Group - Make(player group((picked player))) treat (all players matching (((Matching player) is in empire) equal to true)) as an ally with shared vision.

that is all i have so i know there has to be more but idk what to do. I also need to initially set Player 12 as already in empire and player 11 as already in legion but don't know how.
 

Shadows

New Member
Reaction score
2
Learn from these codes, don't just copy and paste. =D

Anyway, as for setting player 11 and 12 into there separate groups, just use this trigger, it should set both of them.

Code:
SortComputers
    Events
        Map initialization
    Conditions
    Actions
        Player Group - Add Player 11 (Dark Green) to EmpireVariable
        Player Group - Add Player 12 (Brown) to EmpireVariable

As for sorting players, just change the trigger were needed. I am only going to make one for the Empire side, just change it enough to work for the Leigon side as well.

Code:
SortPlayers
    Events
        Unit - A unit enters Choose Empire <gen>
    Conditions
    Actions
        Player Group - Add (Owner of (Entering unit)) to EmpireVariable
        Player Group - Make EmpireVariable treat EmpireVariable as an Ally with shared vision
        Unit - Remove (Entering unit) from the game

To break that down so it is easy to understand...
+ Every time a unit enters the "Choose Empire" reigon, it activates the trigger
+ It places the owner of the unit that entered the reigon into the Empire Group
+ It resets all the alliances for the group so they are allied (the make emp.. treat emp... as an ally)
+ It then removes the unit that was used as a selector from the game.

If you want to improve this code, I suggest adding a condition so that only specific units can enter the regions (to help avoid problems). Also, you might want to think about using dialog boxes instead of regions if you know how to. And on a last note, I did not test this, but if I am fairly sure it will work. If for some reason it dose not, please post again soon and I will try to help you fix it.
 

BassZ

New Member
Reaction score
1
Learn from these codes, don't just copy and paste. =D

Anyway, as for setting player 11 and 12 into there separate groups, just use this trigger, it should set both of them.

Code:
SortComputers
    Events
        Map initialization
    Conditions
    Actions
        Player Group - Add Player 11 (Dark Green) to EmpireVariable
        Player Group - Add Player 12 (Brown) to EmpireVariable

As for sorting players, just change the trigger were needed. I am only going to make one for the Empire side, just change it enough to work for the Leigon side as well.

Code:
SortPlayers
    Events
        Unit - A unit enters Choose Empire <gen>
    Conditions
    Actions
        Player Group - Add (Owner of (Entering unit)) to EmpireVariable
        Player Group - Make EmpireVariable treat EmpireVariable as an Ally with shared vision
        Unit - Remove (Entering unit) from the game

To break that down so it is easy to understand...
+ Every time a unit enters the "Choose Empire" reigon, it activates the trigger
+ It places the owner of the unit that entered the reigon into the Empire Group
+ It resets all the alliances for the group so they are allied (the make emp.. treat emp... as an ally)
+ It then removes the unit that was used as a selector from the game.

If you want to improve this code, I suggest adding a condition so that only specific units can enter the regions (to help avoid problems). Also, you might want to think about using dialog boxes instead of regions if you know how to. And on a last note, I did not test this, but if I am fairly sure it will work. If for some reason it dose not, please post again soon and I will try to help you fix it.

thanks for the help and i try to learn, i did some experiments with it but nothing was working. I experiment with every tigger im given to make it feel just perfect through fine tuning. Sometimes i dont do much other times i make massive edits. This will help me in the long run, ty again for the help.
 

foodflare

You can change this now in User CP.
Reaction score
32
Try player group - set alliance, click the one just after the word treat, click the drop-down box that is alligned horizontally with the word function, and select allies of player, then click on the player who you want to change (in this case gray),that is the basics
 

BassZ

New Member
Reaction score
1
Code Problem.

I think there is a major leak in that code Shadows because about 5 seconds into the game the entire game freezes.
 

Shadows

New Member
Reaction score
2
Re-Post all of the triggers that you created so I can see them. As far as I can see, there is no reason for mine to glitch. Also, dose it only happen when you walk onto a region?

Edit: Also, please place them into the [ code ] and [ / code ] brackets (without spaces). It makes it a lot easier.
 

BassZ

New Member
Reaction score
1
Re-Post all of the triggers that you created so I can see them. As far as I can see, there is no reason for mine to glitch. Also, dose it only happen when you walk onto a region?

Edit: Also, please place them into the [ code ] and [ / code ] brackets (without spaces). It makes it a lot easier.

im going to pm you my map k.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • 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!

      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