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...
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.
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?
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?
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
EventsUnit-AnyUnitPicksUpAnyItemLocalVariablesConditionsActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfInventorySlotinuse[(Ownerof(Triggeringunit))][Itemslotchecker[(Ownerof(Triggeringunit))]]==FalseThen------- slots 1-5General-If(Conditions)thendo(Actions)elsedo(Actions)IfItemslotchecker[(Ownerof(Triggeringunit))]<=5ThenDialog-DestroyInventoryslot[(Ownerof(Triggeringunit))][Itemslotchecker[(Ownerof(Triggeringunit))]]Dialog-CreateanimagefordialogInventory[(Ownerof(Triggeringunit))]withthedimensions(76,76)anchoredtoTopLeftwithanoffsetof(50,50)settingthetooltipto""usingtheimageAssets\Textures\white32.ddsasaNormaltypewithtiledsettoTruetintcolorWhiteandblendmodeNormalDialog-CreateabuttonfordialogInventory[(Ownerof(Triggeringunit))]withthedimensions(76,76)anchoredtoTopLeftwithanoffsetof(((((Itemslotchecker[(Ownerof(Triggeringunit))]-1)*10)+(76*(Itemslotchecker[(Ownerof(Triggeringunit))]-1)))+50),50)settingthetooltipto(Nameof(Unittypeof(Itemcarriedby(Triggeringunit)in1)))withbuttontext""andthehoverimagesetto""Unit-Removeinventoryitem(Itemcarriedby(Triggeringunit)in1)Else------- slots 6-10General-If(Conditions)thendo(Actions)elsedo(Actions)IfAndConditionsItemslotchecker[(Ownerof(Triggeringunit))]>=6Itemslotchecker[(Ownerof(Triggeringunit))]<=10ThenDialog-DestroyInventoryslot[(Ownerof(Triggeringunit))][Itemslotchecker[(Ownerof(Triggeringunit))]]Dialog-CreateabuttonfordialogInventory[(Ownerof(Triggeringunit))]withthedimensions(76,76)anchoredtoTopLeftwithanoffsetof(((((Itemslotchecker[(Ownerof(Triggeringunit))]-1)*10)+(76*(Itemslotchecker[(Ownerof(Triggeringunit))]-1)))+50),136)settingthetooltipto"YIPEE"withbuttontext""andthehoverimagesetto""Unit-Removeinventoryitem(Itemcarriedby(Triggeringunit)in1)Else------- slots 11-15General-If(Conditions)thendo(Actions)elsedo(Actions)IfItemslotchecker[(Ownerof(Triggeringunit))]>=11ThenDialog-DestroyInventoryslot[(Ownerof(Triggeringunit))][Itemslotchecker[(Ownerof(Triggeringunit))]]Dialog-CreateabuttonfordialogInventory[(Ownerof(Triggeringunit))]withthedimensions(76,76)anchoredtoTopLeftwithanoffsetof(((((Itemslotchecker[(Ownerof(Triggeringunit))]-1)*10)+(76*(Itemslotchecker[(Ownerof(Triggeringunit))]-1)))+50),222)settingthetooltipto"YIPEE"withbuttontext""andthehoverimagesetto""Unit-Removeinventoryitem(Itemcarriedby(Triggeringunit)in1)ElseVariable-SetInventorySlotinuse[(Ownerof(Triggeringunit))][Itemslotchecker[(Ownerof(Triggeringunit))]]=TrueVariable-SetItemslotchecker[(Ownerof(Triggeringunit))]=1ElseVariable-SetItemslotchecker[(Ownerof(Triggeringunit))]=(Itemslotchecker[(Ownerof(Triggeringunit))]+1)Trigger-RunStandarditempickup(CheckConditions,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)
0
will do, thanks.
0
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...
0
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.
0
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?
0
Wow, thats very helpful...Thank you so much.
0
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?
0
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
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)