I want to make a system universal using Mugen's common1.cns. I've summoned a helper in the characters .cns file and coded the state in mugen's common file using an explod inside the helper state. However when I want to destroy the helper/explod using say trigger = var(6)=1 it doesn't recognize it. So how do I get mugen's common file to recognize triggers based on my character?EDIT:Guessing I need sysvar or something?
You can use character vars in common1 just fine. How are you trying to use them? Post some sample code so we can see.
Code: ;TEST CODE FOR STEP SYSTEM GRAPHIC[State 0, VarAdd]type = VarAddtrigger1 = stateno = 1500 && time = 1 ;Dash Cancelv = 6value = 1[State 0, VarSet]type = VarSettrigger1 = var(6)>= 3 ;Limitv = 6 value = 3;========================================================;Display Helper When you have 1 lvl of power and the variable hasn't incremented yet.;========================================================[State 0, Helper]type = Helpertrigger1 = numhelper(9997)=0trigger1 = power>= 1000 && var(6)=0name = "step meter"ID = 9997stateno = 9997pos = 0,0postype = leftfacing = 1ownpal = 1supermovetime = 999pausemovetime = 999;==========================common1.cns from Mugen's Data Folder;==========================;STEP SYSTEM[statedef 9997]velset = 0,0ctrl = 0sprpriority = 2anim = 7999 ;blank anim[State 0, Explod]type = Explodtrigger1 = numexplod(9000) = 0anim = F9000ID = 9000pos = 54,23postype = leftfacing = 1vfacing = 1bindtime = 1removetime = -2pausemovetime = 999supermovetime = 999scale = 0.5,0.5sprpriority = 5ontop = 1ownpal = 1[State 0, RemoveExplod]type = RemoveExplodtrigger1 = var(6)=1 ;remove when the variable 6 from the players file has incremented.id = 9000
The problem with your code is with your trigger for your Explod. As soon as it gets removed, the numexplod(9000)=0 trigger will make it respawn. This would be so quick it looked like nothing happened.
Changing the trigger to !time still doesn't make it disappear even when my characters var(6)=1(Note: the common1.cns isn't in my character folder it's in the data folder in Mugen incase that helps)
Алексей said, November 17, 2014, 08:32:57 pmThe problem with your code is with your trigger for your Explod. As soon as it gets removed, the numexplod(9000)=0 trigger will make it respawn. This would be so quick it looked like nothing happened. BC Try adding [State 0, Explod]type = Explodtriggerall = animelem = 1trigger1 = numexplod(9000) = 0To get around the bug Алексей mentioned.Also, one thing I'd suggest. Take the code out of common and put it into your characters. Once it works properly move it to common. This way you know it's the code or the file structure
I moved it character side and the problem is [State 0, RemoveExplod]type = RemoveExplodtrigger1 = root,var(6)>0id = 9000The RemoveExplod is the issue, because if I use a destroyself with the same trigger it destroys the helper fine. So is this a bug?EDIT:[State 0, Explod]type = Explodtrigger1 = root,var(6)=1anim = 10002ID = 5pos = 54,23postype = leftscale = 0.5,0.5removetime = -1sprpriority = 5ownpal = 1[State 0, RemoveExplod]type = RemoveExplodtrigger1 = root,var(6)=2id = 5this works so it seems it's my variable that's the issue. But I want the explod to appear when the variable is 0 but it won't remove if I do that!??
BC said, November 18, 2014, 10:48:42 am this works so it seems it's my variable that's the issue. But I want the explod to appear when the variable is 0 but it won't remove if I do that!??It will remove it. But your code is instantly spawning it again. So YOU will never see it disappear but it did. for 1 tic, possibly 0 tics...Also, not sure but [State 0, RemoveExplod]type = RemoveExplodtrigger1 = root,var(6)>0id = 9000ID = 9000 there and [State 0, RemoveExplod]type = RemoveExplodtrigger1 = root,var(6)=2id = 5 ID = 5 there.Again, [State 0, Explod]type = Explodtrigger1 = numexplod(9000) = 0anim = F9000ID = 9000pos = 54,23postype = leftfacing = 1vfacing = 1bindtime = 1removetime = -2pausemovetime = 999supermovetime = 999scale = 0.5,0.5sprpriority = 5ontop = 1ownpal = 1What ever contains this ^^^ will instantly spawn helper 9000. Put [State 0, Explod]type = Explodtrigger1 = var(6)= 0trigger1 = numexplod(9000) = 0You only want it to show up if Var 6 is zero right? and you want it gone if var 6 is equal to 1 or more. So put that.
Either way it's still not working, I've corrected my code and no luck.Code: [State 0, VarAdd]type = VarAddtrigger1 = stateno = 1500 && time = 1v = 6value = 1[State 0, VarSet]type = VarSettrigger1 = var(6)>= 3v = 6 value = 3[State 0, Helper]type = Helpertrigger1 = numhelper(9997)=0name = "step meter"ID = 9997stateno = 9997pos = 0,0postype = leftfacing = 1ownpal = 1supermovetime = 999pausemovetime = 999ignorehitpause = 1persistent = 0Helper State: (triggers provided do not make a difference)[statedef 9997]type = Aanim = 7999;If the explods trigger is root,var(6)=1 it appears when the variable is equal to 1 and disappears when the variable is equal to 2(if set in the removeexplod);But I want it to disappear when it's equal to 1. But for some reason it's not doing that.[State 0, Explod]type = Explodtrigger1 = root,var(6)=0trigger1 = numexplod(5)=0anim = 10002ID = 5pos = 54,23postype = leftscale = 0.5,0.5removetime = -1sprpriority = 5ownpal = 1persistent = 0[State 0, RemoveExplod]type = RemoveExplodtrigger1 = root,var(6)=1id = 5
If I understand correctly, you want the explod to show when root,var(6)=0, and disappear when root,var(6)=1 or more, right?If so, try this:Code: [State 0, Explod]type = Explodtrigger1 = root!,var(6)trigger1 = numexplod(5)=0anim = 10002ID = 5pos = 54,23postype = leftscale = 0.5,0.5removetime = -1sprpriority = 5ownpal = 1persistent = 0 [State 0, RemoveExplod]type = RemoveExplodtrigger1 = root,var(6)id = 5What's the trigger that resets var(6) to 0?
Nothing's resetting the variable just yet, I'm just trying to get the graphic to work properly first. Even adding a reset sctrl doesn't make much difference, I tried that code but still nothing, this should be simple but I'm convinced it's a bug lol.I might need a work around? I'll wait for other responses. Thanks for helping so far though guys.
I'm sure it's something minor that's being overlooked. I had a similar situation with explods for my full game. Best solution may be to just re-code it altogether. What worked for me is I switched summoning the explod from a helper to the chars themselves in a negative state(negative states are shared through all chars in common1). Good luck with everything.
Ok It works coding it as an explod in state -2 which is cool! but a shame because I wanted to code it using my method but at least it's working now. thanks man. Posted: November 23, 2014, 01:56:38 amOk I found the problem!For those who are interested, this was stupidly overlooked by me.The explod was removing but only for player 1 because I forgot to position player 2's graphic, so they were sharing the exact same position so when player 1's disappears player 2's is still there LOLI found it out by accident by doing the move using player 2 after I did it with player 1 then it finally disappeared. D'OH!