Hello, first I know I have another thread, but it's for a different question so I think I can make a new thread for this question ? Correct me if I'm wrong though !
So yeah I made a behavior for Raynor which basically increases marines (only!) attack speed by 50% (same speed as stimpack) in a range of 6.
It doesn't affect Raynor himself though.
The marines using the behavior also gets a "green stimpack lightning icon" (but it's a bit bigger). And the icon keeps appearing/disappearing every 2 seconds. The behavior does the same. So if you get out of range you still keep the behavior for 2 secs or less.
In addition to that, I modified Raynor's actor so he always have a pylon "blue power light" always on the floor.
So basically, Raynor has that big pylon light under him all the time. And whenever a marine comes into this blue light, he gets the behavior which stops after 2 secs, then he gets it again etc etc.
What I would like, is to have all that, activated for 30 seconds when I press the corresponding capacity button.
How can I do that ?
The best I could do is just make the behavior loop to be activated when I press the button, but it never stops, and there's not the blue light under Raynor. The stimpack thing appears though.
Thanks again for anyone's help !
Regards.
Edit: Oh also, I'd like Tosh's "Psy Shield On/Off" to be played when the capacity starts/stops. And also have the pylon power light to appear/disappear in 1 second (not instantly).
Is the primary loop a Persistent effect or a Buff behavior? The former you can launch via an Effect - Instant ability, the latter with the Behavior ability class or an Effect - Instant using an Apply Behavior effect (might give more options for autocasts or levelable abilities)
The flickering is usually caused by a duration that is slightly shorter (or sometimes exactly equal to) the reapply period. If the buff isn't stackable you shouldn't get any reverse problems if you make the duration a bit longer.
2s as the update pulse rate is exceedingly long, for hero abilities you can usually go as low as a single game tick (0.0625) without causing lag. That will automatically fix the "move out of range" issue too. Otherwise there's LocationRange validators, which you can use to check the distance between Raynor and an individual Marine (can't think of a good prebuilt example for that one, sorry)
Sounds and visuals are handles by Actors. All you describe can be copied over from the Sentry's Guardian Shield ability, except for the Stimpack on-target visuals which you got working already. If the Pylon power field model doesn't provide a "fade out" animation by itself you'll have to fake one via actor events: Replace the "AnimBracketStop" or "Destroy" event with a timer + SetOpacity event and destroy the actor when the timer expires)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello, first I know I have another thread, but it's for a different question so I think I can make a new thread for this question ? Correct me if I'm wrong though !
So yeah I made a behavior for Raynor which basically increases marines (only!) attack speed by 50% (same speed as stimpack) in a range of 6.
It doesn't affect Raynor himself though.
The marines using the behavior also gets a "green stimpack lightning icon" (but it's a bit bigger). And the icon keeps appearing/disappearing every 2 seconds. The behavior does the same. So if you get out of range you still keep the behavior for 2 secs or less.
In addition to that, I modified Raynor's actor so he always have a pylon "blue power light" always on the floor.
So basically, Raynor has that big pylon light under him all the time. And whenever a marine comes into this blue light, he gets the behavior which stops after 2 secs, then he gets it again etc etc.
What I would like, is to have all that, activated for 30 seconds when I press the corresponding capacity button.
How can I do that ?
The best I could do is just make the behavior loop to be activated when I press the button, but it never stops, and there's not the blue light under Raynor. The stimpack thing appears though.
Thanks again for anyone's help !
Regards.
Edit: Oh also, I'd like Tosh's "Psy Shield On/Off" to be played when the capacity starts/stops. And also have the pylon power light to appear/disappear in 1 second (not instantly).
Is the primary loop a Persistent effect or a Buff behavior? The former you can launch via an Effect - Instant ability, the latter with the Behavior ability class or an Effect - Instant using an Apply Behavior effect (might give more options for autocasts or levelable abilities)
The flickering is usually caused by a duration that is slightly shorter (or sometimes exactly equal to) the reapply period. If the buff isn't stackable you shouldn't get any reverse problems if you make the duration a bit longer.
2s as the update pulse rate is exceedingly long, for hero abilities you can usually go as low as a single game tick (0.0625) without causing lag. That will automatically fix the "move out of range" issue too. Otherwise there's LocationRange validators, which you can use to check the distance between Raynor and an individual Marine (can't think of a good prebuilt example for that one, sorry)
Sounds and visuals are handles by Actors. All you describe can be copied over from the Sentry's Guardian Shield ability, except for the Stimpack on-target visuals which you got working already. If the Pylon power field model doesn't provide a "fade out" animation by itself you'll have to fake one via actor events: Replace the "AnimBracketStop" or "Destroy" event with a timer + SetOpacity event and destroy the actor when the timer expires)