YesNoOk
avatar

Creating clones that act like "full characters" (Read 7685 times)

Started by JustNoPoint, September 21, 2016, 05:02:19 am
Share this topic:
Re: Creating clones that act like "full characters"
#21  September 23, 2016, 04:50:33 am
  • ******
    • www.justnopoint.com/
I have him so he can't get thrown now.
I placed the following in his initial clone creations state. Currently after the animation plays he goes into state 0 and still cannot be thrown.

;Don't throw clones
[State -2, NoThrow]
type = NotHitBy
trigger1 = 1
value =  ,NT,ST,HT
time = -1
ignorehitpause = 1
persistent = 1

I had to place these 2 pieces of code into State 0 though

[State 0, PlayerPush]
type = PlayerPush
trigger1 = IsHelper(3501) || IsHelper(3502)
trigger1 = Anim = 0
value = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = IsHelper(3501) || IsHelper(3502)
trigger1 = BackEdgeBodyDist < 0
x = 6
y = 0

The 1st makes it so he can be pushed. The second makes it so he cannot go offscreen. I never could get the Edge parameter of the Width SCTRL to do this so I made this workaround and it only has slight jitter.

So it's looking like I'll have to add these blocks to the states the helper can go into. I tried them in -2 as well and they didn't work.

So progress is being made. I'll try some -1 routines still but for some states like the jump I'll probably have to override common states. I'll have to override them all to apply the 2 blocks above anyway.
Re: Creating clones that act like "full characters"
#22  September 23, 2016, 10:11:43 am
  • *****
  • Shame on you!
    • USA
The way your dont throw clones is set up, it looks like P1 wouldnt be able to be tossed at all. Is the State -2, NoThrow, just a copypasta?

Sometimes you can get rid of jitters by adding stuff running in -2 into -1 also. The double check seems to get rid of that one tic error.
Btw, when you put code into your -2, do you add
trigger1 = 1
every time?
I've noticed that even though the triggers all line up and it's in statedef -2 it doesn't get played each cycle. With the = 1 it does.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Creating clones that act like "full characters"
#23  September 23, 2016, 10:44:39 am
  • ******
    • www.justnopoint.com/
The don't throw code was copy pasted and modified from when I had it in the -2 so it still says -2. I forgot to edit that. The sctrl is in the helper's state and that's why it works just for the helper.

Quote
Sometimes you can get rid of jitters by adding stuff running in -2 into -1 also. The double check seems to get rid of that one tic error.

Am I missing something? What stuff do I put in -2 and -1 and what double check are you talking about? The other 2 blocks of code didn't work in -2 and are placed directly into the state0.

As for if I used trigger = 1 on all those when they were -2 yes I tried that on them all.
Re: Creating clones that act like "full characters"
#24  September 23, 2016, 12:33:05 pm
  • avatar
  • **
    • Malaysia
How about Abyss made by XSlaught. Might be able to help.
Re: Creating clones that act like "full characters"
#25  September 23, 2016, 06:47:56 pm
  • ******
    • www.justnopoint.com/
What would Abyss teach me?

I'm doing well on this now. Overriding common states but it's working. Almost got the jumping clone finished then I can move to the melee and defensive clone routines.

I'm going to mark this solved! Thank you all for the help!
Re: Creating clones that act like "full characters"
#26  September 23, 2016, 09:05:06 pm
  • *****
  • Shame on you!
    • USA
I thought states -1 and -2 fire off one after the other. Like CMD goes first then All of CNS. So you'd have one check in cmd then a second check in cns.
Some chunks of code work in -1. Like I'm 99.9% hitoverrides work in -1. But I'm not sure if EVERYTHING will work in -1.
I was suggesting trying your wall check in -1 and in -2. The fact that mugen would check it before the button press is activated AND after may stop some jitters.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Creating clones that act like "full characters"
#27  September 23, 2016, 10:06:38 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
States are executed in this order:
-3

-2

-1

normal states, ordered by cns files based on DEF (2 states with the same number, the one loaded first on the CNS is executed, the other will never be activated)

common.cns states
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Creating clones that act like "full characters"
#28  September 23, 2016, 10:45:55 pm
  • *****
  • Shame on you!
    • USA
Ah thanks for clearing that up. Kinda weird that it bounces in and out of the cns.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Creating clones that act like "full characters"
#29  September 26, 2016, 05:40:38 am
  • ******
    • www.justnopoint.com/
Could it be that my clone has keyctrl?
Yes this is exactly it. Further messing around and testing with JMM showed us that you MUST have keyctrl = 1 for a helper to access the .cmd

I was then able to add a ctrlset = 0 in -1 so you couldn't control the helper and now I can do all the neat -1 stuff I want and life is becoming MUCH simpler. Though now I have to go back and remove redundant coding in several states :P

I need to add details about this stuff in MUGEN Class including also the load order XG listed.

But not now. It's bed time!
Re: Creating clones that act like "full characters"
#30  September 27, 2016, 05:58:03 pm
  • ******
    • www.justnopoint.com/
Ugh, back to unsolved...

I just noticed now that keyctrl is on and a clone goes into any state that allows control they can be controlled again. Even though I have this in -1

[State 0, CtrlSet]
type = CtrlSet
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1

I really want to be able to keep using the -1 for player push and stuff but I have no idea how to stop the clones from allowing the player to control them.

Alternatively if there was a way for my helpers to access the -2 and -3 that'd be great.
@Vans: Didn't you say they could access this somehow?
Last Edit: September 27, 2016, 06:13:27 pm by Just No Point
Re: Creating clones that act like "full characters"
#31  September 27, 2016, 09:21:35 pm
  • *****
  • Shame on you!
    • USA
Stick it in -2 then also?
My Yun and Yang live off of -2. It has to work.

----
Is there a way to check for control? Like
trigger1 = numhelper(3501),ctrl
?  btw ^^^ this is probably ALL wrong, but idk. Otherwise -2 would be setting ctrl over and over and over and over
vVv Ryuko718 Updated 10/31/22 vVv
Re: Creating clones that act like "full characters"
#32  September 27, 2016, 09:36:20 pm
  • ******
    • www.justnopoint.com/
For some reason it never works in -2
Re: Creating clones that act like "full characters"
#33  September 28, 2016, 02:32:53 am
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
That's a lot of reading so I won't act like this solves anything, but if it helps my Natsu uses a Happy that works like another character, but I had it set up so you controlled it by command. If not that, my Naruto works as an AI, but is a clone in the same way except that when it gets hit it disappears. Just combine the 2 and it's almost what you mentioned I think?
Is this for a fullgame? If it is, the throws and custom states should be a cinch.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."
Re: Creating clones that act like "full characters"
#34  September 28, 2016, 07:04:40 am
  • ******
    • www.justnopoint.com/
Is and isn't a full game :p

It's for the HDBZ project so some stuff will be coded to work better against the characters in the game's cinematic super moves and such. Other than that I can't really be held accountable for custom state issues in universal Mugen.

On another note I may have a solution to my issue.  Thought about it while driving an hour on the road.

I should make helper versions of several common states like jump, stand, etc. The states the clones will use that have hardcoded directional inputs.

My only worry is hit and custom states would still put him in state 0 with ctrl

But I hope I can add a line of code to state o so that if you are the helper it does a changestate to the helper stand state at !Time

Maybe that could prevent the ctrl from kicking in.

For attacks I'd just make a condition trigger if he's a helper ctrl = 0 otherwise = 1

Think that may work?
Re: Creating clones that act like "full characters"
#35  September 28, 2016, 07:10:03 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You can override state 0, you may be doing it already and simply have

trigger1 = ishelper
value = helper states

in there. All it takes. If you have access to -1 through keyctrl you can have

trigger1 = ishelper && stateno = 0
value = helperstates

Seperate based on ID if needed.


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: Creating clones that act like "full characters"
#36  September 28, 2016, 01:13:25 pm
  • ******
    • www.justnopoint.com/
I started to do it that way but since I already had so much coded directly into state 0 I decided to leave it there and not move it to the -1.

The issue is that with keyctrl and going into state 0 the helper can have access to the directional inputs. I've tried finding everything I can that gives the player ctrl and remove it for the helpers and tried making sure all the command triggers didn't work for the helpers in common states too. No matter what I did he could still be controlled after certain events using direction commands.

That's why today I think I'll try making new common movement states and trigger a changestate in state 0 to go to the helper stand state 35000. I'm hoping this won't give the helper a chance to access direction inputs.

Apologies if you were giving me an alternative to this and I misunderstood.
Re: Creating clones that act like "full characters"
#37  September 28, 2016, 04:49:36 pm
  • ******
    • www.justnopoint.com/
Looks like my idea is working so far. I haven't been able to control the clone yet in any way and I can still use -1 as a make shift -2 substitute! :)
Re: Creating clones that act like "full characters"
#38  September 28, 2016, 11:13:54 pm
  • *****
  • Shame on you!
    • USA
I'm trying to figure out how you can't use -2 and I just can't do it.
The ooooonly thing I can think of is your helper number is long?? Like maybe too long?
Just throwing it out there. Could you try a simple test where you change it to ishelper(1) and ishelper(2) and all the rest of it?

Ohhh. My clones are created at the beginning of the round. Maybe that's why? You could set the variable to some odd number in 5900, and use statedef -2 to spawn them under the map.

I can't really think of how they're different.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Creating clones that act like "full characters"
#39  September 29, 2016, 03:45:37 am
  • ******
    • www.justnopoint.com/
Tried the helper(1) and still didn't work. I don't think it's a big deal at this point because the -1 is being a good -2 alternative. I do wish I knew what was wrong but maybe someone can point it out after the release. Hoping for X-mas so it's not too far away :)
Re: Creating clones that act like "full characters"
#40  September 29, 2016, 07:36:01 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
helpertype = player lets you into state -2 as a helper. However it ALSO forces p2 to face your helper if the helper is closer. It breaks the auto turn functionality. Horrible to be hacking away at something that might be invulnerable or force jumping backwards to get closer to p1 again. Total dick move.

If helpertype = player didn't have that particular function i wouldn't care if anyone used it, but because it does, it's crap.


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.