Dont know where to put this for it could fit in 2 locations of this forum but here goes:
;=====================================
;-BACKGROUND/FORGROUND SIDESTEP
;VAR VERSION 0.98-
;=====================================
;*Note
; add: projsprpriority = IfElse(var(53),-3,1) only to all sctrls types of projectile in a char
; This is the solution to quickly fixing the layering of projectiles-
; add: sprpriority = IfElse(var(53),-3,1) only to all sctrls types of explod (personal explods [ex.:like flames from hands and/or dust from feet when u land]) in a char.
; This is the solution to quickly fixing the layering of personal explods. This is also the solution if character sprites need layer fixing (use on the action/move that needs it) -
;remove the ";" from the triggers with **** behind it to enable in simul mode. Simul Mode has a bug with this code when 3 players are in the background and one is in the foreground then the foreground person can hit the background enemies. that is not supposed to happen and further investigation is being conducted on how to fix this. If you have any suggestions then feel free to speak up. Single and Teams seem to work fine. Also a person can parry no matter what plane the enemy is on separate from them which is not supposed to happen. Investigation on that is being conducted as well.
;================================================
;Var version is used for the proper way in handling this coding by less memory association whole number expressions
;Only use if the majority of your chars have more unused vars than fvars
;If chars use more vars than fvars then change all vars to fvars(don't forget to change the numbers with that to match unused fvars with this coding)
;Using Vars are recommended since nothing in those vars use decimal numbers; Fvars are for decimal number use
;Each char MUST use the same vars OR fvars for this code to function properly
;So the version you pick MUST also be the version you give to ALL your chars
;You have been warned
;Make sure you make backups just in case YOU mess up
;I recommend you use the MUGEN VAR EXCHANGER created by Tatsu if you need to switch vars out of the way so that you can use the vars already provided.
;enjoy!
;=======================================================
;FG/BG Changer code by Shinra358
;=======================================================
;IN CMD FILE
[Command]
name = "DodgeBG"
command = /$a,/$x,B
time = 20
;----
[Command]
name = "DodgeFG"
command = /$a,/$x,F
time = 20
;-------------------------------------------------------------
;means hold a+x then press BACK in foreground to go into background
;means hold a+x then press FWD in background to go into foreground
;a is supposed to be light kick and x is supposed to be light punch.
;If somehow it's different for the char then change the buttons to imply the light attacks.
;-------------------------------------------------------------
;
;=======================================================
;FG/BG Changer code by Shinra358
;end of cmds of cmd file codes
;=======================================================
;--------------------------------------------------------------
;=======================================================
;FG/BG Changer code by Shinra358
;=======================================================
;
[State -1, switch2fg]
type = ChangeState
value = 11110000
triggerall = var(53) = 1
triggerall = command = "DodgeFG"
triggerall = statetype != A
triggerall = statetype != L
triggerall = statetype = S
triggerall = movetype != H
triggerall = movetype != A
triggerall = ctrl
trigger1 = 1
;trigger1 = teammode = single || teammode = turns****
;trigger1 = enemy, teammode = single || enemy, teammode = turns****
;
[State -1, switch2bg]
type = ChangeState
value = 11111111
triggerall = var(53) = 0
triggerall = command = "DodgeBG"
triggerall = statetype != A
triggerall = statetype != L
triggerall = statetype = S
triggerall = movetype != H
triggerall = movetype != A
triggerall = ctrl
trigger1 = 1
;trigger1 = teammode = single || teammode = turns****
;trigger1 = enemy, teammode = single || enemy, teammode = turns****
;
;===================================================
;FG/BG Changer code by Shinra358
;end of negative cmd file codes
;===================================================
;=======================================================
;FG/BG Changer code by Shinra358
;=======================================================
;===================================================
;make manual changes to the anim of switching to and from the two planes
;===================================================
;IN CNS
;FG/BG Changer ---
;var(53) = 0, foreground - 1, background
;var(54) = 0, not hit by var
;
[Statedef 11110000];foreground
Type = S
movetype= A
physics = S
velset = 0,0
anim = 195 ;Animation for dodging
persistent = 1
ignorehitpause = 1
ctrl = 0
;
;This sets the variable for the effect. Sets var(53) to a value of 0.
[State 11110000, Change2FG]
Type = VarSet
triggerall = command = "DodgeFG"
triggerall = var(54) = 0
trigger1 = 1
;trigger1 = teammode = single || teammode = turns****
;trigger1 = enemy, teammode = single || enemy, teammode = turns****
var(53) = 0
;
[State 11110000, wait] ;Can't be thrown or hit right away after using
type = NotHitBy
trigger1 = 1
value = SCA
time = 5
;
[state 11110000, chng2standing]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;
[Statedef 11111111];background
Type = S
movetype= A
physics = S
velset = 0,0
anim = 195 ;Animation for dodging
persistent = 1
ignorehitpause = 1
ctrl = 0
;
;This sets the variable for the effect. Sets var(53) to a value of 1.
[State 11111111, Change2BG]
Type = VarSet
triggerall = command = "DodgeBG"
triggerall = var(54) = 0
trigger1 = 1
;trigger1 = teammode = single || teammode = turns****
;trigger1 = enemy, teammode = single || enemy, teammode = turns****
var(53) = 1
;
[State 11111111, wait] ;Can't be thrown or hit right away after using
type = NotHitBy
trigger1 = 1
value = SCA
time = 5
;
[state 11111111, chg2standing]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;
;=======================================================
;FG/BG Changer code by Shinra358
;end of positive cns codes
;=======================================================
;=========================================================
;=========================================================
;=======================================================
;FG/BG Changer code by Shinra358
;=======================================================
;========================================================
;BG/FG change attributes
;========================================================
;to give your char proper projectile priority while using this code,
;you must go to the projectile (fireball, etc) statedef and
;add: projsprpriority = IfElse(var(53),-3,1) --future auto patcher should do this--
;sprite priority -1 is reserved for hyper backgrounds for the foreground chars
;sprite priority -2 is reserved for if people want to put props in their stages for this code for
;to be in between the forground and the background for more depth.
;OTHER ISSUE FIXES:
;add: sprpriority = IfElse(var(53),-3,1) only to all sctrls types of explod (personal explods [ex.:like flames from hands and/or dust from feet when u land]) in a char.
;This is the solution to quickly fixing the layering of personal explods. This is also the solution if character sprites need layer fixing (use on the action/move that needs it) -
;========================================================
[state -2, bglesserprior];char sprite lesser priority for background
type = sprpriority
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 0
triggerall = var(53) = 1
trigger1 = 1
time = -1
persistent = 1
ignorehitpause = 1
value = -4
;
[state -2, fgnormalprior];char sprite normal priority for foreground
type = sprpriority
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 1
triggerall = var(53) = 0
trigger1 = 1
time = -1
persistent = 1
ignorehitpause = 1
value = 0
;-------------------
[state -2, nothitbyvar]
type = varadd
trigger1 = 1
var(54) = 0
;
[state -2, nothitbyx]
type = nothitby
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
trigger1 = var(53) >= 0
trigger1 = var(53) != enemy, var(53)
persistent = 1
ignorehitpause = 1
value = SCA
;----------------------------------------------------------------
[state -2, fgp];foreground perspective
type = angledraw
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 1
triggerall = var(53) = 0
trigger1 = 1
time = -1
persistent = 1
ignorehitpause = 1
value = 0
scale = 1,1
;
[state -2, bgp];background perspective
type = angledraw
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 0
triggerall = var(53) = 1
trigger1 = 1
time = -1
persistent = 1
value = 0
scale = 0.93,0.93
;-----------------------------------------------------------------------
[state -2, possetbg]
type = offset
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 0
triggerall = var(53) = 1
trigger1 = 1
time = -1
persistent = 1
ignorehitpause = 1
y = -12
;
[state -2, plyrpshx]
type = playerpush
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 0
triggerall = var(53) = 1
triggerall = enemy, var(53) != 1
triggerall = enemy, var(53) = 0
trigger1 = 1
time = -1
persistent = 1
ignorehitpause = 1
time = -1
value = 0
;
[state -2, possetbgnoshadow]
type = assertspecial
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 0
triggerall = var(53) = 1
trigger1 = 1
time = -1
persistent = 1
ignorehitpause = 1
flag = noshadow
;
;-----------------------------------------------
[state -2, palfxBG];darkened color for "stepping into the background"
type = PalFx
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 0
triggerall = var(53) = 1
triggerall = time = 1
trigger1 = 1
time = -1
add = 0, 0, 0
mul = 150, 150, 150
sinadd = 10,10,10,255
invertall = 0
color = 256
persistent = 1
ignorehitpause = 1
;------------
[state -2, palfxFG];lightened color for "stepping into the foreground"(atmospheric lighting;))
type = PalFx
triggerall = RoundState = [0,4]
triggerall = var(54) = 0
triggerall = var(53) != 1
triggerall = var(53) = 0
triggerall = time = 1
trigger1 = 1
time = -1
add = 0, 0, 0
mul = 256, 256, 256
sinadd = 10,10,10,255
invertall = 0
color = 256
persistent = 1
ignorehitpause = 1
;
;=======================================================
;FG/BG Changer code by Shinra358
;end of negative cns codes
;=======================================================
;=========================================================
;=========================================================
;*****SPECIAL THANX:
;-God - for granting me forgiveness and life!**********
;-SlayerGatsu - for his insight, tutoring, testing, interest, and teaching me the proper ways of using vars*****
;-RedNavi & AlchemistMI - for using logic to inform me of possible bugs without even testing yet and being correct about it
****
;-Elecbyte - for this wonderful program of mugen that has taken much time of my life
*
-constructive FEEDBACK is highly APPRECIATED
(Old vids)0.50 version:
has been updated since then but cant upload new vid until i get my highspeed back.