YesNoOk
avatar

Helper called but not called? (Read 1139 times)

Started by Hadoabuser, January 28, 2009, 08:20:58 am
Share this topic:
Helper called but not called?
#1  January 28, 2009, 08:20:58 am
  • ****
    • www.mugenevolution.co.uk/hadoabuser
Why is it that a helper is called even tho that state that calls it is not active?



Do I have set the helper trigger to root, StateNo = (the state that calls the helper) just to stop debug spam, or is there something else?

Although the command for the state that calls the helper is triggered the state only becomes active when u have ctrl, in this case u dont have ctrl.
Card Sagas Wars > what ever you like.
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D
Re: Helper called but not called?
#2  January 28, 2009, 09:25:23 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
you're using helper redirects without the trigger numhelper first.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Helper called but not called?
#3  January 29, 2009, 06:51:02 pm
  • ****
    • www.mugenevolution.co.uk/hadoabuser
Thats it I dont want to call any helpers when ctrl = 0 and when not in the state that originally calls it.

Is this happening because I used !Time as a trigger for the helper? Cause I think it might b  --;
Card Sagas Wars > what ever you like.
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D
Re: Helper called but not called?
#4  January 29, 2009, 06:55:47 pm
  • ******
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: Helper called but not called?
#5  January 29, 2009, 08:35:23 pm
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
Or just don't bother with debug spam. I can't get rid of some sources of it for example as there is not always a place to "go one line up and add a triggerall".

Example : in a hitdef, I have damage=IfElse(isHelper,root,var(39),var(39)) or P2Stateno=the same, or anything similar. Unless I double every single hitdef that has this (and unfortunately, each one will have it if it's some kind of a global parameter that affects all your attacks, like a damage bonus), I can't get rid of it. Now, getting rid of debug spam is not worth an additional 1000 lines of code,double chance to make mistakes and double the place to change any parameters of attacks in case I need to. And using Ifelse in itself doesn't stop it even though the false side of the expression doesn't need evaluation.

Re: Helper called but not called?
#6  January 29, 2009, 09:51:48 pm
  • ****
    • www.mugenevolution.co.uk/hadoabuser
I'm going to try triggerall = NumHelper(x) = 0, but I dont get what u mean by helper redirection.
Card Sagas Wars > what ever you like.
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D
Re: Helper called but not called?
#7  January 30, 2009, 01:27:37 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote
damage=IfElse(isHelper,root,var(39),var(39))
I hope that was just a crappy example. That wouldn't work at all.

It's best not to ignore debug. Mugen isn't the best when it comes to memory use and too much debug has the possibility of causing a crash. The cleaner your mugen, the less it will crash. This means removing debug.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Helper called but not called?
#8  January 30, 2009, 03:53:57 am
  • ****
    • www.mugenevolution.co.uk/hadoabuser
*Cough* What is helper redirection?
Card Sagas Wars > what ever you like.
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D
Re: Helper called but not called?
#9  January 30, 2009, 05:19:46 am
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
Any reason why this is not supposed to work? Because it works perfectly for me, and I see nothing wrong with it, except for the debug spam.

P2StateNo=IFElse(IsHelper,root,var(39),var(39))

It always puts the opponent into the state located in root's var(39) and that is what it's supposed to do.

A Helper redirection is when you use a trigger as though you were your helper instead. Example :
Helper(111),Pos X would return the value of the helper's position, not yours. If Helper(111) doesn't exists at the moment, you will get debug spam, unless you have a trigger line above with NumHelper(111)>0 because when the first trigger is false (there is no helper), the rest of the triggers will not be checked, so it doesn't cause spam. Root used in a helper redirects to the main character, parent redirects to the player that created the helper, enemy redirects to your opponent, etc...
Re: Helper called but not called?
#10  January 30, 2009, 07:51:40 am
  • ****
    • www.mugenevolution.co.uk/hadoabuser
O well the only trigger 4 the helper in question is !Time so i dont get how im doing that?
Card Sagas Wars > what ever you like.
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D
Re: Helper called but not called?
#11  January 30, 2009, 09:49:27 am
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
If it is used in the helper code as !time, that cannot do it.
If it is used as helper(xxx),!time in the main character (like, in the minus states or anywhere else) then it will spam whenever the helper isn't around.
Re: Helper called but not called?
#12  January 30, 2009, 11:38:07 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote
P2StateNo=IFElse(IsHelper,root,var(39),var(39))
I may have read that slightly wrong. I was reading it as
ishelper,root,
var(39),
var(39)

and ishelper can't redirect to root. You know you can double trigger in ifelse right?
ifelse(root, numhelper && ishelper, root, var(39), var(39))

Course personally i'd just create another hitdef. It's just a copy paste with some extra triggers.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Helper called but not called?
#13  January 30, 2009, 12:26:29 pm
  • **
ifelse(root, numhelper && ishelper, root, var(39), var(39))
Thats redundant because your root will definitly have a helper if you are a helper and it would cause a warning even if the true/false statements arent evaluated before the if check.
Seravy's ifelse is the simplest way to get the proper var, but if you want to set a p2state after you hit somebody you could just leave that parameter and make two Targetstate controllers (and a changestate if you use p1stateno too). You could also set var(39) of the helper to the root's value right before the hitdef.

BTT: You get the warning in state 205 on your screenshot. Do you only get this warning there, or do you even get the warning in state 0? Check if you get the warning right after the start of the Round without doing anything (I guess the problem is a wrong trigger in one of the negative states).
Latest Creation: SSBB Assist Trophies
Re: Helper called but not called?
#14  January 30, 2009, 12:29:35 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote
Thats redundant because your root will definitly have a helper if you are a helper and it would cause a warning even if the true/false statements arent evaluated before the if check.
Seravy's ifelse is the simplest way to get the proper var, but if you want to set a p2state after you hit somebody you could just leave that parameter and make two Targetstate controllers. You could also set var(39) of the helper to the roots value right before the hitdef.
I know that, i'm just saying that you can double trigger the things really.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Helper called but not called?
#15  January 30, 2009, 04:05:58 pm
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
Yeah I could double trigger it easily...if it weren't a condition used in over 100 hitdefs...it's a pretty big character project.
Obviously copying this one line (P2State=Ifelse(...)) into all hitdefs in the character will only take 10-15 minutes at most, but doubling every hitdef after that will take hours or more like, half a day. Also there are some hitdefs that are already doubled for another reason (Like an attack that is unblockable on some condition), doubling them again would result in 4 of them for only one attack. If I would happen to need to add another similar condition, it could go up to 8, then 16 etc...I rather not start going that way. Yeah and you'll also need to test every single attack to see if it's bug-free.
Another reason for not doing that is the probability of forgetting about it, and later, when you want to change something (like reduce the damage because testing shows its too much), you only change one, and wonder why is it doing two different amounts of damage.

Anyway, if you only have one (or only a few) such spam sources, by all means, double the triggers, removing the spam is worth that much...if you have above 20-50, well, not really.

And leaving the hitdefs aside, the fact that all projectiles are owned by root also forced me to use IfElse(Ishelper,root,ProjContactTime!=-1,ProjContactTime!=-1), in plenty of places. And probably some more similar stuff, but these are the ones I remember for now.

Quote
Seravy's ifelse is the simplest way to get the proper var, but if you want to set a p2state after you hit somebody you could just leave that parameter and make two Targetstate controllers. You could also set var(39) of the helper to the roots value right before the hitdef.

Will targetstate put him into my state or his? I want him in mine, and the documents say nothing about whose state it will be. Not that I would do that either, it's still making the code longer and complicated. I's bad enough that I had to use P2StateNo on all my attacks in the characters thanks to a missing feature, then replacing all hitdefs with equivalent projectiles thanks to the hitoverride on p2stateno bug, then adding a random ID number generation state to all helper type projectiles to make them unique, because the root owns them so I can't distinguish between the ones created by the two helpers of the same type otherwise, and then I would need to add even more sctrls to remove debug spam? No, thank you, I can live with the spam, I still only halfway through my cns files with this fix.
Re: Helper called but not called?
#16  January 30, 2009, 05:16:45 pm
  • **
Sorry for more OT, but I have another suggestion for Seravy's problem that just came into my mind. Like I said before you can set the helper var to the root's var value.

If you for example have this simple trigger for your hitdef:
[mcode]trigger1 = AnimElem = 2[/mcode]
You could add some triggers to make it look like this:
[mcode]trigger1 = ishelper
trigger1 = (var(39):=root,var(39))*0
trigger2 = AnimElem = 2[/mcode]

This is just a small hint, it probably isnt worth the effort to change all your hitdefs this way to prevent debug spam.

Another more reasonable thing: Have you ever thought about letting your Clone helper spawn another helper that stays in a state that aligns all needed helpers variables to the root variables. Like this:
[mcode]type = ParentVarSet
trigger1 = 1
var(39) = root,var(39)[/mcode]
You wouldnt need any more ifelses then.
Latest Creation: SSBB Assist Trophies
Re: Helper called but not called?
#17  January 30, 2009, 07:48:43 pm
  • ******
O well the only trigger 4 the helper in question is !Time so i dont get how im doing that?
No it's not. Do you see "HELPER, [whatever]" in "!time" like everyone is telling you to check ? No, so it's not what we're talking about.
Post your damn code already.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: Helper called but not called?
#18  January 30, 2009, 08:39:10 pm
  • ****
    • www.mugenevolution.co.uk/hadoabuser
I think I was asking the wrong questions, or not know specifically what I should've to asked.

Lol I solved it with some help. I changed trigger2 from trigger2 = StateNo = 240 && helper(8060), MoveContact to trigger2 = NumHelper(8060) && P2MoveType = H.

The reason for this is the player does not hit the enemy themselves instead a helper is summoned to do it, but i wanted to be able to combo from that state.


Card Sagas Wars > what ever you like.
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D
Re: Helper called but not called?
#19  January 30, 2009, 09:24:30 pm
  • **
 --; Thats what we were talking about, you have to check with numhelper(8060) BEFORE you use a helper(8060),... redirection.

Your change may have solved your problem with the debug spam, but if I understand what you want, your move wont work correctly if you change it like that, because your opponent can also get in a hitstate without your helper causing it (in Team Mode for example).

You should change your original trigger to this:
[mcode]trigger2 = numhelper(8060)
trigger2 = StateNo = 240 && helper(8060), MoveContact[/mcode]
Latest Creation: SSBB Assist Trophies
Re: Helper called but not called?
#20  January 30, 2009, 10:30:37 pm
  • ****
    • www.mugenevolution.co.uk/hadoabuser
It all makes sense now that I know what u guys meant by helper redirection. Good point on team mode, I dont think about team mode when coding, not on purpose anyway.
Card Sagas Wars > what ever you like.
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D