| 08-26-2003, 06:26 PM | #1 |
Greets. Sometimes, upon loading my map, some non-host human players never actually join the game, but are instead brought to the defeated-statistics screen immediately. What's wrong? The defeat trigger for the map isn't misfiring, since it's set to give victory to some and defeat to the rest at the same time. Does anyone know if there might be some kind of bug related to map init triggers. Also, while I'm on the topic, I'm interested in making four very simple AI procedures for the map, but they involve using custom heros and hero abilities. I haven't figured out how to refer to custom stuff yet. I'm brand new to the AI editing part of this, and I could use a hand. |
| 08-28-2003, 03:28 AM | #2 |
Personally, I don't use any Map Init. Triggers (ecspecially in MulitPlayer) Also, it may have something to do with a server split. Search the Map Devo froum for a list of known causes. |
| 08-28-2003, 03:49 AM | #3 |
Yea, I've been keeping tabs on server split, and none of the things I'm running now fall into that list, as far as I can tell. Why don't you use Map Init triggers? Could I put these triggers at 0.01 seconds elapsed with the same effect? I imagine that would lag the beginning of the map badly. |
| 08-28-2003, 03:54 AM | #4 |
Well, you could delay your problem by having the defeat condition trigger initially off and turn it on whenever someone completes or nears completion of winning. Don't know if that will much because i don't know specifics0_o |
| 08-28-2003, 04:06 AM | #5 |
Map init triggers are set to run while the map is in it's loading states. Don't believe me? Go put a sound to run at map init and see what happens. Setting it to 0.01 will give it crappy effects, if you are meant to create units upon joining the game, they should already be there, not appearing. |
| 08-28-2003, 04:26 AM | #6 |
I agree, FyreDaug. The more Map Init triggers I have, the longer the map takes to load. A simple conclusion to make is that Map Init runs while the map is loading. I've also heard tell that triggers will quit if they've been running too long. I doubt mine'd fall into that category. As far as the Defeat trigger itself, it's not being called. My trigger gives victory to one team and then defeats the rest. Well, the people who are being defeated at the start of the map are defeated, but the others aren't victorious. And the defeat trigger does function normally. So, back to square one again. How about the AI question? Do you have some helpful hints regarding that? |
| 08-28-2003, 05:29 AM | #7 |
its really hard to debug a map without having it infront of me... have multiple people hosted and had the same problem? there isn't a slight possibility you left some anomilous defeat triggers in there is there? cause i haven't really heard of wierd defeats happening ever |
| 08-28-2003, 05:43 AM | #8 |
Sorry, I really should be posting the trigger here. I can't shake this deep ingrained fear of people yoinking my map and having their way with it. I deleted every trigger and started from scratch, and yes, I've had a couple people host it. If I had any evidence that someone else had experienced a similar thing with a Mac computer vs. PC, I'd think it might have something to do with some sort of incompatibility between them. My roommate has a Mac, and when I host, sometimes this happens to him, and when he hosts, usually it happens to one of the other two players (although never both, yet). |
| 08-28-2003, 05:44 AM | #9 |
Just post the Map Init. triggers and any others that start within 1 min or so... |
| 08-28-2003, 06:04 AM | #10 |
I suppose I should do that. Code:
[b]Initialization
[color=white]Events [/color][/b]
Map Initialization
[b][color=white]Conditions [/color][/b]
My pants are on fire.
[b][color=white]Actions [/color][/b]
-------- Defeat empty forces --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Not equal to Is playing
(Player 5 (Yellow) slot status) Not equal to Is playing
(Player 9 (Gray) slot status) Not equal to Is playing
Then - Actions
Set booleanArrayForceDefeat[1] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) slot status) Not equal to Is playing
(Player 6 (Orange) slot status) Not equal to Is playing
(Player 10 (Light Blue) slot status) Not equal to Is playing
Then - Actions
Set booleanArrayForceDefeat[2] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) slot status) Not equal to Is playing
(Player 7 (Green) slot status) Not equal to Is playing
(Player 11 (Dark Green) slot status) Not equal to Is playing
Then - Actions
Set booleanArrayForceDefeat[3] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) slot status) Not equal to Is playing
(Player 8 (Pink) slot status) Not equal to Is playing
(Player 12 (Brown) slot status) Not equal to Is playing
Then - Actions
Set booleanArrayForceDefeat[4] = True
Else - Actions
-------- Region array init --------
Set regionArrayStart[1] = StartP1 <gen>
Set regionArrayStart[2] = StartP2 <gen>
Set regionArrayStart[3] = StartP3 <gen>
Set regionArrayStart[4] = StartP4 <gen>
Set regionArrayStart[5] = StartP5 <gen>
Set regionArrayStart[6] = StartP6 <gen>
Set regionArrayStart[7] = StartP7 <gen>
Set regionArrayStart[8] = StartP8 <gen>
Set regionArrayStart[9] = StartP9 <gen>
Set regionArrayStart[10] = StartP10 <gen>
Set regionArrayStart[11] = StartP11 <gen>
Set regionArrayStart[12] = StartP12 <gen>
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
-------- Bounty initialization --------
Player - Turn Gives bounty On for (Picked player)
-------- Player Hero Limit --------
Player - Limit training of Heroes to 1 for (Picked player)
-------- Chooser Townhall creation and isnotplaying set defeat --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) slot status) Equal to Is playing
Then - Actions
Set booleanArrayPlayerDefeat[(Player number of (Picked player))] = False
If ((Race of (Picked player)) Equal to Human) then do (Unit - Create 1 Lair (chooser) for (Picked player) at ((Picked player) start location) facing Default building facing degrees) else do (Do nothing)
If ((Race of (Picked player)) Equal to Orc) then do (Unit - Create 1 Ziggurat (chooser) for (Picked player) at ((Picked player) start location) facing Default building facing degrees) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Race of (Picked player)) Equal to Undead
Then - Actions
If (((Northwest <gen> contains ((Picked player) start location)) Equal to True) or ((Southwest <gen> contains ((Picked player) start location)) Equal to True)) then do (Unit - Create 1 Diabolic Gate (chooser facing SE) for (Picked player) at ((Picked player) start location) facing Default building facing degrees) else do (Unit - Create 1 Diabolic Gate (chooser facing SW) for (Picked player) at ((Picked player) start location) facing Default building facing degrees)
Else - Actions
If ((Race of (Picked player)) Equal to Night Elf) then do (Unit - Create 1 Keep of the Sun (chooser) for (Picked player) at ((Picked player) start location) facing Default building facing degrees) else do (Do nothing)
Else - ActionsCode:
[b]Msg and computer build
[color=white]Events [/color][/b]
Time - Elapsed game time is 2.00 seconds
[b][color=white]Conditions [/color][/b]
Draco loves sandwiches.
[b][color=white]Actions [/color][/b]
Game - Display to (All players) for 15.00 seconds the text: Choose an attacker ...
-------- Randomly choose melee or ranged for computers --------
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) controller) Equal to Computer
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to 1
Then - Actions
Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to train/upgrade to a Melee (chooser)
Unit - Order (Picked unit) to train/upgrade to a Melee (chooser)
Unit - Order (Picked unit) to train/upgrade to a Melee (chooser)
Unit - Order (Picked unit) to train/upgrade to a Melee (chooser)
Else - Actions
Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to train/upgrade to a Ranged (chooser)
Unit - Order (Picked unit) to train/upgrade to a Ranged (chooser)
Unit - Order (Picked unit) to train/upgrade to a Ranged (chooser)
Unit - Order (Picked unit) to train/upgrade to a Ranged (chooser)
Else - ActionsCode:
[b]Player Death
[color=white]Events [/color][/b]
Unit - A unit Dies
[b][color=white]Conditions [/color][/b]
Or - Any (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Equal to Lair
(Unit-type of (Dying unit)) Equal to Ziggurat
(Unit-type of (Dying unit)) Equal to Diabolic Gate (facing SE)
(Unit-type of (Dying unit)) Equal to Diabolic Gate (facing SW)
(Unit-type of (Dying unit)) Equal to Keep of the Sun
[b][color=white]Actions [/color][/b]
Leaderboard - Remove (Owner of (Dying unit)) from (Last created leaderboard)
Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit))) and do (Unit - Kill (Picked unit))
Set booleanArrayPlayerDefeat[(Player number of (Owner of (Dying unit)))] = True
-------- Set Force Defeat --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
booleanArrayForceDefeat[1] Equal to False
booleanArrayPlayerDefeat[1] Equal to True
booleanArrayPlayerDefeat[5] Equal to True
booleanArrayPlayerDefeat[9] Equal to True
Then - Actions
Set booleanArrayForceDefeat[1] = True
Game - Display to (All players) for 20.00 seconds the text: The Northwest has b...
Unit - Remove Marketplace 0014 <gen> from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
booleanArrayForceDefeat[2] Equal to False
booleanArrayPlayerDefeat[2] Equal to True
booleanArrayPlayerDefeat[6] Equal to True
booleanArrayPlayerDefeat[10] Equal to True
Then - Actions
Set booleanArrayForceDefeat[2] = True
Game - Display to (All players) for 20.00 seconds the text: The Northeast has b...
Unit - Remove Marketplace 0013 <gen> from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
booleanArrayForceDefeat[3] Equal to False
booleanArrayPlayerDefeat[3] Equal to True
booleanArrayPlayerDefeat[7] Equal to True
booleanArrayPlayerDefeat[11] Equal to True
Then - Actions
Set booleanArrayForceDefeat[3] = True
Game - Display to (All players) for 20.00 seconds the text: The Southeast has b...
Unit - Remove Marketplace 0016 <gen> from the game
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
booleanArrayForceDefeat[4] Equal to False
booleanArrayPlayerDefeat[4] Equal to True
booleanArrayPlayerDefeat[8] Equal to True
booleanArrayPlayerDefeat[12] Equal to True
Then - Actions
Set booleanArrayForceDefeat[4] = True
Game - Display to (All players) for 20.00 seconds the text: The Southwest has b...
Unit - Remove Marketplace 0015 <gen> from the game
Else - Actions
-------- End with Victory --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
booleanArrayForceDefeat[2] Equal to True
booleanArrayForceDefeat[3] Equal to True
booleanArrayForceDefeat[4] Equal to True
Then - Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Picked player) Equal to Player 1 (Red)
(Picked player) Equal to Player 5 (Yellow)
(Picked player) Equal to Player 9 (Gray)
Then - Actions
Game - Victory (Picked player) (Show dialogs, Show scores)
Else - Actions
Game - Defeat (Picked player) with the message: Defeat!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
booleanArrayForceDefeat[1] Equal to True
booleanArrayForceDefeat[3] Equal to True
booleanArrayForceDefeat[4] Equal to True
Then - Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Picked player) Equal to Player 2 (Blue)
(Picked player) Equal to Player 6 (Orange)
(Picked player) Equal to Player 10 (Light Blue)
Then - Actions
Game - Victory (Picked player) (Show dialogs, Show scores)
Else - Actions
Game - Defeat (Picked player) with the message: Defeat!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
booleanArrayForceDefeat[1] Equal to True
booleanArrayForceDefeat[2] Equal to True
booleanArrayForceDefeat[4] Equal to True
Then - Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Picked player) Equal to Player 3 (Teal)
(Picked player) Equal to Player 7 (Green)
(Picked player) Equal to Player 11 (Dark Green)
Then - Actions
Game - Victory (Picked player) (Show dialogs, Show scores)
Else - Actions
Game - Defeat (Picked player) with the message: Defeat!
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
booleanArrayForceDefeat[1] Equal to True
booleanArrayForceDefeat[2] Equal to True
booleanArrayForceDefeat[3] Equal to True
Then - Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Picked player) Equal to Player 4 (Purple)
(Picked player) Equal to Player 8 (Pink)
(Picked player) Equal to Player 12 (Brown)
Then - Actions
Game - Victory (Picked player) (Show dialogs, Show scores)
Else - Actions
Game - Defeat (Picked player) with the message: Defeat!
Else - Actions |
| 08-28-2003, 01:17 PM | #11 |
I dunno, but the triggers look well to me, perhaps the "Is playing" Slot status Doesn't work too well in map initialization |
| 08-28-2003, 05:17 PM | #12 |
use the [ code ] [ /code ] things instead of quote, i don't like mono-spaced, hard to read if statements anyways, by the looks of it (its really hard to read the monospaced) its only possible to defeat if you have victory -- have you tried removing those defeat statements and replacing them with debug msgs (output the status of the force and player death arrays (along with which player is receiving the msg)) it would help to know that information |
| 08-28-2003, 05:29 PM | #13 |
Then why does it never pre-defeat computer players? Why does it only sometimes do it to human players, and not to all of them? |
| 08-29-2003, 06:32 AM | #14 |
Sorry, Raptor--, didn't see your post before. I've edited it to use the code format instead of quotes. I haven't made debug messages, but as you can tell, I've got messages in place that declare when a force is first defeated, for game purposes. That message fires just fine in general games. In additional testing, when a human player had a computer on his team, and was dropped during map load, the computer was not also defeated. That would seem to indicate that the defeat trigger is not being called. Also, the defeat trigger operates such that it defeats and victories every player at the same time. One shouldn't be able to be defeated without the game being over. |
| 08-29-2003, 09:22 AM | #15 |
For your AI pb, you have to export your custom data and then import it in the AI editor. In the object editor: File --> Export All Object Data In the AI editor: Left column --> Custom Data: Import |
