;---------------------------------------------------------- ;TagIn ;---------------------------------------------------------- ; ;Changes the state number of the player, and that of the player's partner. ; ;Required arguments: ; stateno = state_no (int) ; state_no is the number of the state to change to. ; partnerstateno = state_no (int) ; state_no is the number of the state to change the partner to. ; ctrl = ctrl_flag (int) ; Set to nonzero to have control, or 0 to disable control. ; ;Optional arguments: ; none ; ;Example: ; none ; ;Notes: ; Crashes if triggered without a partner being present. ; ;---------------------------------------------------------- ;TagIn Implementation ;---------------------------------------------------------- ; Var(51) - Simul TAG flag. 0 = Normal, 1 = Special Simul (with partner) ;*********************************************************; ;*********************************************************; ; ****************** ; ** TAG states ** ; ****************** ; Simul TAG Code by R.o.q.u.e., Heavily Edited for Marvel Vs Capcom style Gameplay. ; However if it were not for Roque making the code and letting people mess with it ; in the first place i probably wouldnt have started on this yet. ; ;*********************************************************; ;*********************************************************; ; Entering the screen ;-------------------- [Statedef 4500] type = A movetype = I physics = N anim = 4500 sprpriority = 2 ctrl = 0 [State 4512, invincibility] type = varset trigger1 = time = 0 v = 52 value = 0 [State 4500, position] type = PosSet trigger1 = time = 0 x = -243*facing y = -90 [State 4500, velocity] type = VelSet trigger1 = Anim != 45000 x = 18 y = 4 [State 4500, invincibility] ; the character cannot be hit until he has fully entered on the stage type = NotHitBy trigger1 = BackEdgeBodyDist <= 0 value = SCA time = 2 [State 4500, invincibility] ; if partner was KOed, appear being invincible type = NotHitBy trigger1 = Partner, Life <= 0 value = SCA time = 6 [State 4500, screen bound] ; Prevents the camera from following the char type = ScreenBound trigger1 = 1 value = 0 [State 4500, changestate] ; the character attacks his opponent when : type = ChangeState triggerall = BackEdgeBodyDist >= 0 ; he is on the stage trigger1 = partner, life > 0 ; and his partner is alive ;trigger1 = P2BodyDist X = [0, 100] ; and his enemy is close trigger1 = !Win && !Lose value = 4501 [State 4500, 3] type = VelSet triggerall = BackEdgeBodyDist >= 0 trigger1 = FrontEdgeBodyDist <= 0 ; he has reached the other side of the screen trigger2 = partner, life <= 0 ; his partner has just died trigger2 = (Time >= 50) || (P2BodyDist X = [-100, 100]) trigger3 = P2Dist X < 0 ; his enemy is behind him trigger4 = P2BodyDist X = [-100, 100] trigger4 = Win trigger5 = Win trigger5 = Time >= 20 x = 0 y = 0 ; Leaving Taunt ;-------------- [Statedef 4510] ; Define your own taunt here type = S movetype = I physics = S anim = 4510 sprpriority = -2 velset = 0,0 ctrl = 0 [State 4510, invincibility] ; the character cannot be hit since he is leaving type = NotHitBy trigger1 = 1 value = SCA [State 4510, ghost] ; Prevents the camera from following the char type = PlayerPush trigger1 = 1 value = 0 [State 4511, screen bound] type = playsnd trigger1 = time = 0 value = 3,2 [State 4511, screen bound] type = ScreenBound trigger1 = time > 15 value = 0 [State 4510, end state] type = ChangeState ;trigger1 = time = 1 trigger1 = animtime = 0 value = 4511 ; Leave the stage ;---------------- [Statedef 4511] type = S movetype = I physics = N anim = 100 ; <- You can use the standard running animation or put another one sprpriority = 2 ctrl = 0 [State 4512, invincibility] type = varset trigger1 = time = 0 v = 52 value = 1 [State 4511, velocity] type = turn trigger1 = time = 0 [State 4511, velocity] type = VelSet trigger1 = time = [0,1] x = 12 y = 0 [State 4511, invincibility] type = NotHitBy trigger1 = 1 value = SCA [State 4511, ghost] type = PlayerPush trigger1 = 1 value = 0 [State 4511, screen bound] type = ScreenBound trigger1 = 1 value = 0 [State 4511, wait outside state] type = ChangeState trigger1 = FrontEdgeDist < -30 value = 4512 ; Standby (offscreen) ;----------------------- [Statedef 4512] type = S movetype = I physics = N anim = 0 velset = 0,0 ctrl = 0 [State 4512, invincibility] type = NotHitBy trigger1 = 1 value = SCA [State 4512, ghost] type = PlayerPush trigger1 = 1 value = 0 [State 4512, screen bound] ; Prevents the camera from following the char type = ScreenBound trigger1 = 1 value = 0 [State 4512, life add] ; Gains life (optional) type = LifeAdd trigger1 = (gametime%10) = 0 value = 1 [State 4512, turn] ; always face the same direction as partner type = turn trigger1 = facing != partner,facing [State 4512, position] ; always stay behind and at the same distance of the char on the stage type = posset trigger1 = 1 x = (partner, pos x) - 1000*facing [State 4500, changestate] ; the character attacks his opponent when : type = ChangeState ;triggerall = BackEdgeBodyDist >= 0 ; he is on the stage trigger1 = partner, stateno = 4600 value = 4700 [State 4512, turn] type = changestate trigger1 = command = "assist" trigger1 = partner, var(3) != 1 trigger1 = partner, stateno = [0,699] trigger2 = partner, stateno = 4900 value = 4800 [State 4512, turn] ; always face the same direction as partner type = changestate trigger1 = partner, stateno = 4510 value = 4500 [State 4512, turn] ; always face the same direction as partner type = changestate trigger1 = roundstate = 3 value = 4520 ;--------------------------------------------------------------------------- ; Jumping in [Statedef 4520] type = A movetype = I physics = N anim = 42 sprpriority = 2 ctrl = 0 [State 4520, 0] type = varset trigger1 = time = 0 v = 52 value = 0 [State 4520, 0] type = ctrlset trigger1 = time = 20 value = 1 ctrl = 1 [State 4520, 0] type = PosSet trigger1 = AnimElem = 2, < 0 x = -243*Facing y = 0 [State 4520, 1] type = VelSet trigger1 = AnimElem = 2, = 0 x = 4 ;.5 y = -8.75 [State 4520, 2] type = NotHitBy trigger1 = time < 20 value = SCA time = 6 [State 4520, 8] type = screenbound trigger1 = time < 20 value = 0 [State 4520, 8] type = Gravity trigger1 = AnimElem = 2, >= 0 [State 4520, 9] type = VelSet trigger1 = Vel Y >= 0 trigger1 = Pos Y > 0 trigger1 = AnimElem = 2, >= 0 x = 0 y = 0 [State 4520, 10] type = ChangeState trigger1 = Vel Y >= 0 trigger1 = Pos Y > 0 trigger1 = AnimElem = 2, >= 0 value = 4521 ;--------------------------------------------------------------------------- ; Landing [Statedef 4521] type = S movetype = I physics = N anim = 47 sprpriority = 2 ctrl = 0 [State 4520, 0] type = PosSet trigger1 = Time = 0 y = 0 [State 4520, 10] type = ChangeState trigger1 = AnimTime >= 0 value = 0 ctrl = 1 ;--------------------------------------------------------------------------- ; Landing [Statedef 4502] type = S movetype = I physics = N anim = 194 sprpriority = 2 ctrl = 0 velset = 0,0 [State 4520, 0] type = playsnd trigger1 = time = 2 value = 1,0 [State 4520, 0] type = PosSet trigger1 = 1 y = 0 [State 4520, 10] type = ChangeState trigger1 = AnimTime = 0 value = 0 ctrl = 1 ; NEW !! Standby (onscreen) ;-------------------------- [Statedef 4600] ; Define your own taunt here type = S movetype = I physics = S sprpriority = -2 poweradd = -1000 velset = 0,0 ctrl = 0 [state haha] type = changeanim trigger1 = time = 0 value = 4100 [state 6102, 4] type = playsnd trigger1 = time = 0 value = 1,14 channel = 0 ;-------------------------------------- [state 4002, 1] type = explod trigger1 = time = 0 trigger1 = numexplod(7002) = 0 anim = 7002 id = 7002 postype = back pos = 0, 120 sprpriority = -3 ownpal = 1 bindtime = -1 supermove = 1 pausemovetime = 9999 [State 4600, invincibility] ; the character cannot be hit since he is leaving type = NotHitBy trigger1 = 1 value = SCA [State 4600, ghost] ; Prevents the camera from following the char type = PlayerPush trigger1 = 1 value = 0 [State 4600, end state] type = ChangeState trigger1 = time = 1 ;trigger1 = partner, prevstateno = 4500 ;trigger2 = !partner, prevstateno = 4500 ;trigger2 = animtime = 0 value = 4601 ;==================================== [Statedef 4700] type = s movetype= a physics = N velset = 0,0 anim = 4700 ctrl = 0 poweradd = -1000 [State 4512, invincibility] type = varset trigger1 = time = 0 v = 52 value = 0 [state 4002, 1] type = explod trigger1 = time = 0 trigger1 = numexplod(7003) = 0 anim = 7003 id = 7003 postype = back pos = 0, 120 sprpriority = -3 ownpal = 1 bindtime = -1 supermove = 1 pausemovetime = 9999 [state 2000, 4] type = helper trigger1 = numhelper(9002) = 0 stateno = 9004 id = 9002 name = "floor" pos = 0,0 postype = p1 bindtime = 0 ownpal = 1 pausemovetime = 999 [State 4500, playsnd] type = playsnd trigger1 = time = 0 value = s4,0 [State 4500, playsnd] type = playsnd trigger1 = time = 0 value = s4,2 volume = 255 ;[State 4500, screen bound] ; Prevents the camera from following the char ;type = changeanim ;trigger1 = time = 0 ;value = 41 [State 4500, screen bound] ; Prevents the camera from following the char type = ScreenBound trigger1 = 1 value = 0 [State 4500, position] type = Posset trigger1 = time = 0 trigger1 = facing = 1 x = (partner, pos x) - 257 y = -130 [State 4500, position] type = Posset trigger1 = time = 0 trigger1 = facing = -1 x = (partner, pos x) + 257 y = -130 [State 4500, position] type = Posadd trigger1 = 1 x = 16 [State 4500, velocity] type = VelSet trigger1 = time = 0 y = 3 [State 4500, velocity] type = Veladd trigger1 = 1 y = .7 ; Tag attack LV1 [State 4501, LV1] type = ChangeState trigger1 = pos y >= 0 value = 4701 ;=============================================================== [Statedef 4701] type = s movetype= a physics = s velset = 0,0 facep2 = 1 anim = 4100 ctrl = 0 [state 200, 1] type = posset trigger1 = time = 0 y = 0 [state 6102, 4] type = playsnd trigger1 = time = 2 value = 1,14 channel = 0 [State 1000,1] type = Explod trigger1 = time = 2 anim = 6011 pos = 0, 0 postype = p1 removetime = -2 ignorehitpause = 1 bindtime = 1 persistent = 0 sprpriority = 4 ownpal = 1 [state 6102, 4] type = playsnd trigger1 = animelem = 4 value = 1,13 channel = 0 [state hee] type = changeanim trigger1 = animtime = 0 trigger1 = anim = 4100 value = 0 [State 1000, 5] type = ChangeState triggerall = partner, movetype != A trigger1 = anim = 0 value = 0 ctrl = 1 ; **************************** ; ** user-defined section ** ; **************************** ; NEW !! Tag attack selection ;---------------------------- [Statedef 4501] type = A movetype = A physics = N sprpriority = 2 ctrl = 0 ; Tag attack LV3 ;[State 4502, LV3] ;type = changestate ;triggerall = selfanimexist (4100) ; <--- change this... ;trigger1 = power >= 2000 ;value = 4100 ; <--- and this for the super move! ; Tag attack LV2 ;[State 4501, LV2] ;type = changestate ;triggerall = selfanimexist (4100) ; <--- change this... ;trigger1 = power >= 1000 ;value = 4100 ; <--- and this for the lv.2 move! [state 240, 2] type = hitdef trigger1 = time = 0 attr = s, na animtype = medium damage = 51 guarDFlag = ma pausetime = 9,9 sparkno = s6002 guard.sparkno = s6000 sparkxy = -10,-61 hitsound = s0+var(49),4 guardsound = s0+var(49),8 ground.type = low ground.slidetime = 12 ground.hittime = 15 ground.velocity = -14,-7 fall = 1 fall.recover = 0 air.velocity = -14,-7 ; Tag attack LV1 [State 4501, LV1] type = ChangeState trigger1 = pos y >= 0 ; <--- change this... value = 4502 ; <--- and this for the lv.1 move! ;[State 4501, end state] ; cancel if: ;type = ChangeState ;trigger1 = Time = [0,1] ;value = 0 ;ctrl = 1 ; NEW !! Team attack selection ;----------------------------- [Statedef 4601] type = s movetype= a physics = s velset = 0,0 ctrl = 0 [State 1000,1] type = Explod trigger1 = time = 2 anim = 6011 pos = 0, 0 postype = p1 removetime = -2 ignorehitpause = 1 bindtime = 1 persistent = 0 sprpriority = 4 ownpal = 1 [state 6102, 4] type = playsnd trigger1 = animelem = 4 value = 1,13 channel = 0 [state hee] type = changestate trigger1 = animtime = 0 value = 4510 ;======================================================= ;==================================== [Statedef 4800] type = A movetype= a physics = N anim = 4700 ctrl = 0 [State 4512, invincibility] type = varset trigger1 = time = 0 v = 52 value = 1 [State 4500, screen bound] ; Prevents the camera from following the char type = ScreenBound trigger1 = 1 value = 0 [State 4500, position] type = Posset trigger1 = time = 0 trigger1 = facing = 1 x = (partner, pos x) - 257 y = -80 [State 4500, position] type = Posset trigger1 = time = 0 trigger1 = facing = -1 x = (partner, pos x) + 257 y = -80 [State 4500, position] type = Posadd trigger1 = 1 x = 10 [State 4500, velocity] type = VelSet trigger1 = time = 0 y = -5 [State 4500, velocity] type = Veladd trigger1 = 1 y = .7 [state 810, grab sound] type = changestate trigger1 = pos Y >= 0 value = 4801 ;==================================== [Statedef 4801] type = s movetype= a physics = s juggle = 5 anim = 250 velset = 0,0 ctrl = 0 sprpriority = 2 [state 200, 1] type = posset trigger1 = 1 y = 0 [state 200, 1] type = playsnd trigger1 = animelem = 3 value = 5, 1 freqmul = 1.5 persistent = 0 [state 200, 1] type = playsnd trigger1 = anim = 251 trigger1 = animelem = 1 value = 3, 0 channel = 0 [state 440, 3] type = hitdef trigger1 = time = 0 attr = c, na damage = 20 hitflag = mA animtype = up guarDFlag = MA pausetime = 0,5 sparkno = s6004 guard.sparkno = s6000 sparkxy = -5,-40 hitsound = s0+var(49),5 guardsound = s0+var(49),8 ground.type = low air.type = low ground.slidetime = 20 ground.hittime = 15 ground.velocity = -2,-10 air.velocity = -2,-10 air.hittime = 50 guard.velocity = -5 p2stateno = 441 yaccel = .6 [state 870, push blocka] type = changeanim trigger1 = anim = 250 trigger1 = animtime = 0 value = 251 [state 870, push blockb] type = helper trigger1 = anim = 251 trigger1 = animelem = 2 id = 251 name = "rock" pos = 0,-126 stateno = 251 ownpal = 1 [state 810, grab sound] type = changestate trigger1 = animtime = 0 value = 4802 ctrl = 0 [Statedef 4802] ; Define your own taunt here type = S movetype = I physics = S anim = 195 sprpriority = -2 velset = 0,0 ctrl = 0 [state 1003] type = playsnd trigger1 = time = 0 value = 1, 5 [state 1003] type = screenbound trigger1 = 1 value = 0 [State 4510, ghost] ; Prevents the camera from following the char type = PlayerPush trigger1 = 1 value = 0 [State 4510, end state] type = ChangeState ;trigger1 = time = 1 trigger1 = animtime = 0 value = 4511 [statedef 48000] type = a movetype= a physics = n anim = 11001 velset = 0,0 sprpriority = 3 [State 4510, end state] type = assertspecial trigger1 = 1 flag = invisible [State 4510, end state] type = posset trigger1 = time = 0 y = 5 [State 4510, end state] type = turn trigger1 = time = 0 [State 4510, end state] type = ChangeState trigger1 = time = 0 value = 11000 [State 4510, end state] type = ChangeState trigger1 = time = 0 value = 11000 ;==================================== [Statedef 4900] type = s movetype= a physics = S anim = 4900 ctrl = 0 [state 810, grab sound] type = playsnd trigger1 = time = 0 value = 1,6 channel = 0 [state 810, grab sound] type = ctrlset trigger1 = time > 3 value = 1 [state 810, grab sound] type = changestate trigger1 = animtime = 0 value = 0 ctrl = 1 ;--------------------------------------------------- ;floor [statedef 9004] type = a movetype= a physics = n ctrl = 0 anim = 9012 sprpriority = -8 [state 710,6] type = assertspecial trigger1 = 1 flag = nobg flag2 = nofg [state 710,6] type = posset trigger1 = time > 0 x = 0 y = 0 [state 4002, 3.2] type = explod triggerall = numexplod(9003) = 0 trigger1 = time = 1 trigger1 = Facing = 1 anim = 9013 id = 9003 postype = back pos = 0, 0 sprpriority = -6 ownpal = 1 bindtime = -1 supermove = 1 pausemovetime = 9999 [state 4002, 3.2] triggerall = numexplod(9003) = 0 type = explod trigger1 = time = 1 trigger1 = Facing = -1 anim = 9013 id = 9003 postype = back pos = 1, 0 sprpriority = -4 ownpal = 1 bindtime = -1 supermove = 1 pausemovetime = 9999 [state 4002, super bg] type = explod trigger1 = enemynear, numhelper(9002) = 0 trigger1 = numexplod(9003) = 0 trigger1 = time >= 0 anim = 9011 ownpal = 1 id = 9001 bindtime = -1 removetime = -1 removeongethit = 1 postype = back pos = 0, 0 sprpriority = -9 persistent = 0 [state 710, 6] type = removeexplod trigger1 = parent, movetype != a trigger2 = roundstate = 3 ID = 9001 [state 710, 6] type = Destroyself trigger1 = parent, movetype != a trigger2 = roundstate = 3