SC2Mapster Forums

Development > Triggers

Is there a event that triggers when user selects list item?

  • 5 posts
    #1 Oct 31, 2012 at 21:01 UTC - 0 likes

    Hello

    Is there an event that triggers when a user selects a list item from a dialog item?

    I need it so that when a user selects a list item, it will run through the list and pick the number for the list item that is selected.

    #2 Nov 01, 2012 at 01:25 UTC - 0 likes

    Yes but it only works on a click, not a highlight (I think.) You want the Dialog Item Used event, with the option set to "clicked."

    My Projects:
    Malum Ruina: SC2Mapster
    Eternal Exile: SC2Mapster
    Spine Crawler Madness: SC2Mapster
    Xeno Crisis: SC2Mapster

    #3 Nov 03, 2012 at 13:12 UTC - 0 likes

    @BasharTeg: Go

    I think changed selection would also work just set a default selection to the currently selected list item for each player at map initialization.

    #4 Nov 03, 2012 at 21:54 UTC - 0 likes

    @BasharTeg: Go

    const int c_triggerControlEventTypeMouseEnter = 6;
    const int c_triggerControlEventTypeMouseExit = 7;

    These can be used for any desired hover effect, though I don't think this pertain to the OP.

    I am new to the SC2 Editor, but I have years of C programming experience (relevant to galaxy script).
    Send me a message if you need help with programming concepts or galaxy script syntax.
    Do not ask me how to do something specifically related to SC2 as I am not fluent with the galaxy API yet.

    #5 Nov 04, 2012 at 08:46 UTC - 0 likes

    An example trigger for difficulty selection:

    Difficulty pulldown menu used
        Events
            Dialog - Any Dialog Item is used by Player 1 with event type Changed Selection
        Local Variables
        Conditions
            (Used dialog item) == Difficulty (Pulldown menu)
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Selected list item of Difficulty (Pulldown menu) for 1) == 1
                Then
                    Game - Set the difficulty level of the next mission to Casual for (All players)
                Else
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Selected list item of Difficulty (Pulldown menu) for 1) == 2
                Then
                    Game - Set the difficulty level of the next mission to Normal for (All players)
                Else
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Selected list item of Difficulty (Pulldown menu) for 1) == 3
                Then
                    Game - Set the difficulty level of the next mission to Hard for (All players)
                Else
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Selected list item of Difficulty (Pulldown menu) for 1) == 4
                Then
                    Game - Set the difficulty level of the next mission to Brutal for (All players)
                Else
    


    http://www.sc2mapster.com/media/images/40/774/hoh_logo5.jpg

  • 5 posts

You must login to post a comment. Don't have an account? Register to get one!