HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

My dialog screw up...

10-25-2007, 04:50 PM#1
teddybear
I got a strange problem that i have no idea how to fix...
I created a trigger that when you selecting a specific unit,and new dialog will jump up to the triggering player and will tell him something with 4 answer ways:

Trigger:
Battlemaster Riyon
Collapse Events
Player - Player 1 (Red) Selects a unit
Player - Player 2 (Blue) Selects a unit
Player - Player 3 (Teal) Selects a unit
Player - Player 4 (Purple) Selects a unit
Player - Player 5 (Yellow) Selects a unit
Player - Player 6 (Orange) Selects a unit
Player - Player 7 (Green) Selects a unit
Collapse Conditions
(Triggering unit) Equal to Battlemaster Riyon 0015 <gen>
Collapse Actions
Dialog - Clear Battle1
Dialog - Change the title of Battle1 to Battlemaster Riyon:...
Dialog - Create a dialog button for Battle1 labelled Im in!
Set Battle1_B[1] = (Last created dialog Button)
Dialog - Create a dialog button for Battle1 labelled Can you tell me mor...
Set Battle1_B[2] = (Last created dialog Button)
Dialog - Create a dialog button for Battle1 labelled Take me to the Hono...
Set Battle1_B[3] = (Last created dialog Button)
Dialog - Create a dialog button for Battle1 labelled Mayby next time...
Set Battle1_B[4] = (Last created dialog Button)
Dialog - Show Battle1 for (Triggering player)


and now is the dialog's effects:

Trigger:
Battlemaster Riyon answer
Collapse Events
Dialog - A dialog button is clicked for Battle1
Dialog - A dialog button is clicked for Battle1_ask
Collapse Conditions
(Triggering player) Equal to Player 7 (Green)
(Triggering player) Equal to Player 6 (Orange)
(Triggering player) Equal to Player 5 (Yellow)
(Triggering player) Equal to Player 4 (Purple)
(Triggering player) Equal to Player 3 (Teal)
(Triggering player) Equal to Player 2 (Blue)
(Triggering player) Equal to Player 1 (Red)
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Battle1_B[3]
Collapse Then - Actions
Unit - Move Hero[(Player number of (Triggering player))] instantly to (Center of Honor Enter <gen>)
Special Effect - Create a special effect at (Position of Hero[(Player number of (Triggering player))]) using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Battle1_B[1]
Collapse Then - Actions
Unit - Move Hero[(Player number of (Triggering player))] instantly to (Center of Ashara Enter <gen>)
Special Effect - Create a special effect at (Position of Hero[(Player number of (Triggering player))]) using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Battle1_B[2]
Collapse Then - Actions
Dialog - Clear Battle1_ask
Dialog - Change the title of Battle1_ask to Battlemaster Riyon:...
Dialog - Create a dialog button for Battle1_ask labelled I got it...
Set Battle1_button = (Last created dialog Button)
Dialog - Show Battle1_ask for (Triggering player)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Battle1_button
Collapse Then - Actions
Dialog - Show Battle1 for (Triggering player)
Else - Actions


But its does'nt working...
button 1 supporsed to teleport the hero to a specific place,button 2 gives more info (jump another dialog),button 3 teleport to another place and button 4 dos'nt doing nothing.
but the problem is that no one of them are really does somthing,its like "Battlemaster Riyon answer" trigger is off...help please,what have i missed?
10-25-2007, 05:11 PM#2
Fireeye
The problem is the trigger unit part in the condition, due there's no unit in the event the trigger unit will return null.
You need to check for selected unit.

---Edit---
This is what you propably searching for, don't know any other way for this.
Trigger:
Actions
Set HeroGroup = (Units currently selected by (Triggering player))
Collapse Unit group - Pick every unit in HeroGroup and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse IF - Conditions
(Picked unit) Equal to <Your Unit>
Collapse THEN - Actions
//Put your actions here
ELSE - Actions
Custom script: call DestroyGroup(udg_HeroGroup)
Would be shorter and easier in JASS, but i think you want it in GUI, don't know any other solution.
10-25-2007, 05:33 PM#3
teddybear
In the start of the map,after you choose a hero, its set the last created unit to the "hero of the player" and then i may action them with triggers as many as i want without specical event...
~Hero[(Player number of (Triggering player))]~
and ther is one more action without units-
Trigger:
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to Battle1_B[2]
Collapse
Then - Actions
Dialog - Clear Battle1_ask
Dialog - Change the title of Battle1_ask to Battlemaster Riyon:...
Dialog - Create a dialog button for Battle1_ask labelled I got it...
Set Battle1_button = (Last created dialog Button)
Dialog - Show Battle1_ask for (Triggering player)

and thats not working too...