So I found out about the Poison status effect from looking it up on Mugen Wiki and whatnot. Through research and whatnot I came up with this code:;------------------; Toxic Helper[Statedef 1051]type = Amovetype= Aphysics = Nvelset = 0,0anim = 1051 [State 1051, VelAdd]type = VelAddtrigger1 = time = 0x = 8y = 1;ignorehitpause =;persistent = [State 1051, HitDef]type = HitDeftrigger1 = Time = 0attr = S,NA ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HThitflag = MAF ;HLAFD+-guardflag = MA ;HLAanimtype = light ;light,medium,hard,back,up,diagupair.animtype = lightdamage = 0,0pausetime = 0 ,0guard.pausetime = 0,0sparkno = -1guard.sparkno = -1sparkxy = 0,0hitsound = 1,0guardsound = 2,0ground.type = High ;Low,Trip,Noneair.type = Highground.slidetime = 0guard.slidetime = 0ground.hittime = 0guard.hittime = 0air.hittime = 20ground.velocity = 0,0guard.velocity = 0air.velocity = 0,0air.juggle = 0palfx.time = 14palfx.add = 170,0,127palfx.mul = 170,0,127palfx.color = 0 [State 1051, Helper]type = Helpertrigger1 = movehit = 1helpertype = normal ;playername = "Toxic Effect"ID = 1052stateno = 1052pos = 0,0postype = p2 ;p2,front,back,left,right [State 1051, DestroySelf]type = DestroySelftrigger1 = Vel Y > 0trigger1 = Pos Y >= 0trigger2 = movecontact ;------------------; Toxic Effect[Statedef 1052]type = Amovetype= Aphysics = Nanim = 1052 [state 0, ReversalDef]type = ReversalDeftrigger1 = time = 0reversal.attr = A,NAsparkno = -1sparkxy = 0,0pausetime = 0,0hitsound = -1numhits = 0 [State 0, StateTypeSet]type = StateTypeSettrigger1 = time = 3movetype = I [State 0, HitAdd]type = HitAddtrigger1 = 1value = -1 [State 0, TargetLifeAdd]type = TargetLifeAddtrigger1 = time%2=0value = -4kill = 0absolute = 1 [State 0, PosSet]type = PosSettrigger1 = 1x = enemynear, pos xy = enemynear, Const(size.head.pos.y)+(enemynear,pos y)ignorehitpause = 1 [State 7001, Assert]type = AssertSpecialtrigger1 = 1flag = noshadowignorehitpause = 1 [State 10002, DestroySelf]type = DestroySelftrigger1 = time = 350trigger2 = enemynear, alive = 0trigger3 = 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. Can someone please tell me what I'm missing here? This attack prior to the poison is meant to function like a helper projectile, and that part came out fine, just the poison effect I'm having trouble with.
The point of the ReversalDef is to persist a target, normally targets are dropped when the targeted player leaves the hit state but running ReversalDef allows the target to continue to be held. In this code the player running state 1051 (I assume some helper) is getting the initial target with HitDef, but then you spawn a new helper into 1052 to run the ReversalDef... the 1052 helper doesn’t have any target to begin with so the ReversalDef can’t persist anything. You need to run the ReversalDef on whatever player already holds a target. You could just merge these two together and use the same helper for both...[State 1051, HitDef]type = HitDeftrigger1 = !NumTarget ;; <— only until target obtained[State 1051, ReversalDef]type = ReversalDeftrigger1 = NumTarget ;; <— retain target after obtainedThen move all the posset, targetlifeadd, etc up to 1051 and trigger them on NumTarget as well... and adjust the DestroySelf triggers