• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Integer A Variable Dialog Does Not Show

Status
Not open for further replies.
Level 6
Joined
Sep 11, 2006
Messages
172
I have a system for specific dialogs to appear at certain points of which the dialogs are randomly assigned.

Thus the need for space saving, using integer a, in setting up the script.

I have tested all other parts of this trigger to see that they are activating. The only problem is the dialog, which does not show.

I have created the dialogs, 1 through 11, in a previous trigger using custom script.

  • Custom script: set udg_ChooseSpire[1] = DialogCreate()

  • Choose City
    • Events
      • Unit - A unit enters TunnelEntrance 1 <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to |cffb9d1eaScientist|r
    • Actions
      • -------- RanSpawn1= Ignesium --------
      • -------- RanSpawn2= Alaronth --------
      • -------- RanSpawn3= Colletis --------
      • -------- RanSpawn4= Avinum --------
      • -------- RanSpawn5= Quarus --------
      • -------- RanSpawn6= Orfus --------
      • -------- RanSpawn7= Gellus --------
      • -------- RanSpawn8= Lucidus --------
      • -------- RanSpawn9= Mortia --------
      • -------- RanSpawn10= Umbris --------
      • -------- RanSpawn11= Lapideus --------
      • Set TempString[1] = |cffdeb887You see a feint glow far down this tunnel... The smell of hot metal wafts up in warm updrafts.|r
      • Set TempString[2] = |cffdeb887Something crackles and snaps in the emptiness of the voidful tunnel. A series of dancing lights lead your eyes from within the depths.|r
      • Set TempString[3] = |cffdeb887You are assailed by the strong scent of some sort alien flora. A viney life has over taken the walls around you.|r
      • Set TempString[4] = |cffdeb887A powerful draft of wind rushes at you from within. Where is this coming from?|r
      • Set TempString[5] = |cffdeb887Collesced moisture trickles down grooves in the wall and flows through small trenches to either side of the tunnel.|r
      • Set TempString[6] = |cffdeb887You are greeted by the distant thrum of some sort of mechanism... still beating somewhere deep within the crust.|r
      • Set TempString[7] = |cffdeb887It is uncomfortably cold... The walls here drip as ice begins to melt, but you can see that it is thicker deeper in.|r
      • Set TempString[8] = |cffdeb887Golden walls shine as they are exposed to light. A brilliant pillar lights the top of a spiral staircase.|r
      • Set TempString[9] = |cffdeb887Something foul wafts up from the moist air below. An odd growth glings to walls.|r
      • Set TempString[10] = |cffdeb887The tunnel ahead is pitch black and cold... a mysterious entrance forces you to question your intrusiveness.|r
      • Set TempString[11] = |cffdeb887Carved stone decorates the walls intricately here. Glowing formations dot the descending tunnel ahead.|r
      • Set RegOp = TunnelEntrance 4 <gen>
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Integer A) Less than 12
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Open[(Integer A)] Equal to True
                  • (RegOp contains (Center of RanSpawn[(Integer A)])) Equal to True
                • Then - Actions
                  • Set sound = No sound
                  • Set sound = SecretFound <gen>
                  • Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
                  • Sound - Play sound
                  • Custom script: endif
                  • Dialog - Change the title of ChooseSpire[(Integer A)] to Enter?
                  • Game - Display to (All players matching ((Owner of (Entering unit)) Equal to (Matching player))) the text: TempString[(Integer A)]
                  • Wait 4.00 seconds
                  • Dialog - Clear ChooseSpire[(Integer A)]
                  • Dialog - Create a dialog button for ChooseSpire[(Integer A)] labelled Yes
                  • Set ChooseSpireButtons[1] = (Last created dialog Button)
                  • Dialog - Create a dialog button for ChooseSpire[(Integer A)] labelled No
                  • Set ChooseSpireButtons[2] = (Last created dialog Button)
                  • If ((RegOp contains (Entering unit)) Equal to True) then do (Dialog - Show ChooseSpire[(Integer A)] for (Owner of (Entering unit))) else do (Do nothing)
                  • Custom script: set bj_forLoopAIndex = 13
                • Else - Actions
            • Else - Actions
              • Game - Display to (All players matching ((Owner of (Entering unit)) Equal to (Matching player))) the text: This entrance is no...
              • Trigger - Turn off (This trigger)
 
well duh u never show it?

Dialog - show dialog

the event is

Unit - A unit enters TunnelEntrance 1 <gen>

where regop is

Set RegOp = TunnelEntrance 4 <gen>

so

If ((RegOp contains (Entering unit)) Equal to True) then do (Dialog - Show ChooseSpire[(Integer A)] for (Owner of (Entering unit))) else do (Do nothing)

that wont return true assuming the tunnel entrances are different. why the wait though
 
You're right. That random variable change happened while I was trying to fix the problem and was only half of my problem. The custom script for activating dialogs was what I really needed.

So I fixed my problem and then broke it again.

Thanks for pointing out what was right under my nose.
 
Status
Not open for further replies.
Back
Top