If u play WC3, there's a mini panel for hero on the top left of the screen, and you can cast target spell to that icon.
So my Q is, what is the best and most efficient way to do that in SC2? i.e. I have Hero Panel Dialog Item, and I want to be able to cast Heal by clicking on the picture/button of the hero unit.
Just make dialog items and make them target different players? that will be easy unless you WANT it to be after the player clicks heal spell, then click and it cast that spell. Dunno how what would work out easy
Just make dialog items and make them target different players? that will be easy unless you WANT it to be after the player clicks heal spell, then click and it cast that spell. Dunno how what would work out easy
What I WANT is after you click heal spell, when it ask for a target, when you click on a dialog item such as button, image, pics of you hero, it will target heal you hero unit. How would you do that in SC2?
It would only work if your spells were trigger-based. The game's default targeting system always selects below the dialog layer. You basically need a dummy spell with instant cast which sets off a switch via triggers. Then, if the player clicks the dialog button, order the unit to cast the REAL spell on a specified target.
It would only work if your spells were trigger-based. The game's default targeting system always selects below the dialog layer. You basically need a dummy spell with instant cast which sets off a switch via triggers. Then, if the player clicks the dialog button, order the unit to cast the REAL spell on a specified target.
But then on REGULAR button click, it should focus and center the camera to the hero unit.
only on SPELL TARGET click, I want it to heal the hero unit. Any other tricks to this?
Event - UI Button pressed. use a boolean variable and set it to true, have another trigger that checks if the user left, right clicks or casts it on another target then set the boolean to false. If the button is pressed and the boolean variable is true then order the unit to cast the ability on the hero.
EDIT : order of triggers will matter so make sure you have the dialog item used trigger before, mouse clicked/ability used trigger.
here is the map, i couldn't figure out one thing though. How to get out of the sub-menu after you have casted the ability. This is not very dynamic at all as you will need to store the ability depending on which button is pressed, unless there is a way to see if an ability is linked to the button. You should also store the dialog items/dialog which i didnt do AND the hero that the dialog is meant for.
If you find any bugs i didnt mention or i did something wrong please let me know.
here is the map, i couldn't figure out one thing though. How to get out of the sub-menu after you have casted the ability. This is not very dynamic at all as you will need to store the ability depending on which button is pressed, unless there is a way to see if an ability is linked to the button. You should also store the dialog items/dialog which i didnt do AND the hero that the dialog is meant for.
If you find any bugs i didnt mention or i did something wrong please let me know.
Hey thanks for the guidance. I was thinking of the same method too but wondering... really? no easier, shortcut way of doing it?
Regarding bug. You need to set the switch for ButtonPressed to 0 when players hit cancel button. It stays at 1 atm but no biggie.
Also, I was wondering if the cursor can stay as CROSSHAIR when you hover on the Hero button. Hopefully they add HOVER DialogItemEvent. I can only see Click, Changed Value, Changed Item atm...
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi guys,
If u play WC3, there's a mini panel for hero on the top left of the screen, and you can cast target spell to that icon.
So my Q is, what is the best and most efficient way to do that in SC2? i.e. I have Hero Panel Dialog Item, and I want to be able to cast Heal by clicking on the picture/button of the hero unit.
Thanks!
Just make dialog items and make them target different players? that will be easy unless you WANT it to be after the player clicks heal spell, then click and it cast that spell. Dunno how what would work out easy
What I WANT is after you click heal spell, when it ask for a target, when you click on a dialog item such as button, image, pics of you hero, it will target heal you hero unit. How would you do that in SC2?
It would only work if your spells were trigger-based. The game's default targeting system always selects below the dialog layer. You basically need a dummy spell with instant cast which sets off a switch via triggers. Then, if the player clicks the dialog button, order the unit to cast the REAL spell on a specified target.
But then on REGULAR button click, it should focus and center the camera to the hero unit. only on SPELL TARGET click, I want it to heal the hero unit. Any other tricks to this?
@Maknyuzz: Go
Event - UI Button pressed. use a boolean variable and set it to true, have another trigger that checks if the user left, right clicks or casts it on another target then set the boolean to false. If the button is pressed and the boolean variable is true then order the unit to cast the ability on the hero.
EDIT : order of triggers will matter so make sure you have the dialog item used trigger before, mouse clicked/ability used trigger.
@Usernameisntworkingright: Go
here is the map, i couldn't figure out one thing though. How to get out of the sub-menu after you have casted the ability. This is not very dynamic at all as you will need to store the ability depending on which button is pressed, unless there is a way to see if an ability is linked to the button. You should also store the dialog items/dialog which i didnt do AND the hero that the dialog is meant for.
If you find any bugs i didnt mention or i did something wrong please let me know.
Hey thanks for the guidance. I was thinking of the same method too but wondering... really? no easier, shortcut way of doing it?
Regarding bug. You need to set the switch for ButtonPressed to 0 when players hit cancel button. It stays at 1 atm but no biggie.
Also, I was wondering if the cursor can stay as CROSSHAIR when you hover on the Hero button. Hopefully they add HOVER DialogItemEvent. I can only see Click, Changed Value, Changed Item atm...