SC2Mapster Forums

Development > Data

Help with Ability Duration

  • 8 posts
    #1 Apr 03, 2012 at 01:49 UTC - 0 likes

    Hi, I am new to map editor, and I came across some question I need answers to. Thanks in advance.

    For any given/custom ability, I can use Cost > Vital Fraction > Energy = 1 or 100 (which ever represent 100%).

    I am not sure whether it is 100% of Maximum Energy or 100% of Available Energy.

    How to create an Ability that use 100% of available/current energy, and the duration of effect varies according to amount of energy used?

    For example: An unit has Maximum Energy of 200 & Ability > Modfied Stim Pack that cost energy.

    1. If he has 100 available energy, when he use Modified Stim Pack, he will have 20 seconds duration.
    2. If he has 50 available energy, when he use Modified Stim Pack, he will have 10 seconds duration.
    #2 Apr 03, 2012 at 04:38 UTC - 0 likes

    @dragooness: Go

    Pretty sure it is 100 % of Maximum Energy on the Vital Fraction Cost. I would use a switch effect, many different validators, and many different possible behaviors/apply behavior effects as well. Validators will basically check how much energy they have at the time, can do checks for 50, 100, etc, 10, 20, etc, however fine tuned you wish to make it. Behaviors will have varying lengths/strengths whatever you decide. And Apply Behavior effects will obviously be applying said effect to the caster. Just be sure to run something at the end to remove all energy too.

    Horologium Super Cluster RPG

    #3 Apr 03, 2012 at 15:49 UTC - 0 likes

    @Deadzergling: Go

    I c. That looks like a lot of repetitive work. But I think I can do it.

    As for the "switch effect", I honestly don't know what it is.

    Is it possible create different button for different apply behavior and just have validator show the button only if set energy amount is reached.

    #4 Apr 03, 2012 at 16:38 UTC - 0 likes

    @dragooness: Go

    Same amount of work as a switch effect. Actually, more.

    A switch effect is a "Set" effect with validators tied to each effect in it (And, by default, only runs one effect). Just create one and take a look, it should be rather straight forward. Make sure to list the effects starting with the highest energy validator, because once one of the effects are fired it will skip the rest (unless told to do otherwise, which you dont want anyway), so if you ordered from smallest to highest it would always pick the lowest.

    Projects: Starmon - RuneCraft
    https://farm7.staticflickr.com/6208/6049547173_4fd2fcef13_o.jpg

    #5 Apr 03, 2012 at 16:52 UTC - 0 likes

    Here is an example of one of my Switch Effects

    Example of switch Behaviour

    All it does is toggles a radar like the sensor tower radar or seige tanks range On/Off I used a switch so that i only needed one button in the command card. But obviously this ability has a different range because its a fire

    #6 Apr 03, 2012 at 18:44 UTC - 0 likes

    Alright, thanks a lot guys. I will make sure to give it a try.

    #7 Apr 19, 2012 at 01:00 UTC - 0 likes

    @dragooness: Go

    I got everything working, except one - cost.

    Cost is usually calculated at beginning where Ability (Effect-Instant). But for my varied Ability Duration, I require varied Ability Cost.

    I tried to put Energy Cost under Behavior, so the Cost matches Behavior duration, but it does cost any energy when I use ability. Why?

    According to http://www.sc2mapster.com/wiki/galaxy/data/behaviors/buff/

    • Cost are not functional
    Last edited Apr 19, 2012 by dragooness
    #8 Apr 20, 2012 at 08:00 UTC - 0 likes

    I am currently running with Negative Energy Regeneration Rate with my Behavior trying to solve this Cost thing.

    Any ideas, work-around?

    Last edited Apr 21, 2012 by dragooness
  • 8 posts

You must login to post a comment. Don't have an account? Register to get one!