[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > World Editor Help Zone


World Editor Help Zone Ask general questions about World Editor features and use in this forum. If you need help fixing a trigger, please post it in Triggers & Scripts. Please review the forum rules before posting.

Closed Thread
 
Thread Tools
Old 09-19-2008, 10:56 PM   #1 (permalink)
Registered User prune1
User
 
Join Date: May 2007
Posts: 4
prune1 is an unknown quantity at this point (0)
Setting Alliances, need help!

Hello,

I'm a little stuck with this...I'm trying to create a trigger that changes the alliance settings for all players but can't seem to get it to work.

I have set forces, namely: player 1 to 9 being allied, and 10 being their enemy.

Basically, a unit dying is the event, and then i check to see that it's a particular type of unit.

Actions:
Make triggering player treat player 10 as an ally.
Make player 10 treat triggering player as an ally.

Right, so that seems to work, but now i want that triggering player's initial allies to become his enemies, and for his allies to treat him as an enemy.
Essentially the player is transferring to player 10's force.

Here's what i tried:

Player group:
Make all enemies of 10 treat all allies of 10 as enemy
Make all allies of 10 treat all enemies of 10 as ally


I stick in a small wait in between these two lines and the previous ones at the top of my post, just in case the game needs some time to recognise that the triggering player is now with 10 and vice versa.

But, this part doesn't work regardless....the triggering player is allied with 10, and 10 with him but the other players still treat him as an ally, and he treats them as an ally...any help would be appreciated.
prune1 is offline  
Old 09-20-2008, 12:07 AM   #2 (permalink)
Registered User UreDe4D
valiant little mapper
 
UreDe4D's Avatar
 
Join Date: Nov 2006
Posts: 908
UreDe4D will become famous soon enough (102)UreDe4D will become famous soon enough (102)UreDe4D will become famous soon enough (102)
Events
Unit - A Unit dies
Conditions
Actions
Playergroup - add owner of triggering Unit to team2
Playergroup - remove owner of triggering Unit from team1
Pick every Player in team1 and make picked player treat random player of team2 as an enemy
Pick every Player in team2 and make picked player treat random player of team1 as an enemy

just a basic idea don't know if it works, "team1" and "team2" are playergroup variables
__________________
Hear the bombs falling
The devil is calling
The godly creation
In obliteration
On your final hour
Experience the power
Of retaliation
Death and domination
UreDe4D is offline  
Old 09-21-2008, 03:57 PM   #3 (permalink)
Registered User Airandius
User
 
Airandius's Avatar
 
Join Date: Jun 2007
Posts: 1,261
Airandius is just really nice (308)Airandius is just really nice (308)
What UreDe4D said is a good idea, using player groups.
I'll explain it to you a bit more.

1) Create a PlayerGroup Variable with an array. (I named it Alliance.)
Inside Alliance[1] we have: Players 1 to 9.
Inside Alliance[2] we have: Player 10.

I want you to add these to their groups first and make them treath each other allies and enemies. (Look at the trigger below.)

Initialization
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Player Group - Add Player 1 (Red) to Alliance[1]
Player Group - Add Player 2 (Blue) to Alliance[1]
Player Group - Add Player 3 (Teal) to Alliance[1]
Player Group - Add Player 4 (Purple) to Alliance[1]
Player Group - Add Player 5 (Yellow) to Alliance[1]
Player Group - Add Player 6 (Orange) to Alliance[1]
Player Group - Add Player 7 (Green) to Alliance[1]
Player Group - Add Player 8 (Pink) to Alliance[1]
Player Group - Add Player 9 (Gray) to Alliance[1]
Player Group - Add Player 10 (Light Blue) to Alliance[2]
Player Group - Make Alliance[1] treat Alliance[1] as an Ally with shared vision
Player Group - Make Alliance[2] treat Alliance[2] as an Ally with shared vision
Player Group - Make Alliance[1] treat Alliance[2] as an Enemy
Player Group - Make Alliance[2] treat Alliance[1] as an Enemy

Now you want to put people in Alliance[1] to Alliance[2] when a unit fo them dies right?
If so then add this trigger aswell.

Unit Dies
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Dying unit)) is in Alliance[1]) Equal to True
Then - Actions
Player Group - Remove (Owner of (Dying unit)) from Alliance[1]
Player Group - Add (Owner of (Dying unit)) to Alliance[2]
Player Group - Make Alliance[1] treat Alliance[1] as an Ally with shared vision
Player Group - Make Alliance[2] treat Alliance[2] as an Ally with shared vision
Player Group - Make Alliance[1] treat Alliance[2] as an Enemy
Player Group - Make Alliance[2] treat Alliance[1] as an Enemy
Else - Actions

This should do the trick, also I used a Boolean Condition to check if the owner was inside Alliance[1]
Airandius is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Trigger] Player alliances through dialog boxes Cayne Triggers & Scripts 19 05-28-2008 07:43 PM
[Trigger] In game alliances using dialogue boxes Cayne Triggers & Scripts 10 12-29-2007 09:35 PM
Forging Alliances (Name in Question) Steel_Cold Idea Factory 6 08-17-2007 02:18 PM
Setting Local's vegeta_ss Triggers & Scripts 4 05-21-2006 08:10 PM
help setting up this one †-DivineAngelOfSorrow-† Modeling & Animation 3 08-16-2004 12:36 AM

All times are GMT. The time now is 02:55 AM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle