It's no trouble at all. Feel free to ask all the questions you want. Just try and see if they've been answered with a quick search of this board. Trust me, people ask the same question a thousand different ways. We always try to help out.
So I've actually modified a move that does this exact thing. It's in my Samus, in the Metroid Ultra. The metroid comes out and latches onto P2 and slowly drains it's health. P2 can still fight the entire time.
The main chunk of code you're looking for is,
[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time%2=0 ;;Youre going to want to change this to your timing!
value = -1
kill = 0
absolute = 1
You're also going to want to add a TriggerAll which looks out for your variable.
Something like
TriggerAll = var(18) >=1
Then in your original move, when it hit's P2, Var(18) is set to something like 5 for 5 seconds, OR you can set it to 300 because each second is 60 tics. 60tics X 5seconds = 300.
Then you'd have something set up in statedef -2 to reduce var(18) every tic, or every second using a VarAdd. (even though it's subtraction).
This is a more complex type of attack. It's guaranteed you wont get it working 100% perfect the first time you get it to do anything.
The above code is going to be in a Helper that's spawned in P1's state AFTER P1 hits P2. You'll use P1StateNo = in the hitdef to switch the states. There's a better way to do this but for now use it.
Look up KoopaKoot's "Shiki". I believe Statedef 9020 has the Evil Skull of Death in it.
Also, just watch double posting. Just use the Modify button on your post when you need to add something new and no one's replied.
----
Seems you've figured that out while I was typing lol.
Alright so I took a look at Shiki's DoT skill move with the posion skull. It looks like the only part of that move that does the DoT is the helper, so I made a helper that performed the same function as hers without using any variables.
;---------------------------------------------------------------------------
; Helm Splitter
[Statedef 1430]
type = S
movetype = A
physics = S
juggle = 0
poweradd = floor(4*fvar(8))
velset = 0,0
anim = 1430
ctrl = 0
sprpriority = 1
facep2 = 1
[State 0, Helper] ;this would summon a helper that would stick to P2 and deal damage;
type = Helper
trigger1 = animelem = 10
helpertype = normal ;player
name = "Bleeding"
ID = 11020
stateno = 11020
pos = 32,-52
postype = p2 ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
; rest of the state code ;
;---------------------------------------------------------------------------
;BleedHelper
[Statedef 11020]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 6005
sprpriority = 4
[State 200, Punch Attempt Sound]
type = Playsnd
trigger1= time = 1
value = 1000,3
[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] ;this is supposed to deal damage to P2, but it is not;
type = TargetLifeAdd
trigger1 = time%2=0
value = -1
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 = Parent,Movetype = H && (parent, stateno != [120,160])
trigger2 = time = 350
trigger3 = enemynear, alive = 0
trigger4 = enemynear, life <= 20
The problem is, even though the helper is summoned, my opponent isn't taking any damage from the TargetLifeAdd. It summons properly, lasts for the set duration, and disappears when it is supposed to, but it is not actually dealing damage.
I'm not sure what I'm doing wrong.