A place to have fun with Mugen
 
PortalHomeFAQMemberlistSearchRegisterComic WIP TrackerDownloadsLog inChat
Website Navigation Help
Translate the Website
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» Nightwing smartpalette
by ghost_rider Today at 3:37 am

» Albert Wesker From Resident evil Released
by riklaionel Today at 12:02 am

» Rider updated to beta-0.5.0 by rioriot on 2017-10-18
by crosspotts1.0 Yesterday at 9:06 pm

» Seeing Mugen being played in public
by yolomate Yesterday at 6:23 pm

» [FORUM GAME] Alphabet Soup!
by borewood2013 Yesterday at 6:00 pm

» Random Topic MMV2
by borewood2013 Yesterday at 5:40 pm

Special Features at MMV






Chat on MMV w/ Discord


Share | 
 

 How to make a helper change their parent ?

View previous topic View next topic Go down 
AuthorMessage
BlueSpiderX

avatar

Posts : 1061
Join date : 2013-05-30
Age : 16
Location : Look above you.

PostSubject: How to make a helper change their parent ?   September 21st 2017, 1:32 am

So what I did to the parent state is have the state detect a specific var change from the helper that it spawned.
The parent waits for var(5) to become 1 to trigger a ChangeState, and the helper sets var(5) to 1 when the helper hits the enemy (trigger = MoveHit).
But the parent state won't change even if var(5) is set to 1 by the helper.
I'll post the code if required.
Back to top Go down
View user profile
Mistah Jorge

avatar

Posts : 2009
Join date : 2013-07-04
Age : 19
Location : Portugal

PostSubject: Re: How to make a helper change their parent ?   September 21st 2017, 11:37 am

You can't change a helper's parent, parent's the thing that created the helper (or root, i know they work in a similair way but i don't know what's the difference, so you should look it up), as simple as that.

What you want to do when you want to get a helper's variable is something like this
trigger1 = numhelper('put the id of the helper you want to use here'), var(5) = 1 (you can simplify it by not writing the "= 1" part)

This code will get variable 5 from THE helper, what you were trying to do was to get variable 5 from the character itself (in other words: you)
Back to top Go down
View user profile
BlueSpiderX

avatar

Posts : 1061
Join date : 2013-05-30
Age : 16
Location : Look above you.

PostSubject: Re: How to make a helper change their parent ?   September 21st 2017, 4:57 pm

Oh so that's the problem.

I'll try it later after school. Thanks man ! Very Happy
Back to top Go down
View user profile
BlueSpiderX

avatar

Posts : 1061
Join date : 2013-05-30
Age : 16
Location : Look above you.

PostSubject: Re: How to make a helper change their parent ?   September 22nd 2017, 4:25 am

It works !

But actually I need to correct you on something.
It supposed to be helper(ID), not numhelper(ID) lol!

And somehow the helper's var won't change even after a VarSet, so I just use what the var are supposed to trigger as a trigger for the parent.

Thanks again ! Very Happy
Back to top Go down
View user profile
Mistah Jorge

avatar

Posts : 2009
Join date : 2013-07-04
Age : 19
Location : Portugal

PostSubject: Re: How to make a helper change their parent ?   September 22nd 2017, 6:19 am

Dammit, it's true, i use numhelper so much that i now call helper numhelper too

Anyhow, about changing a variable's value, i think you can only change it inside the state of the helper, but yeah, what you did should work perfectly too
Back to top Go down
View user profile
borewood2013

avatar

Posts : 5000
Join date : 2014-08-11

PostSubject: Re: How to make a helper change their parent ?   September 24th 2017, 8:54 am

It is a generally good MUGEN practice to make the 1st first TriggerAll or Trigger1 to be "NumHelper(###)", after this then safely can add the "Helper(###), blah blah blah" MUGEN Trigger Redirection...... geek
Back to top Go down
View user profile https://onedrive.live.com/?cid=7DB65F02B0BBD12E
 
How to make a helper change their parent ?
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
The Mugen Multiverse :: Mugen :: Mugen Help-
Jump to: