HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

dialogue choice

11-18-2003, 08:41 PM#1
Kaluo
I can't get my dialogue box choice to reult in a unit creation action. my exact trigger is
Dialogue button is clicked for x

y = clicked dialogue button

If
Or, multiple functions
triggering player = 1
triggering player = 2
triggering player = 3 > Is there a triggering player = any player
triggering player = 4 from unit group?
triggering player = 5
Then
Display to triggering player- yadayadablahblah
create one z for triggering player at r

It's always worked for me with setting variables as a result of dialogue but maybe its in the conditions? anyhow im confused
11-18-2003, 11:02 PM#2
Kaluo
anyone know why this isnt working?
11-19-2003, 12:18 AM#3
Draco
I don't really understand how you worded that, but there are a few example maps (use the two near the bottom), in this thread...


http://www.wc3campaigns.com/forums/s...ialog+tutorial
11-19-2003, 01:29 AM#4
Kaluo
all right, basically I want dialogue for many people wherein different box selections cause units to spawn for that player in different regions. I have only been able to have dialogue selections result in variable sets. If i try to make it do anything else i.e. create unit display message nothing happens. What am I doing wrong and how do i fix it?
11-19-2003, 01:39 AM#5
RicFaith
I've got something like that in mine. well sort of.

The triggering section has to include every possible option for every person that could trigger it.

eg.

Trigger DialogClick
E: MenuButton_P1[0] is clicked
....
MenuButton_PX[Y-1] is clicked
>> for X players and Y choices

C: <you don't need any conditions>

A:
Set Plr_Num = Player Number(<triggering player>)

>>And depending on the choice of character, you can save a variable called NewHero (unit-type). eg:
If
<multiple Or>
<last button clicked> = MenuButton_P1[0]
....
<last button clicked> = MenuButton_PX[0]
then
Set NewHero = <Fryth Berserker>
else
If
<multiple Or>
etc....

>>Furtherdown or a new Trigger, you can :

Create 1 NewHero at <location> facing <default building>

Hope this helps.:D
11-19-2003, 01:41 AM#6
Draco
The link I posted above contains a variety of examples.
11-19-2003, 02:08 AM#7
SpectreReturns
Sorry, but you cant use Triggering player for dialogs. You are going to need to replicate it 4 times, or do it some other way.
11-19-2003, 05:47 AM#8
RicFaith
Er... I don't have my map with me here, when I get back home, I'll post what I wrote in this Trigger. Yes I only have 1 trigger for all the Dialog Creation, 1 trigger for all Show and 1 trigger for all Click.

Cheers :D
11-19-2003, 11:25 PM#9
RicFaith
Ok here's what I've got for Dialog Click

E:
Dialog - A dialog button is clicked for <all the various dialogs that I have for class change>

C:
<nothing>

A:
Set Plr_Num = (Player Number of Triggering Player) - 1
>> I minus 1 because the first number should be 0 for an array, but player numbers start at 1

If
<Or, any conditions are true>
- (Clicked dialog button) = Menu_ChClButtonP1[0]
- (Clicked dialog button) = Menu_ChClButtonP2[0]
- (Clicked dialog button) = Menu_ChClButtonP3[0]
- (Clicked dialog button) = Menu_ChClButtonP4[0]
>> 1st button for any of the players is pressed
Then
Set Plr_H_Str(Plr_Num) = Plr_H_Str(Plr_Num) + 1
else
<nested if>
>> continues to do the same thing for Buttons [1] & [2] to give Agi and Int.


----

It works like a charm, and it saves me a lot of code. and yea, triggering player works fine.
11-27-2003, 12:57 PM#10
merlin124
hi,

my problem was that I can't create a unit for the triggering player after dialog choice.

but I solved that problem by converting the player index of the triggering player to the player:

create one (unit) for (ConvertPlayerIndexToPlayer(Number of(TriggeringPlayer))) ...