So I've been working on a stand mechanic for one of the characters in my mugen project, and I'm at a bit of a brick wall at the moment. Basically, I've gotten my Stand into the scene by pressing a button ("a" in my case), I just have no idea how to get them out of the scene when I press the same button. The Stand is a Helper and so far I've tried:.Sending the Stand into a second custom state in which it would destroy itself.Having the Stand destroy itself when the button that created it is pressed again.Having the Stand be destroyed when a Variable is set at a certain value.Having the Stand be destroyed when both a button press and the same variable is set to a certain valueI've also tried looking at various HFTF characters without much luck. Most of the code is uncommented, and any comments that are there are in Japanese. There was a Part 4 Jotaro that did help put me in the right direction, but now I seem to be stuck here. I've looked around on various sites and there doesn't seem to be any documentation or tutorials on the subject.To help give you a better idea of where I left off, here's the code:CNS:;Star Platinum Summon[Statedef 700]type = S ;State-type: S-stand, C-crouch, A-air, L-liedownmovetype= I ;Move-type: A-attack, I-idle, H-gethitphysics = Sctrl = 0 ;Set ctrl (Def: no change)anim = 1poweradd = 0[State 700, Helper]type = Helpertrigger1 = Var(10) != 1helpertype = normal ;playername = "Star Platinum"ID = 701stateno = 701pos = 25,0postype = p1 ;p2,front,back,left,rightfacing = 1keyctrl = 0ownpal = 0supermovetime = 0pausemovetime = 0 [State 700, ChangeState]type = ChangeStatetrigger1 = time = 0value = 0ctrl = 1;anim =;ignorehitpause = ;persistent = (This sets the Variable I mentioned earlier)[State 0, VarSet]type = VarSettrigger1 = time = 0v = 10 ;fv = 10value = 1;ignorehitpause = ;persistent = ;Star Platinum Return[Statedef 703]type = S ;State-type: S-stand, C-crouch, A-air, L-liedownmovetype= I ;Move-type: A-attack, I-idle, H-gethitphysics = Sctrl = 0 ;Set ctrl (Def: no change)anim = 0poweradd = 0[State 230, 3]type = ChangeStatetrigger1 = Time = 0value = 0ctrl = 1[State 0, VarSet]type = VarSettrigger1 = Time = 0v = 10 ;fv = 10value = 0;ignorehitpause = ;persistent = Both of these states are for the user. The next states are for the Stand itself:;STAR PLATINUM;Stand Idle[Statedef 701]type = Amovetype= Iphysics = N;velset = 0,0sprpriority = 0ctrl = 0anim = 1[State 191, 2] type = velsettrigger1 = 1x = parent,vel xy = parent,vel y[State 230, 2]type = statetypesettrigger1 = parent,statetype = Sstatetype = Signorehitpause = 1[State 230, 2]type = statetypesettrigger1 = parent,statetype = Cstatetype = Cignorehitpause = 1[State 230, 2]type = statetypesettrigger1 = parent,statetype = Astatetype = Aignorehitpause = 1[State 191, 2] type = parentvarsettrigger1 = 1v = 10value = 1[State 191, 2] type = AssertSpecialtrigger1 = 1flag = noshadow[State 191, 2] type = turntrigger1 = facing != parent,facing[State 1065, 3]type = bindtoparenttrigger1 = 1pos = 25,0time = 1[State 0, ChangeState]type = ChangeStatetrigger1 = command = "a"value = 0 (I set this to 0 because I read that in a different forum that setting the Helpers state to zero would destroy it using code set in State 0)ctrl = 0;anim =;ignorehitpause = ;persistent = [State 0, ParentVarSet]type = ParentVarSettrigger1 = command = "a"v = 10 ;fv = 10value = 0[State 701, 2] type = destroyselftrigger1 = command = "a";Desummon[Statedef 702]type = Amovetype= Iphysics = Nvelset = 0,0sprpriority = 3;anim = 9999[State 702, 2] type = destroyselftriggerall = time = 0trigger1 = 1So I am a bit lost as to what to do here. I didn't want to ask for help and it feels like it should be really simple but I'm honestly lost right now. Would really appreciate any help.Oh and I mention code in state 0 used to destroy the helper (Which also didn't work). Here's that:[State 0, DestroySelf]type = DestroySelftrigger1 = time = 1 && ishelpertrigger2 = animelem = 1 && ishelperignorehitpause = 1 Edit: I forgot the code I used in the CMD file;StandSummon[State -1, Stand Summon]type = ChangeStatevalue = 700triggerall = NumHelper(701)= 0triggerall = Var(10) = 0triggerall = command = "a"trigger1 = statetype = Strigger1 = ctrltrigger2 = stateno = [100,105];StandReturn[State -1, Stand Return]type = ChangeStatevalue = 703triggerall = NumHelper = 701triggerall = Var(10) = 1triggerall = command = "a"trigger1 = statetype = Strigger1 = ctrl
The helpers don't see the commands that you input:[State 701, 2]type = destroyselftrigger1 = command = "a"This means the helper presses the command "a", which is not true, because it's the actual player who does itYou need instead to redirect to the main player like this:[State 701, 2]type = destroyselftrigger1 = root,command = "a"