#1 24-07-2017 18:19

V1k1nG-OG-Times
Registered: 24-07-2017
Posts: 2

Multiple dialogs

Hi, i want a script for multiple dialogs. Meaning, when i press "Next" button on dialog to apear other dialog, and when i press "Back" button to appear the previous dialog.

Offline

#2 31-07-2017 20:44

kosticn101
Registered: 07-07-2017
Posts: 1

Re: Multiple dialogs

I've created this simple mod for you. Change the dialog with left and right arrow. In Sanny Builder options, Case Converting has to be set to "As is" for this to work.

{$CLEO}
0000:
0@ = 1
0ADF: add_text_label 'D1' text "Dialog 1"
0ADF: add_text_label 'D2' text "Dialog 2"
0ADF: add_text_label 'D3' text "Dialog 3"
0ADF: add_text_label 'D4' text "Dialog 4"
0ADF: add_text_label 'D5' text "Dialog 5"
0ADF: add_text_label 'D6' text "Dialog 6"
0ADF: add_text_label 'D7' text "Dialog 7"
0ADF: add_text_label 'D8' text "Dialog 8"
0ADF: add_text_label 'D9' text "Dialog 9"
0ADF: add_text_label 'D10' text "Dialog 10"

while true
    wait 500
    if 0AB0: key_pressed 37 //left
    then
        0@ -= 1
        if 0@ < 1
        then
            0@ = 1
        end
    end
    if 0AB0: key_pressed 39 //right
    then
        0@ += 1
        if 0@ > 10
        then
            0@ = 10
        end
    end
    0AD3: 1@s = format "D%d" 0@ //because of s you're not allowed to use next variable (2@)
    00BC: show_text_highpriority GXT 1@s time 500 flag 1
end

0A93: end_custom_thread

Last edited by kosticn101 (01-08-2017 00:05)

Offline

Board footer

Powered by FluxBB