Jump to content
  • 0

Passive Damaging Helper/Projectile


Celestial-Len

Question

So I've been having this idea for a while now but don't know how to exactly execute it: how do I make a projectile/helper that causes passive damage over time? My character spits out something that if it hits the opponent causes them to slowly lose HP for a period of time.

 

Only character I can recall having this sort of thing was ShowBySpirit's Umbreon. How was that done exactly, and is there a more efficient way of doing such a move?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Okay, so while technically solved, actually implementing this has been kinda tricky:

 

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

; Toxic Helper

[Statedef 1051]

type = A

movetype= A

physics = N

velset = 0,0

anim = 1051

 

[State 1051, VelAdd]

type = VelAdd

trigger1 = time = 0

x = 8

y = 1

;ignorehitpause =

;persistent =

 

[State 1051, HitDef]

type = HitDef

trigger1 = Time = 0

attr = S,NA ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT

hitflag = MAF ;HLAFD+-

guardflag = MA ;HLA

animtype = light ;light,medium,hard,back,up,diagup

air.animtype = light

damage = 0,0

pausetime = 0 ,0

guard.pausetime = 0,0

sparkno = -1

guard.sparkno = -1

sparkxy = 0,0

hitsound = 1,0

guardsound = 2,0

ground.type = High ;Low,Trip,None

air.type = High

ground.slidetime = 0

guard.slidetime = 0

ground.hittime = 0

guard.hittime = 0

air.hittime = 20

ground.velocity = 0,0

guard.velocity = 0

air.velocity = 0,0

air.juggle = 0

palfx.time = 14

palfx.add = 170,0,127

palfx.mul = 170,0,127

palfx.color = 0

 

[State 1051, Helper]

type = Helper

trigger1 = movehit = 1

helpertype = normal ;player

name = "Toxic Effect"

ID = 1052

stateno = 1052

pos = 0,0

postype = p2 ;p2,front,back,left,right

 

[State 1051, DestroySelf]

type = DestroySelf

trigger1 = Vel Y > 0

trigger1 = Pos Y >= 0

trigger2 = movecontact

 

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

; Toxic Effect

[Statedef 1052]

type = A

movetype= A

physics = N

anim = 1052

 

[state 0, ReversalDef]

type = ReversalDef

trigger1 = time = 0

reversal.attr = A,NA

sparkno = -1

sparkxy = 0,0

pausetime = 0,0

hitsound = -1

numhits = 0

 

[State 0, StateTypeSet]

type = StateTypeSet

trigger1 = time = 3

movetype = I

 

[State 0, HitAdd]

type = HitAdd

trigger1 = 1

value = -1

 

[State 0, TargetLifeAdd]

type = TargetLifeAdd

trigger1 = time%2=0

value = -4

kill = 0

absolute = 1

 

[State 0, PosSet]

type = PosSet

trigger1 = 1

x = enemynear, pos x

y = enemynear, Const(size.head.pos.y)+(enemynear,pos y)

ignorehitpause = 1

 

[State 7001, Assert]

type = AssertSpecial

trigger1 = 1

flag = noshadow

ignorehitpause = 1

 

[State 10002, DestroySelf]

type = DestroySelf

trigger1 = time = 350

trigger2 = enemynear, alive = 0

trigger3 = enemynear, life <= 20

 

These use code partially edited from KoopaKoot's Shiki. Somehow though, the ReversalDef and therefore the TargetLifeAdds aren't working, so even though the opponent is hit by the effect, they don't take any damage from it. Note that these are the only pieces of code in the CNS relating to the effect. So no -2 or -3 or whatever.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...