| 04-15-2004, 04:05 PM | #1 |
I am having a problem in my map when I create some units for one computer controlled player to attack units created for another computer controlled player. The goal is for the human players to try to protect one set of units from being killed by another set. However, the instant the attacking computer unit STARTS to attack one of the other units (i.e. before the actual hit but right as the attack animation begins), a desync occurs and all players are disconnected from the server. The desync will not occur if I turn of the attack of the attacking computer controlled unit so the execution of the triggers themselves are not causing the desync to occur. When I place the units in the map using the map editor (so that they fight immediately when the map starts) no desync occurs but this doesn't really work so it is not a solution. The problem appears to be with the triggers creating the units and them subsequently attacking. One other note is that the units are all spawned in the water and all have amphibious movement. I tried the following to fix this: -Ensured all units have a Sound Set -Ensured no units use more than 15 dice (currently all use 1 dice) -Ensured that not units have high hit points or attacks (all are less than 100) -Tried putting units on different computer player teams (varied from player 9 through player 12) -Tried using custom units and using completely unmodified melee units Here are the 3 triggers (in the order they would run): The first trigger created the attacking unit and the player controlled units The second trigger creates the computer controlled units that are supposed to be protected The third trigger handles the death of computer controlled units (when a player attacks a unit it "saves" it, when the attacking cpu attacks it "kills" it) Jaws Start Events Conditions PartyTime Equal to True Actions -------- Enable all Entangle Game Triggers -------- Trigger - Turn on Jaws Turtle Spawner <gen> Trigger - Turn on Turtle Dies <gen> Trigger - Turn on Unit Leaves Jaws <gen> Trigger - Turn on Jaws End <gen> -------- Kill any remaining player 9 units -------- Unit Group - Pick every unit in (Units owned by Player 9 (Gray)) and do (Unit - Remove (Picked unit) from the game) -------- Initialize Party Game Vars -------- Sound - Play LightningBolt <gen> Set GameType = Jaws Set PartyInt1 = (players x 6) If (PartyInt1 Greater than 20) then do (Set PartyInt1 = 20) else do (Do nothing) -------- Create Jaws -------- Unit - Create 1 Jaws for Player 10 (Light Blue) at (Center of JawsRegion <gen>) facing (Target of (Current camera)) -------- Create timer and leaderboard -------- Multiboard - Create a multiboard with 2 columns and 2 rows, titled Jaws Attack Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 12.00% of the total screen width Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 3.00% of the total screen width Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Turtles Killed Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to 0 Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Turtles Saved Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to 0 Multiboard - Set the color for (Last created multiboard) item in column 0, row 1 to (80.00%, 0.00%, 0.00%) with 0.00% transparency Multiboard - Set the color for (Last created multiboard) item in column 0, row 2 to (0.00%, 80.00%, 0.00%) with 0.00% transparency Multiboard - Show (Last created multiboard) Multiboard - Maximize (Last created multiboard) Countdown Timer - Start PartyTimer as a One-shot timer that will expire in 40.00 seconds Countdown Timer - Create a timer window for PartyTimer with title Jaws -------- Set Camera for all players -------- Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Camera - Apply JawsCam <gen> for (Picked player) over 0.00 seconds) -------- Create Player Units -------- Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Actions) Loop - Actions If (((Picked player) is in (All players controlled by a Computer player)) Equal to True) then do (Skip remaining actions) else do (Do nothing) Unit - Create 1 Turtle Collector for (Picked player) at (Random point in JawsRegion <gen>) facing 180.00 degrees Selection - Select (Last created unit) for (Picked player) -------- Call Spawner -------- Game - Display to (All players) for 3.00 seconds the text: Save the baby turtl... Wait 1.00 seconds Trigger - Run Jaws Turtle Spawner <gen> (ignoring conditions) Jaws Turtle Spawner Events Player - Player 9 (Gray)'s Food used becomes Less than 6.00 Conditions PartyTime Equal to True GameType Equal to Jaws (Remaining time for PartyTimer) Greater than 2.00 (Number of living Baby Turtle units owned by Player 9 (Gray)) Less than PartyInt1 Actions Unit - Create 1 Baby Turtle for Player 9 (Gray) at (Random point in JawsRegion <gen>) facing (Center of JawsRegion <gen>) Wait 0.10 seconds If ((Player 9 (Gray) Food used) Less than PartyInt1) then do (Trigger - Run Jaws Turtle Spawner <gen> (checking conditions)) else do (Do nothing) Turtle Dies Events Unit - A unit owned by Player 9 (Gray) Dies Conditions (Unit-type of (Triggering unit)) Equal to Baby Turtle Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Unit-type of (Killing unit)) Equal to Turtle Collector Then - Actions -------- Turtle Saved -------- Set PartyScoreArray[(Player number of (Owner of (Killing unit)))] = (PartyScoreArray[(Player number of (Owner of (Killing unit)))] + 1) Set PartyScoreArray[9] = (PartyScoreArray[9] + 1) Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (String(PartyScoreArray[9])) Sound - Play SaveTurtle <gen> at 100.00% volume, located at (Position of (Triggering unit)) with Z offset 0.00 Unit - Remove (Triggering unit) from the game Else - Actions -------- Turtle Killed -------- Set PartyScoreArray[10] = (PartyScoreArray[10] + 1) Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to (String(PartyScoreArray[10])) Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Demon\DemonLargeDeathExplode\DemonLargeDeathExplode.mdl Unit - Explode (Triggering unit) |
| 04-16-2004, 02:29 AM | #2 |
Apparently the problem was creating amphibious units in the water. Once I placed the units on the land the server splits/desync stopped. Looks like another item for the server splits FAQ. -AZ |
