YesNoOk
avatar

Damage Scaliing (Read 366 times)

Started by jbl2000, October 16, 2007, 01:28:55 pm
Share this topic:
Damage Scaliing
#1  October 16, 2007, 01:28:55 pm
  • avatar
  • **


How Do i program a hitdef so its only delivers a certain amount of damage if not enough hits get in?

For example:

I want a 3 super attack in total to do 300 damage

But even if the two of hits miss i still want it to do 300 damage.

What is the best way to achieve this?

If possible use this as a base:

;---------------------------------------------------------------------------
; Giant Shovel
[Statedef 2300]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= -2000
ctrl = 0
velset = 0,0
anim = 2300
sprpriority = 2

[State 2300, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 2300, Hit 1]
type = HitDef
trigger1 = animelem = 1
attr = S, HA
animtype  = Medium
damage    = 100,5
guardflag = MA
pausetime = 5,5
sparkno = 0
sparkxy = -10,-37
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = -5
air.velocity = -2.5,-3.5

[State 2300, hit 2]
type = HitDef
trigger1 = animelem = 2
attr = S, HA
animtype  = Medium
damage    = 100,5
guardflag = MA
pausetime = 12,12
sparkno = 0
sparkxy = -10,-37
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = -5
air.velocity = -2.5,-3.5

[State 2300, Hit 3]
type = HitDef
trigger1 = animelem = 3
attr = S, HA
animtype  = Medium
damage    = 100,5
guardflag = MA
pausetime = 12,12
sparkno = 0
sparkxy = -10,-37
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = -5
air.velocity = -2.5,-3.5
fall = 1
fall.recover = 0

[State 2300, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----------------------------------------------

Thanks in advance
Re: Damage Scaliing
#2  October 16, 2007, 01:50:33 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Just an idea, there may be many ways of achieving this : use a varset triggered on movehit for your three hitdefs. For example, set var(40) to 1.

Change the damage values of the hitdefs to 0.

At the end of the move, use a target life add of -300 triggered on var(40).

===========================================================

Other way :

Set damage for Hit1 to 300.
then, in the damage for Hit2, use an ifelse(Hit1 touched,0,300)
In Hit3, ifelse(Hit1 touched || Hit2 touched,0,300)