• 0

    posted a message on How do you prevent a player from spamming a dialog button multiple times before it is disabled?

    @maverck: Go

    Well, that's not entirely correct. Redconfusions example does work (see third post). The trigger he creates in this example only fires its actions once, I tried it with a test message, no matter how often you spam the button (until it is reset ofc).

    Problem is I don't understand how to implement this in my setup using different buttons. My buttons call a trigger - and that is the problem I suppose, because there needs to be a trigger that checks if a specific button is pressed using variables (my problem) - and then fires the trigger (the trigger that does what you want the button to do) while the variable has disabled the button itself.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How do you prevent a player from spamming a dialog button multiple times before it is disabled?

    Nope, doesn't work... as soon as it's live on battle.net the buttons are so laggy, i can even press them thrice. Totally out of ideas.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How do you prevent a player from spamming a dialog button multiple times before it is disabled?

    @ubermikeleet: Go

    Hmm, I am trying this now - it's a global trigger that should prevent any button from being spammed:

    Events

    Dialog - Any Dialog Item is used by Player Any Player with event type Clicked

    Conditions

    Button pressed[0] == 0

    Actions

    Variable - Set Button pressed[0] = 1

    Dialog - Disable (Used dialog item) for (All players)

    UI - Display "button pressed" for (All players) to Subtitle area

    General - Wait 1.0 Game Time seconds

    Dialog - Enable (Used dialog item) for (All players)

    Variable - Set Button pressed[0] = 0

    But I am unsure if this will be rendered useless once published because of the battle.net lag... gotta try it first.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [How do I] Map Publishing for Single Player (fixed settings)

    @GnaReffotsirk: Go

    This is from KelvCM and it helped me a ton:

    Locked Alliances - (All Players) Yes Premade Game - (All Players) Yes Teams [Premade] - (All Players) 5 v 5 Color: 1 - 10, Red through Dark Green Controller, 1 and 6 Computer, Everything else open. Participant Role: 1, 6, 11 none, Everything else Participant. Teams[Premade: 5v5]: 1-5, Team[1-5], 6-10, Team[6-10], 11 (none).

    If you go by this setup, nothing should go wrong when you try to publish. Of course, do change team setups as you like - i.e. FFA instead x vs x players etc. As for the game speed, not sure if when you force disable this, the map will publish - but if it doesn't, just lock it using a trigger. It's called "Lock Game Speed".

    Cheers,

    Posted in: Miscellaneous Development
  • 0

    posted a message on How do you prevent a player from spamming a dialog button multiple times before it is disabled?

    Can you show me how you implemented this procedure into multiple buttons using multiple variables? I can't seem to be able to get this to work - only in the example provided in this thread, yes - but I can't seem to be able to disable each button seperately.

    What I do is:

    I create my buttons: Dialog - Display button MDG_Selection_01_Player_01 of size (250, 60) with text "4 Hydralisk + 3 Roach" at Top Left of screen with offset (50, 140) (run No Trigger when button is clicked)

    Dialog - Display button MDG_Selection_02_Player_01 of size (250, 60) with text "4 Marauder + 6 Marine" at Top Left of screen with offset (50, 210) (run No Trigger when button is clicked)

    Dialog - Display button MDG_Selection_03_Player_01 of size (250, 60) with text "1 Immortal + 4 Stalker + 1 Sentry" at Top Left of screen with offset (50, 280) (run No Trigger when button is clicked)

    The variables: MDG_Selection_01_Player_01 = 17 <Integer>

    MDG_Selection_02_Player_01 = 18 <Integer>

    MDG_Selection_03_Player_01 = 19 <Integer>

    As you can see, I am using the initial value to identify my button. But now when I try to implement the suggestion above:

    Events

    Dialog - (Screen button 17) is used by Player Any Player with event type Clicked

    Conditions

    MDG_Selection_01_Player_01 == 0

    Actions

    Variable - Set MDG_Selection_01_Player_01 = 1

    TRIGGERSTUFF

    General - Wait 1.0 Game Time seconds

    Variable - Set MDG_Selection_01_Player_01 = 0

    the game treats every pressed button the same and runs my trigger. I am not very good with variables, can you tell me what I am doing wrong?

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger] Is this a bug? (counting units in unitgroups sometimes seems to fail)

    @Helral: Go

    Hmm, but that's why I set up conditions:

    Events
            Unit - Any Unit Enters MDG_UnitGroup_Player02
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 2
    

    So even if in this case a unit owned by player 1 enters "MDG_UnitGroup_Player02", it wouldn't get added because of the condition, no?

    Posted in: Miscellaneous Development
  • 0

    posted a message on English localization File for German Editor Version

    @GurgelJ: Go

    "Wenn, dann, sonst" isn't something the German localization team came up with, it's a given standard in Germany - like it or not. Just fire up German Excel (or other localized programming environments) and you'll see what I mean. However, I agree that localized triggers can be pretty complicated, especially if you are used to english ones.

    To answer your question: You could force the localized editor strings into your client, but I wouldn't do that because you would need to modify the MPQ's - which is against the end user license agreement and Blizzard could close your account for hacking.

    I suggest downloading the English client. You can install it along the German one, they won't interfere with each other. I am using the same setup (German/English GB).

    Posted in: General Chat
  • 0

    posted a message on [Trigger] Is this a bug? (counting units in unitgroups sometimes seems to fail)

    Ok well, I'm trying to explain my setup here - it works perfectly, but every once in a while it fails - and I have absolutely no idea why it would do that:

    I need to check if all units in a specific unitgroup are dead - if so, the player with the remaining units wins the match. So first, I put all my units into unitgroups:

    Player1

    MDG_HOST_UnitsToUnitgroup
        Events
            Unit - Any Unit Enters MDG_UnitGroup_Player01
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 1
        Actions
            Unit Group - Add (Triggering unit) to MDG_Player1_Unitgroup
    

    And Player 2:

    MDG_GUEST_UnitsToUnitgroup
        Events
            Unit - Any Unit Enters MDG_UnitGroup_Player02
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 2
        Actions
            Unit Group - Add (Triggering unit) to MDG_Player2_Unitgroup
    

    Okay nice. I spawn my units in said regions, the players are starting to fight against each other - and the following trigger watches over what is going on to determine who won the match:

    Player1_Loses
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
            ((Triggering unit) is in Region_MindTheGap) == true
            (Number of Living units in MDG_Player1_Unitgroup) == 0
        Actions
            General - Wait 1.0 Real Time seconds
            ------- PLAYER 2 WINS THE MATCH
            Sound - Play ModUtilityVoiceModUtilityVoice00081 for (Enemies of player 1) (at 100.0% volume, skip the first 0.0 seconds)
            UI - Display "YOU HAVE WON THE MATCH" for (Enemies of player 1) to Directive area
            ------- PLAYER 1 LOSES THE MATCH
            Sound - Play ModUtilityVoiceModUtilityVoice00073 for (Enemies of player 2) (at 100.0% volume, skip the first 0.0 seconds)
            UI - Display "YOU HAVE LOST THE MATCH" for (Enemies of player 2) to Directive area
            ------- Get rid of all remaining units
            General - Wait 4.0 Real Time seconds
            Unit Group - Pick each unit in MDG_Player2_Unitgroup and do (Actions)
                Actions
                    Unit - Remove (Picked unit) from the game
                    Sound - Play UI_ScrollButtonSelect for (All players) (at 100.0% volume, skip the first 0.0 seconds)
                    General - Wait 0.3 Real Time seconds
            Unit Group - Remove all units from MDG_Player2_Unitgroup
            Unit Group - Remove all units from MDG_Player1_Unitgroup
            Cinematics - Fade Out over 1.0 seconds using color (0%, 0%, 0%) and 0.0% transparency (Normal style, Wait until it finishes)
            Cinematics - Fade In over 1.0 seconds using color (0%, 0%, 0%) and 0.0% transparency (Normal style, Don't Wait until it finishes)
            Trigger - Run reset  (Check Conditions, Don't Wait until it finishes)
    

    Same code for Player2 btw (only reversed). This works PERFECTLY ... however sometimes in say 1 out of 20 tries, this fails - and no winner/loser is being determined. The game is stuck... but to make this even more curious - if the surviving player kills one of his own units (if he has more than one left), the trigger seems to resume and he wins the game just like he should have in the first place.

    Does anybody get this? Is there any type of "security" measure you would put into this to prevent something like that from happening? Or did I get something wrong in my trigger?

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Solved] [Trigger] All units within unit group are dead - then do action?

    @Molsterr: Go

    Arrrgh! Thinking around 30 corners where only one was needed - fail. Thanks again for the insight, works :D

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Solved] [Trigger] All units within unit group are dead - then do action?

    I'm trying to figure this out and I'm completely out of ideas.

    Say my units have already been added to a unitgroup called "MDG_Player1_Unitgroup". How do I detect if they are all dead? I got this setup, but it doesn't do anything:

    Events:
            Unit - Any Unit dies
    Local Variables:
            MDG_AllUnitsDead_Player1_Counter = 0 <Integer>
    Conditions:
            (Owner of (Triggering unit)) == 1
    Actions:
            Unit Group - Pick each unit in MDG_Player1_Unitgroup and do (Actions)
                    Variable - Set MDG_AllUnitsDead_Player1_Counter = (+ (1))
            General - If (Conditions) then do (Actions) else do (Actions)
    If:
                    (Abs(MDG_AllUnitsDead_Player1_Counter)) == 3
    Then:
                    UI - Display "All Player1 units are dead!" for (All players) to Subtitle area
    Else:
    

    I guess I got it totally wrong *shrug*.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Third Person Shooter (TPS) engine - Download if you need one

    By the way, if anybody is using another language editor and can't see the triggers, there's an easy solution for that. Just open up the map with an MPQ editor and copy all data inside /enGB/ or /enUS/ and create your own locale folder just like the english ones. German would be /deDE/localizeddata/yourstuff

    Because trigger names are strings as well. When you load up the map now, it should show.

    Posted in: Triggers
  • 0

    posted a message on FPS Engine - Download and use it as your own!

    @BacklitAvenger: Go

    Hmm, you could use the +Add attachment button to attach the map directly to the thread. Like so...

    Posted in: Miscellaneous Development
  • 0

    posted a message on FPS Engine - Download and use it as your own!

    Hey man, I'd really like to try this - but what's with the download link? Do I have to install this "Free Compressor" thingy?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Revealer Conundrum...

    @Molsterr: Go

    Exactly. Currently, I'm doing like a micro challenge map with selectable arenas. Figuring this out solved a lot of problems when showing the different arenas to the player wo is selecting it (and the players who are just looking over his shoulder).

    Posted in: Miscellaneous Development
  • 0

    posted a message on Revealer Conundrum...

    @Molsterr: Go

    Oh god, thanks man. It works... I'm not too much into scripting, but everytime I get something, it's like a new world opens up in front of me ;) Thanks again!

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.