YesNoOk
avatar

Helper's ID isnt the helper's ID.... (Read 2318 times)

Started by Odb718, March 28, 2017, 11:21:52 PM
Share this topic:
Helper's ID isnt the helper's ID....
#1  March 28, 2017, 11:21:52 PM
  • *****
  • Shame on you!
    • USA
So when I make my helper(s) I set the ID.
Then I'm trying to use that ID to adjust an X value.
(ID-3125)
Because when I make that particular state, the helper's ID is supposed to be either 3100 or 3165. Giving me -25, or 40 as the answer.
Display to clipboard is showing the value as -3008. so idk where the ID of 117 comes from but it's not me.

Can I find the helper's ID out inside that helper? Can I spawn 10+ helpers all with the same ID??
vVv Mauru Mauru Released vVv
Re: Helper's ID isnt the helper's ID....
#2  March 29, 2017, 02:28:46 AM
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
I think you're going to have to post some of that code to see what's goin on

You can't really use the helper's ID as part of an equation.  NumHelper(id) trigger is only going to return 1 or 0.  You can just detect if it exists and if so, do blah.

Re: Helper's ID isnt the helper's ID....
#3  March 29, 2017, 06:47:46 AM
  • *****
  • Shame on you!
    • USA
It's definately not just a 1 or 0 result. The ID number is always counting up by the number of helpers spawned. I guess you mean the result will be either off or on sorta thing. But

Spoiler: Here's the spawning call (click to see content)

Spoiler: Here's the stuff that doesn't work (click to see content)

Like I said, when I displaytoclipboard I can see the value of the ID, which usually starts around 117. I can see the velocity. and I can see Var(10). Everything WOULD work right except ID doesn't.
vVv Mauru Mauru Released vVv
Re: Helper's ID isnt the helper's ID....
#4  March 29, 2017, 06:54:03 AM
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Nope, ID = PlayerID. This will change based on when the helper is spawned and is flexible as so

I spawn 2 helpers, they get ID's 1 and 2.

Helper 1 dies
P2 spawns a helper, it takes ID 1
P1 spawns a helper, it gets ID 3.

Simplistic as hell but player ID is what you're relying on here and it won't work for what you want to do.

Still, the helpers know who they are via the Ishelper trigger. You know who they are via your brain because you spawned them and their ID is not malleable once spawned. So you can just do

type = null
trigger1 = ishelper(2) && var(0) := 2
trigger2 = ishelper(6) && var(0) := 6

And just assign the ID to a variable that way. By using the := operator you don't need a ton of varsets and can do it all in one sections. Helpers have their own variable array, even if they use the same states and ID's and everything, it's still a seperate instance so you can use 1 var for the lot.


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's ID isnt the helper's ID....
#5  March 29, 2017, 07:15:54 AM
  • *****
  • Shame on you!
    • USA
So could I just use..
value = ifelse(ishelper(3100),-25,40)
?
and I think you meant,
Nope, ID != PlayerID. This will change based on when the helper is spawned and is flexible as so

----
and I wouldn't have thought to use the ishelper at all inside THE helper. Thanks.

---- ----
Spoiler: This Works (click to see content)
vVv Mauru Mauru Released vVv
Last Edit: March 29, 2017, 07:43:48 AM by Odb718
Re: Helper's ID isnt the helper's ID....
#6  March 29, 2017, 07:54:51 AM
  • ******
    • www.justnopoint.com/
After looking at so much Piccolo code with me how did you forget that? :P
Re: Helper's ID isnt the helper's ID....
#7  March 29, 2017, 07:42:10 PM
  • *****
  • Shame on you!
    • USA
I was just telling Altoid that I'm seriously off my game. I feel like I have a million stupid questions that I should be able to solve instantly.
Idk what's up, but I did have a migraine for 8 days solid recently.

----
Noob Saibot is coming out better and better though. I've got 2 Ultras working 90%. Right now I'm slowing down the specials' speeds for compatibility.  I can't get the Run->Tackle clone to hit P2's Run->Tackle clone. They just run through each other. I also want his UpKick clone to be anit-air against downward fireballs. For some reason it's just not working. It has to be something small, yet again.
That's what she said
vVv Mauru Mauru Released vVv
Last Edit: March 29, 2017, 07:47:49 PM by Odb718
Re: Helper's ID isnt the helper's ID....
#8  March 29, 2017, 07:53:15 PM
  • ******
    • www.justnopoint.com/
For the tackle clones to run into each other you may want to save their pos to a var so they can know how far away they are from each other. Then code their reactions based on that.

What's going on with up kick clone? You didn't give a lot of info