• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] MPI Dialogs

Status
Not open for further replies.
Ok so I've come up with a few problems and I need some clarification.
When doing dialogs is it ok to use local player for the creation of buttons? Or changing the title?
Or an even better question can you modify a dialog and clear/show it locally?
Or if you modify a dialog will it effect all players viewing that dialog?
Well I'm not sure what I'm doing wrong, but I'm hitting some desyncs.
Here is the trigger that I used in an attempt at MPI dialogs.
  • Give
    • Events
    • Conditions
    • Actions
      • Set Player1 = (Triggering player)
      • Set Integer1 = (Player number of Player1)
      • Set String1 = (Substring((Entered chat string), 2, 9))
      • Set Integer2 = (Integer(String1))
      • Set Giving[Integer1] = Integer2
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer2 Greater than 0
        • Then - Actions
          • Set String1 = Choose |cff0000ffMi|r|cff99b4d1ne|r|cffadff2fra|r|cffff0000lz|r
          • Set String2 = |cff0000ffSaphhirum|r
          • Set String3 = |cff99b4d1Diamonite|r
          • Set String4 = |cffadff2fEmnizium|r
          • Set String5 = |cffff0000Rubinite|r
          • Set String6 = Cancle
          • Custom script: if GetLocalPlayer() == udg_Player1 then
          • Dialog - Clear Dialog
          • Dialog - Change the title of Dialog to String1
          • Dialog - Create a dialog button for Dialog labelled String2
          • Custom script: call SaveInteger(udg_Mineralz,GetHandleId(GetLastCreatedButtonBJ()),0,1)
          • Dialog - Create a dialog button for Dialog labelled String3
          • Custom script: call SaveInteger(udg_Mineralz,GetHandleId(GetLastCreatedButtonBJ()),0,2)
          • Dialog - Create a dialog button for Dialog labelled String4
          • Custom script: call SaveInteger(udg_Mineralz,GetHandleId(GetLastCreatedButtonBJ()),0,3)
          • Dialog - Create a dialog button for Dialog labelled String5
          • Custom script: call SaveInteger(udg_Mineralz,GetHandleId(GetLastCreatedButtonBJ()),0,4)
          • Dialog - Create a dialog button for Dialog labelled String6
          • Custom script: endif
          • Set DialogNumber[Integer1] = 1
          • Dialog - Show Dialog for Player1
        • Else - Actions
All help would be appreciated.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
You really cant though, try it... :O

You propably just haven't create dialogs for the indexes you're using.

For example if you are using a dialog array and set the initial size to 1, indexes starting from 2 are not created, they contain null value. You need to increase the initial size to 11 (dialogs initialized for indexes 0-11) or create the dialogs manually.

  • Custom script: set udg_dialogArray[x] = DialogCreate()
 
You propably just haven't create dialogs for the indexes you're using.

For example if you are using a dialog array and set the initial size to 1, indexes starting from 2 are not created, they contain null value. You need to increase the initial size to 11 (dialogs initialized for indexes 0-11) or create the dialogs manually.

  • Custom script: set udg_dialogArray[x] = DialogCreate()

You are my hero.


Yeah, the same thing applies for group arrays.
You need to create them with CreateGroup().
This is extremely useful knowledge to me, thank you :D


This can be marked as solved!
 
Last edited:
Status
Not open for further replies.
Top