HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Would This Trigger Work?

12-13-2003, 12:41 PM#1
Setreal
This trigger works fine when I test alone but I'm unsure how it'll work in multiplayer since multiple people will be using it. (The local player part is what worries me).

Buttons
Events
Dialog - A dialog button is clicked for Menu_Main
Conditions
Actions
-------- Archery Range --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Loader Equal to Archery Range
Then - Actions
-------- Button 1 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Menu_Main_Btn[0]
((Local player) Current gold) Greater than or equal to 0
Then - Actions
Player - Add 0 to (Local player) Current gold
Dialog - Hide Menu_Main for (Local player)
Unit - Order LoadingUnit to Unload LoadedUnit
Unit - Replace LoadedUnit with a Worker using The old unit's relative life and mana
Else - Actions
-------- Button 2 --------
If ((Clicked dialog button) Equal to Menu_Main_Btn[1]) then do (Do nothing) else do (Do nothing)
-------- Button 3 --------
If ((Clicked dialog button) Equal to Menu_Main_Btn[2]) then do (Dialog - Hide (Clicked dialog) for Player 3 (Teal)) else do (Do nothing)
Else - Actions
12-13-2003, 01:41 PM#2
linkmaster23
nope, have to make one for each player. Ino i sucks
12-13-2003, 02:45 PM#3
Dead-Inside
Yep... Also that is a VERY distrubing way of writing a dialog-button-check trigger, just so you know.

Regards
Dead-Inside
12-13-2003, 03:29 PM#4
Hunter0000
cant you use triggering player?
12-13-2003, 03:46 PM#5
Dead-Inside
Nope. Nuff said.
12-13-2003, 08:56 PM#6
Setreal
Quote:
Originally posted by Dead-Inside
Yep... Also that is a VERY distrubing way of writing a dialog-button-check trigger, just so you know.

Regards
Dead-Inside


Why is it disturbing?

Edit : By the way I think I may of found a different way. This trigger would always occur before the one I showed(or one for a different building).

Archery Range
Events
Unit - A unit Is loaded into a transport
Conditions
(Unit-type of (Transporting unit)) Equal to Archery Range
Actions
Set LoadedUnit = (Loading unit)
Set LoadingUnit = (Transporting unit)
Set Loader = Archery Range
Dialog - Create a dialog button for Menu_Main labelled Convert to Archer
Set Menu_Main_Btn[0] = (Last created dialog Button)
Dialog - Create a dialog button for Menu_Main labelled Convert to Longbow ...
Set Menu_Main_Btn[1] = (Last created dialog Button)
Dialog - Create a dialog button for Menu_Main labelled Cancel
Set Menu_Main_Btn[2] = (Last created dialog Button)
Dialog - Show Menu_Main for (Owner of (Loading unit))

Couldn't I save the owner of the loading unit into a player variable and use for that trigger in my first post?