Speaker text with static position

  • #20, by Yug_EtsapMonday, 27. January 2014, 19:39 11 years ago
    I'm using the loop, because if I don't, then the script will just continue running through. The Dialog Choice interface will appear, but the script won't wait for the player to select a choice, so it'll reach the IF statements for the Choice variable and after not completing any of them, the script will just end before the player has had a chance to even click one of the buttons. Clicking anywhere other than the buttons does nothing right now, as it should. Right now it works pretty much flawlessly. But yeah, I should move the majority of the script into its own action.

    It can be done in Lua, sure - but I don't see a real reason to change anything right now, it's a pretty simple script and it works pretty well.

    Newbie

    12 Posts


  • #21, by afrlmeMonday, 27. January 2014, 20:19 11 years ago
    hehe... my point was that you could simply have one action for showing the dialog choices then another which is called after a dialog choice is selected.

    -- executed left click action
    show dialog box
    display choice 1
    display choice 2
    ...
    

    -- dialog object area executed example...
    hide dialog box
    set x value to 1
    call action "check_dialog_a"
    

    -- check dialog a (called by other action) example
    if value x = 1
     -- add some actions
    else
     if value x = 2
      -- add some actions
     else
      if value x = 3
       -- add some actions
      else
       if value x = 4
        -- add some actions
       end if
      end if
     end if
    end if
    


    something along the lines of this... it's a rough explanation though & I really don't like using the if else query system in the vs editor if I can help it as it is not as flexible as doing them with Lua. the editor does not have and/or/elseif options.

    Imperator

    7278 Posts

  • #22, by Yug_EtsapMonday, 27. January 2014, 21:38 11 years ago
    Yeah, I thought of doing it exactly that way, but the thing is - every dialog is going to be unique. There'll be unique text for each choice, and the results will also be unique. In order to do it this way, I'd have to store the choice text into variables before I call the script that displays them and I think that's kind of redundant. If I'm going to add a line that stores into a variable, I might as well just add the line that fills in the text directly. Calling the interface is also a single line, so there's no need to put it in a separate script.

    Calling a script to check what the answer is is also pointless, I think, because each outcome will be different.

    Although, this way would be very useful if I had any animations during the whole process, so I don't have to describe them every time.

    Newbie

    12 Posts

  • #23, by afrlmeMonday, 27. January 2014, 22:25 11 years ago
    it wasn't a script. it's action parts in the editor. but no worries, use whatever method works for you. wink

    Imperator

    7278 Posts