I'm having some difficulties trying to make use of triggers to issue an order to use its ability on a location. I know how to issue the order and have the trigger given a the point to target, but I'm not looking to define it via the triggers. Instead I'm trying to get it to act kind of like how a command card click would for a Ghost - Emp ability. It'd be a click or hotkey and then there would be the cursor effect where the play would left click the target location.
Can someone please let me know what the trigger approach is to do this or if there is something I'm overlooking in the Data editor which would toggled this. I originally expected this to be some type of Issue Order without Target approach, but it seems like even the Ghost - Emp expects a point. I have a feeling I could find a very messy work-around, but for efficiency and proper coding purposes, I would definitely appreciate some assistance.
A general layout:
Key Pressed -> Issue unit to use its ability (No point given yet) -> Shows the cursor effect to waits for the player to left click the location where the action will happen -> Order commences and the unit uses its ability on the left clicked location.
Again, anything would be greatly appreciated and I will continue to search this forum, but I couldn't find anything so far ;0.
In an attempt to do a workaround since I cannot figure out any way that works with my method of triggers, I'm doing a fake splat actor creation which follows the mouse. This is much less desired but has lead to another issue.
My issue here is that I cannot seem to figure out how to force an actor to keep replaying it's animation until I destroy it. For example the Terran Cursor AoE Splat and the Nuke Cursor Splat only play its animation once and then it freezes.
I've followed some information in that post but could not get it to work right. The last post mentions starting a timer but I cannot find the event which Starts the timer, just one that Sets the timer and one that Kills it. Can someone please give some insight on what I would need to do to keep a animation on repeat — Play Forever doesn't work ;0.
So your wanting to make the cursor click on an ability on the units command card automatically? Like having AI take over the control of the cursor or something?
I know things are a little vague with explaining how/why things are the way they are. I'll try to explain some of how the map is planned to work to maybe clear up some of that confusion. Also, I am adept with basically all of the galaxy editor, so you don't need to explain too much, just the approach should be fair xD.
-Game Layout
The entire Game UI is hidden for everybody. Everybody is given 1 unit with 3 abilities on them. I've built a system that lets the player assign the hotkeys for these abilities. Then, whenever the player presses a key, I check if that matches one of the abilities and issues the order.
-The Problem
For abilities like Fungal Growth, I am forced to have it use the ability on the mouse cursor at the time of clicking that hotkey. I would like it to have the same process that the command card would do if I were to Fungal growth— Show a fungal growth splat that follows the mouse and upon left clicking THEN use the ability on that location.
-The Workaround
I have created a boolean that tracks if an ability is queued up to be activated. This hides the mouse cursor and creates an actor which is set to follow the mouse on movement. This acts like the command-card version, albeit, moving the actor to the mouse repeatedly feels choppy.
-Workaround Issue
The actor's animation does not continually repeat on loop like I'd like it to. For example, the Nuke Cursor Splat plays through it's spinning animation once and then freezes. I'd like for the animation to continually loop without having to do some weird triggering workaround for that too. I believe this is done through the events section of the actor, but I cannot figure out how to do it correctly.
What you could try is to use the action "Animation - Play Animation", link to that actor and set the Options to "Play Forever". If that doesn't work then you can try and use "Animation - Set Animation Duration" and set how long it take for the animation to play. You could set it to 10000000 seconds so it would take forever for it to end.
You probably tried to start a Timer as an event, but the event has to be something different and the action is the thing that is called Timer Set.
To do something with this created timer you have to use the Timer Expired event with the term TimerName (right click on the event and "Add Term") and put the name into it.
But I'm curious, how do you make your actor follow/replace the mouse cursor? Via triggers?
If that is the case be prepared that it will be really laggy if you upload it to the Battle.net up to a point that it is almost unusable.
Well, I went through a very long post explaining how everything wasn't working and I believe I figured out the timer but things were still weird... and then magic happened and I figured out the issue. I assumed in Birth -> Stand -> Death that the Stand animation was the core part of the animation. It turns out that using Play Animation on Repeat Forever using Birth works and it repeats consistently.
I do greatly appreciate the information on timers as I completely overlooked naming the Timer with the term. I do want to fully understand the events as they're basically just a deeper type of trigger system with a lot more complexity in events xD.
As for how I'm making it follow the cursor— Yes, I'm using triggers as it seems to be the only way to do so? I'm looking into alternatives as I did see noticeable online lag with just two people playing. I had it refreshing 30 times per second. My other thought was that I am in the process of testing is applying the animation to a unit which I would have to make invisible in some way and moving the unit instead. I'm not sure if that would lessen the lag, but in my mind moving a unit is a lot less intense than sending actor position updates.
If you have advice on a better way to do this, I would be more than happy to accept that ;D. All-in-all though, I definitely appreciate both of your help so far as obstacles like these are painful. If only Blizzard let me change the mouse cursor to an actor instead ;(.
Hello,
I'm having some difficulties trying to make use of triggers to issue an order to use its ability on a location. I know how to issue the order and have the trigger given a the point to target, but I'm not looking to define it via the triggers. Instead I'm trying to get it to act kind of like how a command card click would for a Ghost - Emp ability. It'd be a click or hotkey and then there would be the cursor effect where the play would left click the target location.
Can someone please let me know what the trigger approach is to do this or if there is something I'm overlooking in the Data editor which would toggled this. I originally expected this to be some type of Issue Order without Target approach, but it seems like even the Ghost - Emp expects a point. I have a feeling I could find a very messy work-around, but for efficiency and proper coding purposes, I would definitely appreciate some assistance.
A general layout: Key Pressed -> Issue unit to use its ability (No point given yet) -> Shows the cursor effect to waits for the player to left click the location where the action will happen -> Order commences and the unit uses its ability on the left clicked location.
Again, anything would be greatly appreciated and I will continue to search this forum, but I couldn't find anything so far ;0.
In an attempt to do a workaround since I cannot figure out any way that works with my method of triggers, I'm doing a fake splat actor creation which follows the mouse. This is much less desired but has lead to another issue.
My issue here is that I cannot seem to figure out how to force an actor to keep replaying it's animation until I destroy it. For example the Terran Cursor AoE Splat and the Nuke Cursor Splat only play its animation once and then it freezes.
http://www.sc2mapster.com/forums/development/data/24779-help-with-making-animation-replay-for-a-duration/#p3
I've followed some information in that post but could not get it to work right. The last post mentions starting a timer but I cannot find the event which Starts the timer, just one that Sets the timer and one that Kills it. Can someone please give some insight on what I would need to do to keep a animation on repeat — Play Forever doesn't work ;0.
@XxZeroxX: Go
So your wanting to make the cursor click on an ability on the units command card automatically? Like having AI take over the control of the cursor or something?
@Projekton: Go
I know things are a little vague with explaining how/why things are the way they are. I'll try to explain some of how the map is planned to work to maybe clear up some of that confusion. Also, I am adept with basically all of the galaxy editor, so you don't need to explain too much, just the approach should be fair xD.
-Game Layout
The entire Game UI is hidden for everybody. Everybody is given 1 unit with 3 abilities on them. I've built a system that lets the player assign the hotkeys for these abilities. Then, whenever the player presses a key, I check if that matches one of the abilities and issues the order.
-The Problem
For abilities like Fungal Growth, I am forced to have it use the ability on the mouse cursor at the time of clicking that hotkey. I would like it to have the same process that the command card would do if I were to Fungal growth— Show a fungal growth splat that follows the mouse and upon left clicking THEN use the ability on that location.
-The Workaround
I have created a boolean that tracks if an ability is queued up to be activated. This hides the mouse cursor and creates an actor which is set to follow the mouse on movement. This acts like the command-card version, albeit, moving the actor to the mouse repeatedly feels choppy.
-Workaround Issue
The actor's animation does not continually repeat on loop like I'd like it to. For example, the Nuke Cursor Splat plays through it's spinning animation once and then freezes. I'd like for the animation to continually loop without having to do some weird triggering workaround for that too. I believe this is done through the events section of the actor, but I cannot figure out how to do it correctly.
What you could try is to use the action "Animation - Play Animation", link to that actor and set the Options to "Play Forever". If that doesn't work then you can try and use "Animation - Set Animation Duration" and set how long it take for the animation to play. You could set it to 10000000 seconds so it would take forever for it to end.
Just some possibilities.
You probably tried to start a Timer as an event, but the event has to be something different and the action is the thing that is called Timer Set.
To do something with this created timer you have to use the Timer Expired event with the term TimerName (right click on the event and "Add Term") and put the name into it.
But I'm curious, how do you make your actor follow/replace the mouse cursor? Via triggers?
If that is the case be prepared that it will be really laggy if you upload it to the Battle.net up to a point that it is almost unusable.
Well, I went through a very long post explaining how everything wasn't working and I believe I figured out the timer but things were still weird... and then magic happened and I figured out the issue. I assumed in Birth -> Stand -> Death that the Stand animation was the core part of the animation. It turns out that using Play Animation on Repeat Forever using Birth works and it repeats consistently.
I do greatly appreciate the information on timers as I completely overlooked naming the Timer with the term. I do want to fully understand the events as they're basically just a deeper type of trigger system with a lot more complexity in events xD.
As for how I'm making it follow the cursor— Yes, I'm using triggers as it seems to be the only way to do so? I'm looking into alternatives as I did see noticeable online lag with just two people playing. I had it refreshing 30 times per second. My other thought was that I am in the process of testing is applying the animation to a unit which I would have to make invisible in some way and moving the unit instead. I'm not sure if that would lessen the lag, but in my mind moving a unit is a lot less intense than sending actor position updates.
If you have advice on a better way to do this, I would be more than happy to accept that ;D. All-in-all though, I definitely appreciate both of your help so far as obstacles like these are painful. If only Blizzard let me change the mouse cursor to an actor instead ;(.