YesNoOk
avatar

AttackMulSet (SCTRLs) (Read 5544 times)

Started by Ricepigeon, October 19, 2015, 03:17:48 pm
Share this topic:
AttackMulSet (SCTRLs)
#1  October 19, 2015, 03:17:48 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
Sets the player's attack multiplier. All damage the player gives is scaled by this amount.

Required parameters:

    value = attack_mul (float)
        Specifies the desired multiplier. For instance, an attack_mul of 2 deals double damage.

Optional parameters:
    none

Example:
    none

Additional Notes:
This SCTRL is crucial to damage proration, also known as damage dampening, regardless of which proration system you are using. You will usually be using the AttackMulSet controller in your -2 or -3 state with some kind of variable to store the amount to prorate your damage by, for example;

Code:
[State -2, VarSet]
type = varset
trigger1 = .... ;These triggers when a move hits, etc
fvar(10) = ... ;Damage dampening code goes here

[State -2, Reset Var]
type = varset
trigger1 = enemynear(0),movetype != H
...
fvar(10) = 1.0 ;This resets the scaling variable to 1.0 when the opponent is in an idle state

[State -2, Damage Proration]
type = AttackMulSet
trigger1 = 1
value = fvar(10)

Keep in mind that the above method will only apply the scaling to the player. Any helpers that are spawned will not be affected, unless they use the AttackMulSet controller as well.