HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Here's how to emulate SC's "team melee" AND Can anyone help with a specific problem?

08-20-2002, 07:08 AM#1
Guest
I've been carrying on a discussion with a bloke called 'theworstplayer' in the forums on www.warcraftiii.net about a trigger set for 2 players which would emulate the "team melee" mode found in Starcraft. We have Player 1 actually having all the units... then Player 2 is placed into the same force as player 1, and advanced unit control is enabled. We've got it working successfully... the triggers are as follows:

Event Condition Action

Have an integer variable called 'tempgold' ... Then, in the map init trigger, have this:

Set tempgold = Player 1's current gold

Then, we've put the following triggers into their own "Shared Resources" category:

Trigger=Gold Sharing
Player - Player 1 (Red)'s current gold becomes Not equal to (Real)Player 2 (blue)'s current gold
If ((Player 1 current gold + Player 2 current gold)/2) is equal to tempgold then do Trigger - Run "Gold Cheat safeguard" (ignoring conditions)
else do
Trigger - Run "Gold Legit Variable Setter" (ignoring conditions)


Trigger=Gold Cheat Safeguard
Player - Set Player 1 current gold to tempgold
Player - Set Player 2 current gold to tempgold


Trigger=Gold Legit Variable Setter
Player - Set Player 2 current gold to Player 1 current gold
Set tempgold = Player 1 current gold


Then have a set of triggers which does the same for lumber. Also, for a "Food sharing" trigger, do:

A unit owned by player 1 dies
A unit owned by Player 1 becomes revivable
A unit owned by player 1 begins training a unit
" " cancels training a unit
" " begins reviving
" " cancels reviving
" " finishes construction

Player - Set Player 2 Food used to Player 1 Food Used
" " food max to " " food max
" " food cap to " " food cap
(I don't think this one is needed)

OK. That said, let's get on to the current problem... everything works fine and dandy, BUT Player 2 cannot hear "unit complete" sound effects, etc. Sounds easy to fix right? The following triggers are in place:

Trigger=Upgrade Complete
Unit - a Unit owned by Player 1 finishes an upgrade
Pick every player in Player Group - Player 2 - and do (Sound - Player GruntUpgradeComplete1 <gen>)

Another trigger for 'research complete' and 'building complete' are in place and work. Now include one trigger for each unit-type... like so:

Trigger=Peon Ready
Unit - A Unit owned by Player 1 (Red) finishes training a unit
(Unit-type of (Trained unit)) Equal to Peon
Player - Pick every player in Player Group - Player 2 - and do (Sound - Play PeonReady1 <gen>)

These won't work at first -- after selecting the sound to be used in the sound module, you need to uncheck "3D sound" in the sounds properties. Then it's golden.

Anyway, I hope this has come in useful for someone. Adios!

-GS
08-20-2002, 07:16 AM#2
Guest
Sorry, I had a problem with the sounds but I figured it out and fixed it. Disregard the "help" part of the original post's subject.