HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Units die instantly... wtf?

05-21-2007, 01:57 PM#1
Bloodlust
Hello.

In my map every 2-3 minutes a special event happens, a trigger randomly picks one. If the trigger making problems is selected, it runs "Mercenary Camp Setup" (see below). A camp is randomly places on one of 3 positions, the trigger checks if there is already a camp and if all 3 spots are taken, it runs the "Pick Wave" trigger again to pick something else.
Now the problem is, sometimes a camp that spawns units... well they DIE instantly when created. On the spot where they are created is a black shadow on the ground.. its pretty weird. Can anyone see an obvious error in there?


Trigger:
Mercenary Camp Setup
Events
Conditions
Collapse Actions
Set TempRandom = (Random integer number between 1 and 3)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
TempRandom Equal to 1
MercSpot[1] Equal to False
Collapse Then - Actions
Unit - Create 1 Mercenary Camp for Player 12 (Brown) at (Center of MercLeft <gen>) facing Default building facing degrees
Set MercCamp[1] = (Last created unit)
Set MercSpot[1] = True
Game - Display to (All players) the text: |cffffcc00Special:|...
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
TempRandom Equal to 2
MercSpot[2] Equal to False
Collapse Then - Actions
Unit - Create 1 Mercenary Camp for Player 12 (Brown) at (Center of MercCenter <gen>) facing Default building facing degrees
Set MercCamp[2] = (Last created unit)
Set MercSpot[2] = True
Game - Display to (All players) the text: |cffffcc00Special:|...
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
TempRandom Equal to 3
MercSpot[3] Equal to False
Collapse Then - Actions
Unit - Create 1 Mercenary Camp for Player 12 (Brown) at (Center of MercRight <gen>) facing Default building facing degrees
Set MercCamp[3] = (Last created unit)
Set MercSpot[3] = True
Game - Display to (All players) the text: |cffffcc00Special:|...
Collapse Else - Actions
Trigger - Run Pick Wave <gen> (ignoring conditions)

Trigger:
Wave Mercenaries
Collapse Events
Time - Every 35.00 seconds of game time
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to 3, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
MercSpot[(Integer A)] Equal to True
Collapse Then - Actions
Cinematic - Ping minimap for (All players) at (Position of MercCamp[(Integer A)]) for 15.00 seconds, using a Simple ping of color (100.00%, 100.00%, 100.00%)
Unit - Create 1 Ruthless Mercenary (Ranged) for Player 12 (Brown) at (Position of MercCamp[(Integer A)]) facing Default building facing degrees
Unit Group - Order (Last created unit group) to Attack-Move To (Position of Royal Castle 0017 <gen>)
Unit - Create 2 Ruthless Mercenary (Melee) for Player 12 (Brown) at (Position of MercCamp[(Integer A)]) facing Default building facing degrees
Unit Group - Order (Last created unit group) to Attack-Move To (Position of Royal Castle 0017 <gen>)
Collapse Else - Actions
Do nothing

Trigger:
Mercenary Camp Dies
Collapse Events
Unit - A unit owned by Player 12 (Brown) Dies
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Triggering unit) Equal to MercCamp[1]
Collapse Then - Actions
Set MercSpot[1] = False
Game - Display to (All players) the text: (|cffffcc00Ruthless Mercenary Camp was destroyed!|r + 200 gold split between players.)
Player Group - Pick every player in (All players) and do (Player - Add (200 / (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))) to (Picked player) Current gold)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Triggering unit) Equal to MercCamp[2]
Collapse Then - Actions
Set MercSpot[2] = False
Game - Display to (All players) the text: (|cffffcc00Ruthless Mercenary Camp was destroyed!|r + 200 gold split between players.)
Player Group - Pick every player in (All players) and do (Player - Add (200 / (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))) to (Picked player) Current gold)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Triggering unit) Equal to MercCamp[3]
Collapse Then - Actions
Set MercSpot[3] = False
Game - Display to (All players) the text: (|cffffcc00Ruthless Mercenary Camp was destroyed!|r + 200 gold split between players.)
Player Group - Pick every player in (All players) and do (Player - Add (200 / (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))) to (Picked player) Current gold)
Collapse Else - Actions
Do nothing
05-21-2007, 04:08 PM#2
blu_da_noob
There is nothing remotely related to unit killing in any of those triggers, so the problem is almost certianly not with them. It could be any number of other things in the map.
05-21-2007, 04:12 PM#3
Rising_Dusk
Quote:
On the spot where they are created is a black shadow on the ground..
This leads me to think they might not be dying at all.

Not sure what to say, but the issue in any case isn't in those triggers.
Consider looking through the rest of your code for conflicts.
05-21-2007, 05:05 PM#4
Bloodlust


Here that shadow...
05-21-2007, 07:38 PM#5
Dil999
Your unit isnt dying.. its just being changed in such a way that its vertex coloring is set to 100% transparency.
05-21-2007, 09:05 PM#6
Bloodlust
Quote:
Originally Posted by Dil999
Your unit isnt dying.. its just being changed in such a way that its vertex coloring is set to 100% transparency.

But they dont move and they leave skeletons with a death animation.