Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
I want to make it so when you attack another player, it unallies them and displays a text mesage. Is there any way to check for an alliance, or does it require me to do something else.
You would have to use several variables but its easily doable.
Like have at the beginning everyone allied.
Unit is attacked, display text player (attacker) is unallied from player (attacked)
and then make them hostile towards eachother.
Thank you, I am decent with variables, just wondering if there was an easier way. Reputation.
A value of 1 = Allied.
A value of 2 = Unallied.
Players 11 and 12 are computer controlled.
Actions
Set RedsAllies[2] = 1
Set RedsAllies[3] = 1
Set RedsAllies[4] = 1
Set RedsAllies[5] = 1
Set RedsAllies[6] = 1
Set RedsAllies[7] = 1
Set RedsAllies[8] = 1
Set RedsAllies[9] = 1
Set RedsAllies[10] = 1
Set RedsAllies[11] = 1
Set RedsAllies[12] = 2
Set BluesAllies[1] = 1
Set BluesAllies[3] = 1
Set BluesAllies[4] = 1
Set BluesAllies[5] = 1
Set BluesAllies[6] = 1
Set BluesAllies[7] = 1
Set BluesAllies[8] = 1
Set BluesAllies[9] = 1
Set BluesAllies[10] = 1
Set BluesAllies[11] = 1
Set BluesAllies[12] = 2
Set TealsAllies[1] = 1
Set TealsAllies[2] = 1
Set TealsAllies[4] = 1
Set TealsAllies[5] = 1
Set TealsAllies[6] = 1
Set TealsAllies[7] = 1
Set TealsAllies[8] = 1
Set TealsAllies[9] = 1
Set TealsAllies[10] = 1
Set TealsAllies[11] = 1
Set TealsAllies[12] = 2
Set PurplesAllies[1] = 1
Set PurplesAllies[2] = 1
Set PurplesAllies[3] = 1
Set PurplesAllies[5] = 1
Set PurplesAllies[6] = 1
Set PurplesAllies[7] = 1
Set PurplesAllies[8] = 1
Set PurplesAllies[9] = 1
Set PurplesAllies[10] = 1
Set PurplesAllies[11] = 1
Set PurplesAllies[12] = 2
Set YellowsAllies[1] = 1
Set YellowsAllies[2] = 1
Set YellowsAllies[3] = 1
Set YellowsAllies[4] = 1
Set YellowsAllies[6] = 1
Set YellowsAllies[7] = 1
Set YellowsAllies[8] = 1
Set YellowsAllies[9] = 1
Set YellowsAllies[10] = 1
Set YellowsAllies[11] = 1
Set YellowsAllies[12] = 2
Set OrangesAllies[1] = 1
Set OrangesAllies[2] = 1
Set OrangesAllies[3] = 1
Set OrangesAllies[4] = 1
Set OrangesAllies[5] = 1
Set OrangesAllies[7] = 1
Set OrangesAllies[8] = 1
Set OrangesAllies[9] = 1
Set OrangesAllies[10] = 1
Set OrangesAllies[11] = 1
Set OrangesAllies[12] = 2
Set GreenAllies[1] = 1
Set GreenAllies[2] = 1
Set GreenAllies[3] = 1
Set GreenAllies[4] = 1
Set GreenAllies[5] = 1
Set GreenAllies[6] = 1
Set GreenAllies[8] = 1
Set GreenAllies[9] = 1
Set GreenAllies[10] = 1
Set GreenAllies[11] = 1
Set GreenAllies[12] = 2
Set PinkAllies[1] = 1
Set PinkAllies[2] = 1
Set PinkAllies[3] = 1
Set PinkAllies[4] = 1
Set PinkAllies[5] = 1
Set PinkAllies[6] = 1
Set PinkAllies[7] = 1
Set PinkAllies[9] = 1
Set PinkAllies[10] = 1
Set PinkAllies[11] = 1
Set PinkAllies[12] = 2
Set GrayAllies[1] = 1
Set GrayAllies[2] = 1
Set GrayAllies[3] = 1
Set GrayAllies[4] = 1
Set GrayAllies[5] = 1
Set GrayAllies[6] = 1
Set GrayAllies[7] = 1
Set GrayAllies[8] = 1
Set GrayAllies[10] = 1
Set GrayAllies[11] = 1
Set GrayAllies[12] = 2
Set LightBlueAllies[1] = 1
Set LightBlueAllies[2] = 1
Set LightBlueAllies[3] = 1
Set LightBlueAllies[4] = 1
Set LightBlueAllies[5] = 1
Set LightBlueAllies[6] = 1
Set LightBlueAllies[7] = 1
Set LightBlueAllies[8] = 1
Set LightBlueAllies[9] = 1
Set LightBlueAllies[11] = 1
Set LightBlueAllies[12] = 2
I have a faint feeling this could have been done in JASS with in minutes...
Actions:
--------
Player - Make (owner of (attacking unit)) treat (owner of (attacked unit)) as an Enemy
Player - Make (owner of (attacked unit)) treat (owner of (attacking unit)) as an Enemy
Game - Display to (All players matching ((Picked Player) equal to (owner of attacking unit)))the text: <Whatever you want it to say>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.