I just did a couple of tests, and after causing an error and closing the program, it now fails successfully in game (the code was only implemented in Akuma).VIDEO
I better leave the complete code as it is.Spoiler, click to toggle visibilty
Ikemen original code (full) [StateDef 5600; type: S; moveType: H; physics: N; anim: const(AnimTagEnteringScreen); sprPriority: 2; ctrl: 0; ] screenBound{value: 0; moveCamera: 1, 1} assertSpecial{flag: noTurnTarget}if time = 0 { if facing != playerId(getPlayerId(teamLeader)),facing { turn{} } # set starting pos (redirected to gather consistent local coordinate space values ready for const240p conversion) teamMapSet{ map: "_iksys_tagPosX"; value: pos x * localScale - (backEdgeBodyDist * localScale + 90) * facing; redirectId: playerId(getPlayerId(teamLeader)),id} posSet{x: const240p(map(_iksys_tagPosX)); y: 0} # store distance to switch initiation position mapSet{map: "_iksys_tagSwitchDist"; value: abs(pos x - playerId(getPlayerId(teamLeader)),pos x)} # set movement velSet{x: min(const240p(const(TagInVelX)), map(_iksys_tagSwitchDist) / const(TagInTime)); y: 0} # change active player assignment mapSet{map: "_iksys_tagLastId"; value: playerId(getPlayerId(teamLeader)),id} tagIn{leader: playerNo} call fTagSwitchExplod(); } else { mapAdd{map: "_iksys_tagSwitchDist"; value: -vel x} } # continue until reaching place where the switch was initiated, but stop in front of enemy if backEdgeBodyDist >= 0 && (floor(map(_iksys_tagSwitchDist)) <= 0 || p2BodyDist X < const240p(30)) { velSet{x: 0; y: 0} changeState{value: const(StateStand); ctrl: 1} }
Spoiler, click to toggle visibilty
My CNS conversion [StateDef 5600] type = S moveType = H physics = N anim = 1610;(custom entrance anim) sprPriority = 2 ctrl = 0 [State 5600, 1] type = ScreenBound trigger1 = 1 value = 0 movecamera = 1,1 [State 100, 2] type = AssertSpecial trigger1 = 1 flag = noTurnTarget[State 5600, 1] type = TeamMapSet trigger1 = time = 0 trigger1 = facing != playerId(getPlayerId(teamLeader)), facing map = "_iksys_tagPosX" value = pos x * localScale - (backEdgeBodyDist * localScale + 90) * facing redirectId = playerId(getPlayerId(teamLeader)),id [State 5600, 1] type = PosSet trigger1 = time = 0 trigger1 = facing != playerId(getPlayerId(teamLeader)), facing X = const240p(map(_iksys_tagPosX)) Y = 0 [State 5600, 1] type = MapSet trigger1 = time = 0 trigger1 = facing != playerId(getPlayerId(teamLeader)), facing map = "_iksys_tagSwitchDist" value = abs(pos x - playerId(getPlayerId(teamLeader)),pos x) [State 5600, 1] type = VelSet trigger1 = time = 0 trigger1 = facing != playerId(getPlayerId(teamLeader)), facing X = min(const240p(const(TagInVelX)), map(_iksys_tagSwitchDist) / const(TagInTime)) Y = 0 [State 5600, 1] type = MapSet trigger1 = time = 0 trigger1 = facing != playerId(getPlayerId(teamLeader)), facing map = "_iksys_tagLastId" value = playerId(getPlayerId(teamLeader)),id [State 5600, 1] type = MapAdd trigger1 = Time = 0 map = "_iksys_tagSwitchDist" value = -vel x [State 5600, 1] type = VelSet trigger1 = backEdgeBodyDist >= 0 && (floor(map(_iksys_tagSwitchDist)) <= 0 || p2BodyDist X < const240p(30)) X = 0 Y = 0 [State 5600, 1] type = ChangeState trigger1 = backEdgeBodyDist >= 0 && (floor(map(_iksys_tagSwitchDist)) <= 0 || p2BodyDist X < const240p(30)) value = 0 ctrl = 1