UPLOAD, SHARE, PRESERVE MUGEN FOR ETERNITY!
a missing category? request it here.

Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2019
    Location
    Posts
    4
    Uploads
    0
    Comments
    0

    Default Changing the Size of Fighters DURING Battle?

    Hey, everyone. I've been wondering about whether or not there are ways to increase or decrease the size of a fighter in the middle of a match.

    I found that you could change the *visual* size of the fighter using angledraw in Statedef -2, specifically like so:

    [State -2, SizeChange]
    type = angledraw
    trigger1 = 1=1
    scale = 1+fvar(X),1+fvar(Y)

    and then just having moves mess around with the fvars where needed to produce the desired effect. Problem is, all that does is change the size of the character, without actually adjusting any other parameters like hitbox and hurtbox sizes, and the size of projectiles (if available).

    I assume there are other types of functions aside from angledraw to help out with this, but I don't know what they are. Any help would be greatly appreciated. Thanks!

  2. #2
    Join Date
    Dec 2016
    Location
    Posts
    31
    Uploads
    0
    Comments
    0

    Default Re: Changing the Size of Fighters DURING Battle?

    From what I've seen, there isn't really a function for that. You could use a separate animation with different scaling and hitboxes.
    I was thinking that you might be able to change the XScale and YScale variables, but I read that doesn't work, since you can't change constants in-game.

    Depending on what you're trying to do, you might be able to spawn a helper with different Size values, which function the same as the XScale and YScale constants.
    You could make the main body invisible with Assertspecial, or use a blank animation if you don't want the hitboxes to apply, and then spawn a helper in a new state or an inherited one, kind of like Seravy's SuperArmor helper.

  3. #3
    Join Date
    Aug 2019
    Location
    Posts
    4
    Uploads
    0
    Comments
    0

    Default Re: Changing the Size of Fighters DURING Battle?

    Just to double confirm, I had tried using xscale and yscale functions in my designs as well, but to no effect since they donít seem to want to change during battle.

    As far as the use of this, I havenít fully decided on that. I guess an easy example to think of would be giving a mushroom to Mario to increase his size (and perhaps attack power and max HP) without having to whip together an entirely new slew of animations for this new form.

    Iím not super familiar with helper functions; the most Iíve really done is to add super armor to a single move, so Iíll have to brush up in that department. That aside, if Iím reading you correctly, what I should do is use a function to render the character invisible, and then create a helper to take its place 1:1 at all times, as if nothing changed, but now that helper can freely have its size adjusted with x/yscales. Does that sound about right?

    Thanks for the help so far~

  4. #4
    Join Date
    Dec 2016
    Location
    Posts
    31
    Uploads
    0
    Comments
    0

    Default Re: Changing the Size of Fighters DURING Battle?

    Yup, that is exactly what I'm implying.

    If you're going for all the same moves and animations, you'll probably just want to duplicate his current state... probably start with something a bit like this, pulled and edited from Seravy's Superarmor.
    [StateDef 11777]
    Type = U
    MoveType = H
    Physics = N
    ctrl = 0

    [State 11777]
    type = StateTypeSet ; You want to mimic the statetype of the player, to let the correct types of attacks hit only
    Trigger1 = root,statetype=A
    Statetype = A

    [State 11777]
    type = StateTypeSet
    Trigger1 = root,statetype=C
    Statetype = C

    [State 11777]
    type =StateTypeSet
    Trigger1 = root,statetype=S
    Statetype = S

    [State 11777]
    type =StateTypeSet
    Trigger1 = root,statetype=L
    Statetype = L

    [State 11777]
    type =ChangeAnim ; Helper copies the animation of the player.
    Trigger1 = anim!=Root,anim
    value = Root,anim
    ignorehitpause = 1

    [State 11777]
    type =Assertspecial ; But is invisible
    Trigger1 = 1
    flag = invisible
    flag2 = noshadow
    ignorehitpause = 1

    [State 11777, HitOverride]
    Type = HitOverride
    Trigger1 = 1
    Attr = SCA, AA, AP , AT
    StateNo = 11777
    Time = 1
    ignorehitpause = 1

    [State 11777, BindToRoot]
    Type = BindToRoot
    Trigger1 = 1
    Time = 1
    Facing = 1
    Pos = 0, 0
    ignorehitpause = 1

    [State 11777, ParentVarAdd]
    Type = ParentVarAdd
    Trigger1 = Time = 0
    fV = 29
    Value = GetHitVar(damage)
    ignorehitpause = 1

    [State 11777, ParentVarFall]
    Type = ParentVarSet
    Trigger1 = Time = 0
    v = 29
    Value = GetHitVar(fall)
    ignorehitpause = 1

    [State 11777, ParentVarxVel]
    Type = ParentVarSet
    trigger1 = GetHitVar(xvel) != 0
    fV = 27
    Value = GetHitVar(xvel)
    ignorehitpause = 1

    [State 11777, ParentVaryVel]
    Type = ParentVarSet
    trigger1 = GetHitVar(yvel) != 0
    fV = 28
    Value = GetHitVar(yvel)
    ignorehitpause = 1

    and then in the -2 states:
    [State -2, Resize]
    Type = Helper
    Triggerall = NumHelper(11777) = 0
    Trigger1 = 1 ; Resize condition here.
    PosType = P1
    Pos = 0, 0
    ID = 11777
    StateNo = 11777
    size.xscale = 1
    size.yscale = 1
    PauseMoveTime = 999999
    SuperMoveTime = 999999
    Name = "Resize"

    [State -2, LifeAdd]
    Type = LifeAdd
    Trigger1 = NumHelper(11777) > 0 ; If the resize helper exists, subtract taken damage from life.
    Trigger1 = fVar(29) >=1
    Value = -floor(fVar(29))
    ignorehitpause=1

    [State -2, VarSet]
    Type = HitFallSet
    Trigger1 = var(29) = 1
    value = var(29)
    xvel = fvar(27)
    yvar = fvar(28)

    [State -2, Resize Active]
    Type= NotHitBy
    Trigger1= NumHelper(11777)>0 ; If the resize helper is active, the character cannot be hit by anything.
    value=SAC
    value2=SAC ; This is for safety, as another Nothitby might override the first one, so better be safe and apply it to both slots.

    (Everything called "Superarmor" has been renamed to "Resize")

    and... I can't post the second half of this because it combines adjacent posts together and that puts it over the character limit.
    Could someone post something, anything, so I can finish the second half of this?
    Last edited by uGuardian; 23rd January 2020 at 01:29. Reason: Fleshed out inherited knockback concept, and split post

  5. #5
    Join Date
    Aug 2019
    Location
    Posts
    4
    Uploads
    0
    Comments
    0

    Default Re: Changing the Size of Fighters DURING Battle?

    Here's your anything post~

    Thanks for being so forthcoming with this information. I never would have thought to start like this lmfao

  6. #6
    Join Date
    Dec 2016
    Location
    Posts
    31
    Uploads
    0
    Comments
    0

    Default Re: Changing the Size of Fighters DURING Battle?

    I'd probably have the helper use separate hitdefs, so you can make it have different values and such.

    While I'm sure that this will do damage properly, but I'm not certain if the hitfall will work right.
    (It probably won't, I don't think the sethitfall command works the way I'd like it to)
    Also it almost certainly will make you arbitrarily immune to grabs and grab-like effects, and stop you from bouncing off the ground or sliding.
    If you want to treat it like normal superarmor, include these and remove the things I added related to falling and velocity:

    [State 11777, ParentVarAdd2]
    type = Hitfallset
    Trigger1 = 1
    value = 0

    [State 11777, HitOverride]
    Type = HitOverride
    Trigger1 = 1
    Attr = SCA, AA, AP , AT
    StateNo = 11777
    Time = 1
    ForceAir = 0
    ignorehitpause = 1

    Anyways, I just grabbed one of my project files and quickly edited this up in about 15 minutes with no testing, but hopefully it'll make a good base-point.

    Sorry about the multi-post. Anyways, best of luck, feel free to ask more questions!

    - - - Updated - - -

    Another thought occurs to me, you also might be able to do it by spawning a helper with controls enabled in the current location of the player in state... probably 0, changing the scale, and then putting the player in a state and animation with no hitboxes until the end of the transformation. Though you'd want to relocate the player where the helper currently is every tick for camera reasons.
    You could have the transformation back happen on a timer, and as long as the current state is standing or walking, or possibly if the player currently has control.

    The biggest problem with this idea is that you'd need to put the ParentVarAdd for health into every single state that the helper could possibly be in. It'd probably work better though, since ParentVarAdd just does nothing if the object isn't a helper.
    This might even make grab attacks work, although the damage wouldn't kick in until a self-state was restored. You could also make it not actually apply the damage until the transformation ended, but that'd make the player appear to take no damage and be incapable of dying until the end of the transformation.

    If you want me to I could come up with some concept states for the transformation using this method, feel free to ask.
    Last edited by uGuardian; 23rd January 2020 at 01:41.

  7. #7
    Join Date
    Aug 2019
    Location
    Posts
    4
    Uploads
    0
    Comments
    0

    Default Re: Changing the Size of Fighters DURING Battle?

    So I can't post visitor messages until I've made 10 posts, so I'll just reply to you here~

    So once again, thanks for all the information, and thanks for extending a hand to help further if I need it. What I've been doing here is mostly just for a side project that I haven't been able to devote a whole lot of time to, but I think the information you gave me *should* be enough for me to jumpstart from. I just, haven't been able to get to it lmao

    But seriously, thank you for being so helpful in general towards me, and heck just towards everyone who needs help developing character for this game, because I see you putting in overtime to try helping every member in need. Props

Similar Threads

  1. Trouble with changing cell size for character select
    By Jesseinator1000 in forum MUGEN Configuration Help
    Replies: 2
    Last Post: 20th October 2019, 20:28
  2. Is there a way to get winmugen fighters to work with DOSMugen fighters?
    By Namesnipe in forum General MUGEN discussions
    Replies: 0
    Last Post: 21st May 2019, 08:24
  3. Do you perfer 2D Fighters or 3D Fighters?
    By emulator in forum Video Games & Computers
    Replies: 61
    Last Post: 12th November 2018, 14:18
  4. Changing My M.U.G.E.N.
    By TheMockery in forum General MUGEN discussions
    Replies: 5
    Last Post: 5th August 2018, 23:44
  5. Changing win screen
    By ThatGuyAlex in forum MUGEN Configuration Help
    Replies: 2
    Last Post: 4th February 2017, 19:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •