HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

i suck at jass can ne1 make something for me

02-03-2006, 03:56 AM#1
Sardrixx
it would take me over 100 triggers to do this (atleast the way i thaught)

would it be possible to make a jass to

Ally all players that have allied player 1, but unally all players that have not
same for players 2,3,and 4. except 1,2,3,and 4 cannot ally??

if so, could some1 help me out??

P.S. i already looked at the tutorials on it, just made it worse im afraid(no offence to the tutorial maker, its not your fault its genetics)
02-04-2006, 04:01 AM#2
erwtenpeller
i'm so glad you posted this in the right forum.
02-04-2006, 07:59 AM#3
Zapp90
I'm so glad sarcasm exists.
02-04-2006, 11:50 AM#4
Tim.
~puts on his 'Sarcasm; Beats killing people' shirt~

Moved.
02-04-2006, 06:22 PM#5
PCPharaoh
I'll add more sarcasm to the thread: Thanks to all the above posters for helping the OP so much.

So, if I understand the problem correctly. You want a trigger that:
- Creates alliances between all players that have an alliance with plr 1, 2, 3, 4.
- Makes all players that are enemies of plr 1, 2, 3, 4 treat eachother as enemies.
- Disables 1, 2, 3, 4 from allying

If that's what you're after, then this should do the trick.
Trigger:
Melee Initialization
Events
Conditions
Collapse Actions
Player Group - Make (All allies of (Player(player1or2or3or4))) treat (All allies of (Player(player1or2or3or4))) as an Ally with shared vision
Player Group - Make (All enemies of (Player(player1or2or3or4))) treat (All enemies of (Player(player1or2or3or4))) as an Enemy
Collapse For each (Integer A) from 1 to 4, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from 1 to 4, do (Actions)
Collapse Loop - Actions
Player - Make (Player((Integer A))) treat (Player((Integer B))) as an Ally with shared vision
02-05-2006, 05:42 AM#6
Sardrixx
yeah my problem is i just dont see the way to make it player 1 or 2 or 3 or 4, in my world edit it only shows player 1, player 2, player 3, player 4, not a function in which it is any of or...

i also cannot find the player - Make (player((interger A)) treat (player((Interger B)) as an ally with shared vision

i could always make 4 seperate actions, which is what im going to do, but if theres a way to make it exactly as above, i would like to know...
02-05-2006, 08:10 AM#7
Anitarf
Quote:
Originally Posted by Sardrixx
i could always make 4 seperate actions, which is what im going to do, but if theres a way to make it exactly as above, i would like to know...
No, there isn't, it's made-up code.
02-06-2006, 06:32 PM#8
Mystic Prophet
Ok Here ya go with the help of a simple variable, you can easily ally and unally all the players. If you want to make sure that players 1,2,3, and 4 can't ally just put them each in seperate forces, it's easier than using triggers. Here's the alliance trigger.

note: Player_Number is an integer variable

Trigger:
Ally Forces
Collapse Events
Map initialization
Conditions
Collapse Actions
Set Player_Number = 0
Collapse For each (integer A) from 1 to 4, do (actions)
Set Player_number = (Player_Number +1)
Player Group - Make (all allies of (player(Player_Number))) treat (all allies of (player(player_number))) as an ally with shared vision.
Player Group - Make (all enemies of (player(player_number))) treat (all enemies of (player(player_number))) as an enemy.
Now since you want them to be unable to ally Pharoah's second part of the trigger needs to be periodic. And it has to be enemy, not ally.
Trigger:
Collapse Events
Time - Every 2 seconds of game time
Conditions
Collapse Actions
Collapse For each (integer A) from 1 to 4, do (actions)
Collapse Loop - Actions
Collapse For each (integer B) from 1 to 4, do (actions)
Collapse Loop - Actions
Player Group - Make (Player(integer A)) treat (player(integer B)) as an enemy
02-06-2006, 09:06 PM#9
Sardrixx
the problem is i want them all in the same force, but i dont want them to be able to ally...
and i like the way the other guy did the alliances... its jsut more like sc, and it works... and i wouldn't like to take the time to change it to find out if yours works (im sure it does), i just need to know how to make them not able to ally with triggers
02-08-2006, 06:43 AM#10
Mystic Prophet
all right then i'll look into, though i pretty sure the only way to make it so players in the same force cant ally is to make it so they automatically unally when they do become allied.

Oh and Pharoah's way would be great if it were possible to do that. would have saved me a lot of work.

EDIT: Oh wow, You can make it like Pharoah's except for the player 1 or 2 or 3 or 4 part. what you do is convert player group to index and select for loop integer A as the index. I'll show it in my above post.

The second trigger in my above edit should work. I apologize for the doubt pharoah but you do know the first part of your trigger doesnt work without variables right?
02-10-2006, 09:06 PM#11
Sardrixx
mmmm maybe a step by step explanation would be more helpfull hehe
sorry for the trouble, i can do Everything on the map except the spells that have percents based on your hero stats/damage, but i know ppl that can, and the alliance trigger... i know it works... ive seen it done, but i realize now i could just make it so when they ally they unally, and that may just be VERY much easier

if it would be easier, you could make it so no one can ally at all, except by triggers, which ive also seen done, but i dont recall how. probably more player groups i suppose...

EDIT
HAHA, evil little hidden button, solves the whole alliance issue, lovely, sorry for the trouble... lol dont even need to make them unable to ally just fix the setting with the button, for any future dunces such as myself, its in scenario properties, in the forces tab, just above all the forces, fixed player settings, then just make it so they aren't allied in the force(to the right of the forces box)

does anyone know how to make ppl ally like in Heroes and Empires??, that would prove a marvelously useful tool, for anyone who doesn't know how they make it so you say -ally (player color), a box pops up on their screen that says do you want to ally (player color) [yes] [no] i could do it with a trigger for each player initiator (1-4) to each player accepter (5-12) but that would prove, at best, a waste of time
02-15-2006, 03:57 PM#12
Mystic Prophet
you use a trigger that has a player enters chat message event of -ally (color). then create a dialog box that asks if they want to ally that player. and then if they say yes set them to allies. else do nothing. simple really. I also know how to do stat based spells. Though my methods are a bit crude compared to the jass masters.
02-16-2006, 03:39 AM#13
Sardrixx
well... this new topic im on is deserving of another thread..., ive searched and searched but ive found nothing on this...