How would I go about making a skill that's castable from a UI button, then you click on the screen where you want the skill cast?
For example, say I want an area attack to freeze all unit actions in a radius around my cursor? The way I'd want it to work, is I'd click the button, we'll call it "Freeze," and then I would select the area I want frozen and it would then proceed to freeze all enemies in that area.
I think the recent Mouselook/Traceline tutorial might be of interest to you, as it provides a method of targeting units and points with the mouse. All you have to figure out on your end is switching a "casting" state whenever your Screen Button is clicked. You may also want to display a Dialog with text describing the currently selected skill.
However, a simpler solution may be the "Point Clicked" event, if you don't plan on having FPS-like accuracy involved.
I was working on a similar problem Psi, but unfortunately I found no way to change the cursor graphic through triggers, which is unfortunate. May have to custom script that.
I think the recent Mouselook/Traceline tutorial might be of interest to you, as it provides a method of targeting units and points with the mouse. All you have to figure out on your end is switching a "casting" state whenever your Screen Button is clicked. You may also want to display a Dialog with text describing the currently selected skill.
However, a simpler solution may be the "Point Clicked" event, if you don't plan on having FPS-like accuracy involved.
I'm not going for FPS accuracy, I just need an area around the cursor to do the skill I've selected; basically, area effect attacks. It's for a game I'm almost ready to release, I just need to get the skills to work from the UI because I feel like having a unit do the skills makes things needlessly complicated for the player.
How would I go about making a skill that's castable from a UI button, then you click on the screen where you want the skill cast?
For example, say I want an area attack to freeze all unit actions in a radius around my cursor? The way I'd want it to work, is I'd click the button, we'll call it "Freeze," and then I would select the area I want frozen and it would then proceed to freeze all enemies in that area.
I think the recent Mouselook/Traceline tutorial might be of interest to you, as it provides a method of targeting units and points with the mouse. All you have to figure out on your end is switching a "casting" state whenever your Screen Button is clicked. You may also want to display a Dialog with text describing the currently selected skill.
However, a simpler solution may be the "Point Clicked" event, if you don't plan on having FPS-like accuracy involved.
@Psiclone01: Go
I was working on a similar problem Psi, but unfortunately I found no way to change the cursor graphic through triggers, which is unfortunate. May have to custom script that.
I'm not going for FPS accuracy, I just need an area around the cursor to do the skill I've selected; basically, area effect attacks. It's for a game I'm almost ready to release, I just need to get the skills to work from the UI because I feel like having a unit do the skills makes things needlessly complicated for the player.