• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Dialog Menu and Integers

Status
Not open for further replies.
Level 2
Joined
Aug 4, 2004
Messages
15
i want to make a dialog menu with 3 choices. ive tried alot of things with arrays and stuff that ives seen posted on this site. i followed it but when it first starts up the dialog menu i cant c the mouse ofer it but the choices are there. if i hit enter it will select the first one and do most of the actions. it wont do one. and sometimes it just sticks like that for a while and you have to keep choosing that one but sometimes it will refreash it and let you pick and i can c the mouse over the menu. also i made an integer for each player to do this and have 50 choices. i had initial value set to 0 and made it set the value to 50 after 0.01 seconds elapsed. then when u choose one of the things i want it to subtract one from 50 and keep going untill you have zero left. and i want it to show how many choices you ahve left. i tried many things but its not working. i have all 3 dialog buttons set to array 3 and the first one and the index for the first one is set for 1, 2nd one for 2, 3rd for 3. thats wut i understood from another post here. if you can help me please. this problem makes the map unplayable and the dialog buttom keeps popping up and u cant do nething at all. if u want credit in my map i will give.
 
Level 7
Joined
Jul 30, 2004
Messages
451
CheeseyPeanutz said:
i want to make a dialog menu with 3 choices. ive tried alot of things with arrays and stuff that ives seen posted on this site. i followed it but when it first starts up the dialog menu i cant c the mouse ofer it but the choices are there. if i hit enter it will select the first one and do most of the actions. it wont do one. and sometimes it just sticks like that for a while and you have to keep choosing that one but sometimes it will refreash it and let you pick and i can c the mouse over the menu. also i made an integer for each player to do this and have 50 choices. i had initial value set to 0 and made it set the value to 50 after 0.01 seconds elapsed. then when u choose one of the things i want it to subtract one from 50 and keep going untill you have zero left. and i want it to show how many choices you ahve left. i tried many things but its not working. i have all 3 dialog buttons set to array 3 and the first one and the index for the first one is set for 1, 2nd one for 2, 3rd for 3. thats wut i understood from another post here. if you can help me please. this problem makes the map unplayable and the dialog buttom keeps popping up and u cant do nething at all. if u want credit in my map i will give.

i'm not exactly sure what you're asking, the grammar and readability is a little cryptic (no offence), but what i did fathom, if you want to repeat the dialog choice until an int is dropped to 0, you will have to repeatedly re-show the dialog everytime the player presses a button as long as integer is > 0

also if ur trying to show the dialog on map initialization don't, that doesn't work, show it at 0.00 game time elapsed

other then that maybe someone else here can be more helpful than i was, i just had trouble reading it
 
Level 2
Joined
Aug 4, 2004
Messages
15
i wanna make it that when u type something you get to select something from a dialog menu and you get to pick one of the three 50 times. like choosing one of three units but getting 50 units. i also want it to say how many choices you have left.
 
Level 7
Joined
Jul 30, 2004
Messages
451
CheeseyPeanutz said:
i wanna make it that when u type something you get to select something from a dialog menu and you get to pick one of the three 50 times. like choosing one of three units but getting 50 units. i also want it to say how many choices you have left.

so basically you want something like you get a dialog choice of A B and C, and u can choose something 50 times

so defined variables: nChoicesLeft[]
and created dialog stuff i'll just refer to as dialog and dialogbutton1 2 and 3

event - map init
actions -
for A = 1 to maxplayers
+ set nChoicesLeft[A] = 50

event - player types message (or whatever)
conditions - nChoicesLeft[player number of trig player] > 0
actions -
show dialog[player num of trig player] to triggering player

event - dialog button pressed for dialog[x]
conditions - clicked button == dialogbutton1
actions -
create unit A for player x
if nChoicesLeft[x] > 0 then
+ show dialog[x] to player x

and for other 2 buttons


er, if someone else wants to post a better way be my guest, i was making this up as i go
 
Level 2
Joined
Aug 4, 2004
Messages
15
i got the dialog working just fine, but the integers not working for me i veiwed a tutorial on dialogs on some site and the integer thing isnt working so ill show u the trigger i have for the agility unit (choice 1, player 1)

Event - a dialog button is clicked from menu1
Conditions - Clicked dialog button Equal to Agility (array 1)
Actions - Set start1 (array 1)= start1 (array 1) - 1
- create unit in region1 for player1
- Hide menu1
- Show menu1
(i use hide and show menu1 to refreash the menu so it will go from 50 to 49 to 48 ect)
 
Level 7
Joined
Jul 30, 2004
Messages
451
CheeseyPeanutz said:
i got the dialog working just fine, but the integers not working for me i veiwed a tutorial on dialogs on some site and the integer thing isnt working so ill show u the trigger i have for the agility unit (choice 1, player 1)

Event - a dialog button is clicked from menu1
Conditions - Clicked dialog button Equal to Agility (array 1)
Actions - Set start1 (array 1)= start1 (array 1) - 1
- create unit in region1 for player1
- Hide menu1
- Show menu1
(i use hide and show menu1 to refreash the menu so it will go from 50 to 49 to 48 ect)

yeah, and you have no checks for start1(array1) -- no matter what it is it will continue to show the dialog
- hide menu1
- if start1(array1) > 0 then
- + show menu1
- else
- + do nothing
 
Level 2
Joined
Aug 4, 2004
Messages
15
i have that as a seperate trigger. the integer inst working not the menu i got the menu working fine. here
If/Then/Else
Condition - Start1 (array 1)> 0
Then - Show menu1
Else - hide menu1
do i need an event?
the integer (start1 - start8) isnt working at all. it is value 0(default) at start and i set it to 50 (time elapsed 1 second). i have other triggers that are supposed to make clicking a button subtract one from start1 if its player one, ect. but it doesnt subtract it it just stays at 50 the whole time so your stuck on the dialog menu for the whole time and cant do anything. wuts wrong?
 
Level 7
Joined
Jul 30, 2004
Messages
451
CheeseyPeanutz said:
i have that as a seperate trigger. the integer inst working not the menu i got the menu working fine. here
If/Then/Else
Condition - Start1 (array 1)> 0
Then - Show menu1
Else - hide menu1
do i need an event?
the integer (start1 - start8) isnt working at all. it is value 0(default) at start and i set it to 50 (time elapsed 1 second). i have other triggers that are supposed to make clicking a button subtract one from start1 if its player one, ect. but it doesnt subtract it it just stays at 50 the whole time so your stuck on the dialog menu for the whole time and cant do anything. wuts wrong?

what? you have it as a seperate trigger? how is warcraft suppose to use this stuff then? it will NEVER get to the trigger since nothing calls it

put the if

Event - a dialog button is clicked from menu1
Conditions - Clicked dialog button Equal to Agility (array 1)
Actions - Set start1 (array 1)= start1 (array 1) - 1
- create unit in region1 for player1
- hide menu1
- if start1(array1) > 0 then
- + show menu1
- else
- + do nothing

a trigger will never run on its own, warcraft will never just look through triggers and run them on its own, you have to tell it when to run triggers
 
Status
Not open for further replies.
Top