• 0

    posted a message on Dialog button right-click/shift-click

    will do, thanks.

    Posted in: Triggers
  • 0

    posted a message on Dialog button right-click/shift-click

    So I need access to either a dialog button right clicked event (preferred) or a shift clicked event (shift key pressed condition doesn't work) but there is no function for this. Is there a custom script/lib/work around I can use for this? mouse click events don't work on dialog buttons...

    Posted in: Triggers
  • 0

    posted a message on Comparing matching arrays of different types

    So I have a dialog button with a variable ID of "Ibutton[triggering player(8)][first available button(13)]" that takes an item name saves it to a string with the variable Istring[triggering player(8)][first available button (13)]and does a few other things, later, when Ibutton[8][13] is pressed I want it to check and compare Istring[8][13] with another constant string and then do actions based on that. buttons will be changed frequently and a lot of strings are going to have to be compared so lots of if else statements wont work. The problem is that when "Any Dialog Item is used by Player Any Player with event type Clicked" I cannot pull out what array number it used (in the second bracket) and tell it to search and compare strings with that array because one is a dialog item and one is a string. Maybe I'm just tired and i'm missing something obvious but I don't see a function to figure out what array the dialog button was on.

    Posted in: Triggers
  • 0

    posted a message on Pulling information from items

    So, while trying to set up my right click event for dialog I noticed something strange, I created a simple trigger Display text: Y pos: {current y pos} X pos: {current x pos}. its simple and it works, BUT when I right click one of the buttons it does not display the text like it would have if I had right clicked nothing, does this mean that the button is interfering with this trigger making it not work?

    Posted in: Triggers
  • 0

    posted a message on Pulling information from items

    Wow, thats very helpful...Thank you so much.

    Posted in: Triggers
  • 0

    posted a message on Modifying weapons

    I'm sure this is asked a lot, but I cant find anything quite what I need help with. I watched some tutorials but most of them were tower defense tutorials and not that helpful..so.. My problem is switching a units attack damage/attack animation/type based on the weapon equipped. It sounds simple and it probably is but I can't get it to work... What I am trying to do is swap out a basic marines rifle with a flamethrower... but the flamethrower has to deal constant damage instead of the hellions burst thingy. with this as a template I could do the same thing but with a lazer gun for him. I have seen a lot of people struggling with getting the fire animation working, I got it to work but I don't really understand how I did it. can someone point me to a tutorial for this kind of problem?

    Posted in: Data
  • 0

    posted a message on Pulling information from items

    So I'm new to the starcraft world editor, but I was pretty good at the warcraft editor and they are pretty similar. My problem is there doesn't seem to be a lot of functions supporting inventories/items, before I read how inventories worked, I built one out of dialog items with buttons for slots. It all worked fine until I needed to get the actual item information..heres what I have so far..

    [NYI] Standard item pickup

        Events
            Unit - Any Unit Picks Up Any Item
        Local Variables
        Conditions
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Inventory Slot in use[(Owner of (Triggering unit))][Itemslot checker[(Owner of (Triggering unit))]] == False
                Then
                    ------- slots 1-5
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Itemslot checker[(Owner of (Triggering unit))] <= 5
                        Then
                            Dialog - Destroy Inventory slot[(Owner of (Triggering unit))][Itemslot checker[(Owner of (Triggering unit))]]
                            Dialog - Create an image for dialog Inventory[(Owner of (Triggering unit))] with the dimensions (76, 76) anchored to Top Left with an offset of (50, 50) setting the tooltip to "" using the image Assets\Textures\white32.dds as a Normal type with tiled set to True tint color White and blend mode Normal
                            Dialog - Create a button for dialog Inventory[(Owner of (Triggering unit))] with the dimensions (76, 76) anchored to Top Left with an offset of (((((Itemslot checker[(Owner of (Triggering unit))] - 1) * 10) + (76 * (Itemslot checker[(Owner of (Triggering unit))] - 1))) + 50), 50) setting the tooltip to (Name of (Unit type of (Item carried by (Triggering unit) in 1))) with button text "" and the hover image set to ""
                            Unit - Remove inventory item (Item carried by (Triggering unit) in 1)
                        Else
                    ------- slots 6-10
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            And
                                Conditions
                                    Itemslot checker[(Owner of (Triggering unit))] >= 6
                                    Itemslot checker[(Owner of (Triggering unit))] <= 10
                        Then
                            Dialog - Destroy Inventory slot[(Owner of (Triggering unit))][Itemslot checker[(Owner of (Triggering unit))]]
                            Dialog - Create a button for dialog Inventory[(Owner of (Triggering unit))] with the dimensions (76, 76) anchored to Top Left with an offset of (((((Itemslot checker[(Owner of (Triggering unit))] - 1) * 10) + (76 * (Itemslot checker[(Owner of (Triggering unit))] - 1))) + 50), 136) setting the tooltip to "YIPEE" with button text "" and the hover image set to ""
                            Unit - Remove inventory item (Item carried by (Triggering unit) in 1)
                        Else
                    ------- slots 11-15
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Itemslot checker[(Owner of (Triggering unit))] >= 11
                        Then
                            Dialog - Destroy Inventory slot[(Owner of (Triggering unit))][Itemslot checker[(Owner of (Triggering unit))]]
                            Dialog - Create a button for dialog Inventory[(Owner of (Triggering unit))] with the dimensions (76, 76) anchored to Top Left with an offset of (((((Itemslot checker[(Owner of (Triggering unit))] - 1) * 10) + (76 * (Itemslot checker[(Owner of (Triggering unit))] - 1))) + 50), 222) setting the tooltip to "YIPEE" with button text "" and the hover image set to ""
                            Unit - Remove inventory item (Item carried by (Triggering unit) in 1)
                        Else
                    Variable - Set Inventory Slot in use[(Owner of (Triggering unit))][Itemslot checker[(Owner of (Triggering unit))]] = True
                    Variable - Set Itemslot checker[(Owner of (Triggering unit))] = 1
                Else
                    Variable - Set Itemslot checker[(Owner of (Triggering unit))] = (Itemslot checker[(Owner of (Triggering unit))] + 1)
                    Trigger - Run Standard item pickup  (Check Conditions, Don't Wait until it finishes)
    

    There are 3 things I'm not sure how to do. 1. Pull the item image off of the item and 2. Pull the tooltip off of the item. 3. Check button for right click instead of left. Is this possible? I do realize there is a much easier way to do an inventory but side by side I think this one looks a lot better (assuming its possible)

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