YesNoOk

Show content

This section allows you to browse the content for this member. Note that you can only see content for which you have sufficient viewing permissions.

**
altoiddealer is Offline
Contact altoiddealer:

altoiddealer

User

Messages by altoiddealer

    

Re: "Tractor Beam" attack - how to deal with axis

 December 29, 2014, 06:54:34 pm View in topic context
 Posted by altoiddealer  in "Tractor Beam" attack - how to deal with axis (Started by altoiddealer December 28, 2014, 04:55:13 pm
 Board: M.U.G.E.N Development Help

Well, I'll chew on that for awhile, but for now I will mark this as solved and use OffSet (which seems like it will work good in most cases).  This is one of those State Controllers I flip past all the time thinking "why the hell would I ever need to use that?!" - but it's doing the trick here!

I'll probably add some flashy effect to make the sudden axis switch look less noticeable.

Code:
[State 3303, 1]
type = Offset
trigger1 = Time = [0,100]
y = Const(size.mid.pos.y)

Thank you again!!! My hero!
    

Re: Scale P2 to specific pixel size

 December 29, 2014, 06:43:30 pm View in topic context
 Posted by altoiddealer  in Scale P2 to specific pixel size (Started by altoiddealer December 28, 2014, 09:02:16 pm
 Board: M.U.G.E.N Development Help

It worked!  :buttrox:

However, I noticed that the height constant seems to be set low (at least for KFM) because (I think) it's really just used to determine how high the other player needs to jump to get over you.

So I'm factoring midposy X2 instead, because that seems to be slightly more accurate.

Finished code I'm using:

Code:
[State 3301, 1] ;P2 is more tall than wide
type = AngleDraw
triggerall = (Const(size.mid.pos.y)*-2.0) > ((Const(size.ground.back) + Const(size.ground.front)))
trigger1 = anim = 0
trigger2 = anim = 20
trigger3 = anim = 3306
Scale = (18.0/(Const(size.mid.pos.y)*-2.0)),(18.0/(Const(size.mid.pos.y)*-2.0))

[State 3301, 2]
type = AngleDraw ;P2 is more wide than tall
triggerall = (Const(size.mid.pos.y)*-2.0) < ((Const(size.ground.back) + Const(size.ground.front)))
trigger1 = anim = 0
trigger2 = anim = 20
trigger3 = anim = 3306
Scale = 18.0/(Const(size.ground.back) + Const(size.ground.front)),18.0/(Const(size.ground.back) + Const(size.ground.front))
    

Re: "Tractor Beam" attack - how to deal with axis

 December 29, 2014, 04:38:46 pm View in topic context
 Posted by altoiddealer  in "Tractor Beam" attack - how to deal with axis (Started by altoiddealer December 28, 2014, 04:55:13 pm
 Board: M.U.G.E.N Development Help

Ah okay. Good! :) Really, it's just a matter of offsetting the extra distance by calculating how much the sprite is off. You would just trigger that on the frame/state/whatever that you need it to. The sctrl would probably be Offset. I've had issues with PosFreeze in the past, but I think it was just my situation. See how it works for you though

I get the concept here, but I'm clueless on calculating the necessary offset.  I can make this work for one specific state against one specific opponent, but I'm totally lost on how to do this against any opponent, in any anim.
    

Re: Scale P2 to specific pixel size

 December 29, 2014, 04:24:04 pm View in topic context
 Posted by altoiddealer  in Scale P2 to specific pixel size (Started by altoiddealer December 28, 2014, 09:02:16 pm
 Board: M.U.G.E.N Development Help

Your logic should work here. One thing you have to understand about mugen is that if no floating point (float) numbers are within an equation, the result will be an integer. I can't remember if you need both the numerator and denominator as floats, but it doesn't hurt to make both:
Code:
Scale = (20.0/Const(size.height)*1.0),(20.0/Const(size.height)*1.0)

Hmm... I understand!  I'll give this a shot when I get home from work.  Thanks man, I'd never think of this.


However, there is one way that you can have the player in your custom state read a "variable" of yours. It works like this:
In the HitDef, you take one of the unused (in your particular case) parameters and set it to whatever you want. For example:
Code:
fall.envshake.time = 0 ; To disable the fall.envshake entirely.
fall.envshake.freq = (20.0/enemynear(0),Const(size.height)*1.0)

Then in your custom state, you would access the "variable" using GetHitVar:
Code:
scale = GetHitVar(fall.envshake.freq)


Mind = Blown.  ._.

I know not to try setting/changnig vars within a custom state, but I've been racking my brain, and searching high and low on Google, on how the hell to read P1's vars from within a custom state.  This is awesome information right here.  Too bad you can't detect a Var if it changes after P2 is put into the custom state... but I think this will be useful to simplify the coding for my custom Win Pose which controls P2.
    

Re: "Tractor Beam" attack - how to deal with axis

 December 29, 2014, 04:15:56 pm View in topic context
 Posted by altoiddealer  in "Tractor Beam" attack - how to deal with axis (Started by altoiddealer December 28, 2014, 04:55:13 pm
 Board: M.U.G.E.N Development Help

I believe that what you're looking for is within the common required sprites.

I have a custom get-hit anim for P2 using that sprite :)  But the issue is that the animation jumps depending on where P2's axis orientation is when touching the light.

I'm hoping to have the animation behave as I envision, with P2 freezing immediately when he touches the light, whether standing, crouching, in mid-air or whatever, then flying directly into the center of Jailbot's face.  I have a basic understanding of throw mechanics, but I'm not keen on changing the axis orientation smoothly between frames (or in this case, States)

When the attack hits the opponent, make the screen flash white :P

Nobody will notice the sudden jump in anims

Heh, I'll take that into consideration :)
    

Scale P2 to specific pixel size

 December 28, 2014, 09:02:16 pm View in topic context
 Posted by altoiddealer  in Scale P2 to specific pixel size (Started by altoiddealer December 28, 2014, 09:02:16 pm
 Board: M.U.G.E.N Development Help

For part of a super move I am working on, I want to make P2 get scaled down to about 20px, regardless of how big or small the character is.

I'm guessing it's impossible to get an exact size, but for my purpose a rough estimate will suffice.


In P2's custom state, I have these State Controllers:

Code:
[State 3301, 1]
type = AngleDraw
triggerall = Const(size.height) > ((Const(size.ground.back) + Const(size.ground.front)))
trigger1 = anim = 0
trigger2 = anim = 20
Scale = (20/Const(size.height)),(20/Const(size.height))

[State 3301, 1]
type = AngleDraw
triggerall = Const(size.height) < ((Const(size.ground.back) + Const(size.ground.front)))
trigger1 = anim = 0
trigger2 = anim = 20
Scale = (20/(Const(size.ground.back) + Const(size.ground.front))),(20/(Const(size.ground.back) + Const(size.ground.front)))

Unfortunately, this doesn't work  :knife:  I'm assuming it would work, but it's just not doing the math for the "Scale" parameter.  I tested by removing the math and changing P2's Constant Height to "2," and he is drawn at 2x size.  I also understand that there are other factors I will need to take into consideration, such as P2's Const(size.xscale) and Const(size.yscale)

...Is there a workaround, or another method, to achieve this?

Many thanks in advance

**EDIT** Is there any way to set this calculation as a var, and have it recognized by P2 in the custom state?  I've tried all the redirections I can think of without success, and can't find anything about it through Google
    

"Tractor Beam" attack - how to deal with axis

 December 28, 2014, 04:55:13 pm View in topic context
 Posted by altoiddealer  in "Tractor Beam" attack - how to deal with axis (Started by altoiddealer December 28, 2014, 04:55:13 pm
 Board: M.U.G.E.N Development Help

There is probably a very simple answer for this that I'm just not seeing.  I'm still lacking a bit in the Experience Dept.


For those not familiar with my project, my character has a screen for a face.

I'm working on a super move, where my character emits a light (cone shaped, like a flashlight).

If P2 makes contact with it, he is sent into a custom state, and then sucked into the "screen":
-P2 gets FreezePos for 40 ticks... so will freeze instantly
-After 40 ticks, P2 is dynamically scaled from 1 to 0 during the course of the next 60 ticks
-During these 60 secs, P2 floats into my chars face, followed by a ridiculous fullscreen arcade sequence.

MY ISSUE:
I can calculate the correct X and Y velocities to make P2 gravitate to the center of the "screen," regardless of position... but it would be a heck of a lot easier and accurate if I can force P2s axis to be centered on the mid section.

I believe I need to put P2 into a custom throw anim with centered axis, but I don't know how to accurately make the switch (without anim jumping from one place to another).  Maybe this isn't the solution I need, though.

Any help appreciated.  Thanks!
    

Re: Finn and Jake- Adventure time

 December 03, 2014, 04:19:59 pm View in topic context
 Posted by altoiddealer  in Finn and Jake- Adventure time (Started by Daeron January 08, 2013, 11:04:59 pm
 Board: Sprite Projects

^ What he said!

...Any progress?
    

Re: Attacks from Helper, then redirect Target to Root?

 November 20, 2014, 04:20:46 pm View in topic context
 Posted by altoiddealer  in Attacks from Helper, then redirect Target to Root? (Started by Sheng Long November 20, 2014, 06:17:59 am
 Board: M.U.G.E.N Development Help

I guess it's also worth mentioning that you can put P2 into a custom state whenever the hell you want, by calling a helper that uses a blank animation w/ a full-screen CLSN box.

See my post here, steps #3 and #4.
    

Re: Is Partner, or Check ID if Partner?

 November 20, 2014, 04:11:47 pm View in topic context
 Posted by altoiddealer  in Is Partner, or Check ID if Partner? (Started by Sheng Long November 17, 2014, 07:15:40 pm
 Board: M.U.G.E.N Development Help

Also, can someone tell me why, when doing single mode, this code displays "has no 0-th partner"

They should be basically the same, except to check if there is a partner, or no partner. I wanted the first code, but it's giving me that 0th partner error.
I just saw this now, but the reason is quite simple. Let's compare the two:

Code:
triggerall = NumPartner <= 0 || NumPartner > 0 && ID < Partner, ID
In this example, you have everything on one line. First, numpartner<=0 will be evaluated. This will be true in single player modes. Next, the other side of the OR operand is evaluated. numpartner and partner are evaluated one after the other. However, if you have no partners, "partner" redirection will result in the error you're seeing. Why is this? It's because you aren't stopping the evaluation after it's found that you have no partners via numpartner.

Code:
triggerall = NumPartner > 0
triggerall = ID < Partner, ID
In this example, you have numpartner being checked first. Then, if the first line is true, the next line will be evaluated. This is safe and won't cause the error.

Do you see the difference? As a closing note, I would like to add that you can surly fix the single line of code to work for you. Observe:
Code:
triggerall = cond(numpartner, partner,ID<ID, 0)
What does this do? I'm sure you've seen ifelse and have used it before. If not, it basically evaluates the first parameter and returns either the second or third expression's evaluation depending on the result of the first expression.
Code:
ifelse(1, 5, 10) ; will return 5
ifelse(0, 5, 10) ; will return 10
The drawback with this is that both "5" and "10" are evaluated by mugen. "cond" does exactly the same thing except that it doesn't evaluate both "5" and "10" for the sake of this example. Instead, it will ONLY evaluate the expression that will be returned. Going back to my example before of cond, you see numparter. This will be false in single player mode. Then, the next parameter is your partner expression, and the one after is simply 0. The result will be 0, because numpartner was false. If simul mode, numpartner will be true and then the "partner" expression will evaluated instead.

I apologize for the long-winded explanation, but I really wanted to show you how it works.


Алексей, every response you make in this subforum is pure gold.
    

Re: Calculating X/Y distance, relative to P1's and P2's faces? Or close estimate?

 November 16, 2014, 08:53:04 pm View in topic context

Thanks for the explanation!  I'll be using that redirection for sure.
    

Re: Fighter Factory 3.0 Final Release Preview v2

 November 16, 2014, 04:56:46 pm View in topic context
 Posted by altoiddealer  in Fighter Factory 3.0 Final Release Preview v2 (Started by VirtuallTek December 16, 2011, 11:37:46 pm
 Board: Your Releases, Mugen 1.0 +

Stupid program.

Take that back! This program is unfreakinbelievably awesome

Sorry I can't help with your question- not sure exactly how that is... Um check your ff3 config, and where it says "current char vs kfm" with the code underneith, try adding " stagename" after.  Of course be sure the stage you are specifying exiats in the default mugen folder
    

Re: [WIP] Jailbot (from Superjail!)

 November 16, 2014, 04:49:40 pm View in topic context
 Posted by altoiddealer  in [WIP] Jailbot (from Superjail!) (Started by altoiddealer April 16, 2013, 04:00:56 am
 Board: Projects

Thanks all!  The next sprites I want to work on are for jumping... but just as I was with these gethits, I'm again feeling hesitation lol

I want to have cool and unique jump anims, but I can't think of anything short of adding little rocket blasts as propulsion.  He never actually "jumps" in the show, but I also of course don't want to keep him grounded, or make him a fly-around character.  Pretty sure I'll be settling on the blasts... as I've so far settled on his "crouch" (stand state, just 15px lower :no:).  Speaking of which I might change that so he actually bends backwards or something, now that I know how to deform (warp) my 3d model.
    

Re: Calculating X/Y distance, relative to P1's and P2's faces? Or close estimate?

 November 16, 2014, 04:17:32 pm View in topic context

Another way that comes to mind that could added on top of what you have already is by detecting the stateno and prevstateno of your enemy. For example:

Code:
trigger1 = (enemynear(0),stateno=[10,12]) || (enemynear(0),prevstateno=[10,12]) ; If they're crouching or were crouching in the last state.

Most characters don't really have crouching chains, so usually, you'd see 11->400->11 for a simple crouching attack.

That's a good point and awesome suggestion.  This will def reduce the chances of that lookup issue against the "undeclared-crouch-type" chars :)  Thanks again!

Of course I'll also be adding P2StateNo != 0  to that condition, so it doesn't continue triggering if p2 just stops crouching.


Quick question... what is enemynear(0)?  I underatand redirects but is there a significance for the zero? Or is that a placeholder for the ID of P2?   I've avoided this redirection bc Im not sure exactly how you obtain the id number, or how/when this is more practical/different from just "enemy."
    

Re: Calculating X/Y distance, relative to P1's and P2's faces? Or close estimate?

 November 15, 2014, 03:03:38 pm View in topic context

One idea would be to make a type of vertical pushblock helper. It'd take up some resources I think..
But make a blank animation with just a flat blue bar. (FF3) Make a helper and use it as it's anim.
You could set it to move down until it made contact with P2. Then you'd use it's position and find the general "top" of P2.
One thing would be like Ryu's crouching uppercut. The top of the fist would become the top of the character, so P1 still might have the problems you're describing.

If a creator of a character mislabels moves, I dont know how you should be responsible to code around it.
you could always do something like

[State -2, adjustvar]
type=varset
triggerall=numenemy
trigger1=enemy,name="cvsvega"&&(enemy,authorname="Warusaki3"||enemy,authorname="Gargoyle")

and list people with problems.

Thanks, I definitely never would have thought of this.  That's interesting!
If I stay with the crouch-type move triggers, I think I'll do as you suggested to hack a solution

You can also use Enemy,Const(size.head.pos.y)

It will return the position of the head, based on the character's CNS. It will not return the current Pos Y of the character's head, so it will be the same if the enemy is jumping or crouching

However, you can play with this value by offsetting it with the character's axis. If the axis is higher than the head.pos.y, then the character is jumping

Hmm... so if I just factor this in I think that could help with my player height issue



I appreciate the feedback guys!  Anyone else have a tip?
    

Calculating X/Y distance, relative to P1's and P2's faces? Or close estimate?

 November 15, 2014, 05:43:15 am View in topic context

Anyone following the progress of my char probably saw that I have made a custom feature, where my character's eyes follow P2 during the fight.

Currently, my varsets are triggered by comparing P2's axis with P1's axis (p2dist x and p2dist y).  He will also look down if P2 is in a "crouch type" state, or if in the typical crouching statenos. (if you look at the code, plz ignore my not adding typical crouch-attack statenos yet to it).

At this point, the effect only looks natural vs. average height characters, during maybe 75% of P2's states.

For instance here's one stupid thing I noticed against one char: the author did not assign the "crouch type" value to his crouch attacks, so Jailbot's eyes shot up every time p2 did a crouching attack (you know what I mean...).


Unless I'm missing something, I don't think there's a simple way to really solve this; I'm sure it will have to be a combination of techniques.  I don't know if I'm better off using a helper sometimes?  I almost feel like I'm a little over my head here - this is my first character so I'm still a bit wet behind the ears.

...is there an experienced coder that might know that winning combination I need? :???:

I could probably just keep adding down and dirty workarounds, brute-forcing every issue away one by one, but I'm afraid I'll spin this big complex web and just get lost in it  :knife:

Spoiler: code (click to see content)

    

Re: [WIP] Jailbot (from Superjail!)

 November 14, 2014, 02:17:00 pm View in topic context
 Posted by altoiddealer  in [WIP] Jailbot (from Superjail!) (Started by altoiddealer April 16, 2013, 04:00:56 am
 Board: Projects

Progress!  Awww yeahhhh.  I just need to tweak his arms to make them look more natural after he bounces

    

Re: Problems with ScreenBound

 November 13, 2014, 05:13:38 pm View in topic context
 Posted by altoiddealer  in Problems with ScreenBound (Started by Odb718 November 09, 2014, 08:25:38 am
 Board: M.U.G.E.N Development Help

I actually had a minor issue with this, too, which I decided to put off and solve later... so now I can go ahead and fix it in my char as well lol
    

Re: Problems with ScreenBound

 November 13, 2014, 04:00:51 pm View in topic context
 Posted by altoiddealer  in Problems with ScreenBound (Started by Odb718 November 09, 2014, 08:25:38 am
 Board: M.U.G.E.N Development Help

For sh*ts n giggles...
-Have you tried adding a redundant Screenbound controller to your p2 custom state?
-Have you tried making a Screenbound controller in State -2 that is active when your character and P2 are within those states?

I'm sure you have, but also try omitting everything (default settings).

[State -2]
type = Screenbound
trigger1 = StateNo = 3767
trigger2 = P2StateNo = xxxx
    

Re: Super Mario... Mario

 November 07, 2014, 06:47:35 pm View in topic context
 Posted by altoiddealer  in Super Mario... Mario (Started by Jango Hakamichi November 07, 2014, 01:03:10 pm
 Board: Projects

Win Pose idea - Mario dancing to the music used in the ending credits of the movie lol


Quote
Open the door, get on the floor! Everybody walk the dinosaur!