HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Player Dialog Initializations

04-09-2004, 03:01 AM#1
Makari
I'm starting my map with a Dialog box for each player. There's up to 4 human players and 4 orc players, how can I, on map initialization, select all the human players that are playing, and create a human selection dialog for them, and pick all the orc players that are playing, and create an orc selection dialog for each of them.

I've got a variable for an array of human dialog's already and one for orcs, and an array for the list of buttons on each one, I'm just looking for the most efficient way to select all the playing human players ( players 2-5 ) and give them the human dialogs and the same for the orc players that are playing.
04-09-2004, 01:47 PM#2
johnfn
Well first of all, you cant make a dialog at map init. It gets messed up for some reason. So do something like

Events:
0.2 seconds have passed


And for your other problem , you need a race comparison. This is what you want:

Player Group - Pick every player in (All players matching ((Race of (Picked player)) Equal to Human)) and do (Actions)
Loop - Actions
Make your dialog here.


Then just do the same thing for orcs.
04-09-2004, 05:24 PM#3
Makari
Quote:
Originally Posted by johnfn
Well first of all, you cant make a dialog at map init. It gets messed up for some reason. So do something like

Events:
0.2 seconds have passed


And for your other problem , you need a race comparison. This is what you want:

Player Group - Pick every player in (All players matching ((Race of (Picked player)) Equal to Human)) and do (Actions)
Loop - Actions
Make your dialog here.

Then just do the same thing for orcs.

k, I understand how to choose the players from humans and from orcs, but in creating the dialogs you have to create a separate dialog for each one right? so in the loop how would I go about making a separate dialog for each.. or am I incorrect in that you have to make a separate one for each?
04-09-2004, 05:58 PM#4
johnfn
I am UNexperianced w/ dialogs. Never found much reason to use them. But I did find a good post.


http://www.wc3campaigns.com/showthre...&threadid=2408

My idea for your problem is this:

make an array of dialogs for each player.

in the loop, do something like this : add dialog button to dialog[player number(picked player)] with caption whatever

So yes, you would need to create seperate dialogs. I'd provide more info, but you havent given me much to go off of.
04-11-2004, 01:55 AM#5
Makari
ok, I've got the dialogs working as I want them for the most part. I have a new question about them though. the event response for clicking a dialog button is setup so you have to select exactly which dialog the button is clicked on. is there any way I can get one trigger to respond to whenever any of the dialog buttons are clicked on, and then somehow retrieve which one was clicked out of the array? or am I going to have to do a separate trigger for each dialog button out of each dialog box?
04-14-2004, 08:18 AM#6
Makari
I could really use somebodies help with this...

I'll try to explain what I've got a little better.

I declared arrays for all of my dialog objects with enough items in the array for every player
so I've got these arrays:
humandialog()
Hbutton1()
Hbutton2()
Hbutton3()
Orcdialog()
Obutton1()
Obutton2()
Obutton3()

then for my trigger I ran an integer loop from 1 to 12 and and if / then / else loop checking player slot ( integer A ) for user to be a user player and human race for the first set of conditions, retitleing human dialog ( integer A) and creating Hbutton1(int A), button2(int A), button3(int A)... the other set of if conditions were user player and orc race, making orddialog (int A), and the orc buttons to correspond to that player slot #...

I did all of this kinda assuming that I'd be able to find a trigger that would let me know which button out of the array was pressed... but when I went searching... no dice.. so can anyone please help me out? does anyone out there have any idea what I'm talking about?? :)... any help would be appreciated :)
04-14-2004, 04:36 PM#7
Makari
any programmers out there able to help me out? :)
04-16-2004, 01:51 AM#8
Makari
seriously... any help at all on this would be greatly appreciated... even if it's just to tell me that you know for sure that I have to make a trigger for each individual dialog button for each player