galgame-like HUD

edited April 2015 in Projects

Credit to XavierCHN, Translated by Aerohand

This is a small action script library to help you create galgame like talking pannel! how it looks like now

how to use it: download from here https://github.com/AeroHand/RPGDialogDemo

Step 1:

put the swf into ur custom ui.txt

"3"
{
    "File"      "RPGDialog"
    "Depth"     "999"
}

also remember to put some portraits here resource/flash3/images/rpg/npc_portraits/

to show the dialog for all the players

xDialog:ShowDialog({
            [1] = "#dialogSentence1", -- the first sentence appear in ur dialog panel. u need to write it down in addon_english
            [2] = "#dialogSentence2",
            [3] = "#dialogSentence3",
            [4] = "#dialogSentence4" -- u could add more dialog here

        },{
            allowSkip = "yes", -- if this is set to yes ppl could skip all the dialog, or they are forced to see all the dialogs one by one

            npcName = "miku", -- the name of the npc,        resource/flash3/images/rpg/npc_portraits/ also should be the same as the file name of the png in this file
            endDialogCallback = function(playerID) -- the function executed for one specific player after reading the dialog, for example create a boss....
                print("player end reading dialog" .. playerID)
            end
        })

for specific player

xDialog:ShowDialog(0,{
[1] = "#dialogSentence1",
[2] = "#dialogSentence2",
[3] = "#dialogSentence3",
[4] = "#dialogSentence4"
},{
allowSkip = "yes",
npcName = "miku",
endDialogCallback = function(playerID)
print("player end reading dialog" .. playerID)
end
})

Comments

  • DunDun
    Posts: 123

    neeeat

  • Posts: 45

    expect neeeeet instead of neeeeat XD not very familiar with syntax here. gonna edit it.

  • Posts: 45

    it eats a lot of enter so it looks messedup...

  • Posts: 1,670

    Edited, check the forum syntax if you have issues formatting

    The concept of Modding Community doesn't go well together with Competitive Business
    My Project Page || My GitHub Profile ||

  • Posts: 45

    thank u!

  • DunDun
    Posts: 123

    I suggest you add custom_events.txt to repo as well so there wouldn't be another poor soul trying to find out why they get 'CreateEvent: event 'xgui_show_rpg_dialog' not registered' message

  • looks nice, glad to see some more ui modifications here!

  • Posts: 45

    Ok this is still WIP and we r gonna add support for more languages (the button now is only chinese) will announce here again when we finish