The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Code Library => Topic started by: 外音リザ on October 08, 2005, 04:18:40 pm

Title: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: 外音リザ on October 08, 2005, 04:18:40 pm
If you're like me who uses scaling to fit characters into right proportions, do note that posadds ignores scaling to some extent. If you want it to posadd correctly under any scaling ratios, Its addition axis should be multiplied by const(size.?scale), where ?scale pertains to the equivalent axis.

If for example, you want to posadd by 15 pixels...

x = floor(15 * const(size.xscale))

floor is used to round off the product to the lowest value possible.
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: Messatsu on October 09, 2005, 11:06:04 pm
Quote
If you're like me who uses scaling to fit characters into right proportions, do note that posadds ignores scaling to some extent.
To some extent?  Don't you mean ignores it completely?
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: 外音リザ on October 10, 2005, 01:52:00 am
Well, there's some times it does, and times it doesn't.

It's really weird.
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: Messatsu on October 11, 2005, 09:04:19 pm
Would you mind posting an example to pinpoint this phenomena?
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: 外音リザ on October 12, 2005, 05:48:55 am
Well, for starters, it's in Karin right now. All her attacks that has posadds exhibit this strange problem. You need to look closely though; the discrepancy can't be seen in one shot, but in repeated instances.
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: Messatsu on October 12, 2005, 10:16:09 pm
Okay.  I'll see what I can find this weekend (if I remember).
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: shinra358 on August 30, 2006, 11:51:55 pm
where do i specifically input this? in one position or for all the position adds?
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: Byakko on August 31, 2006, 12:11:55 am
All the posadds.
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: shinra358 on August 31, 2006, 01:41:26 am
Doh!!! Give me a sample number i can put as x. And does this x have to be the same number as the x before the equals sign? or are they two different values for each x?
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: Messatsu on August 31, 2006, 01:12:54 pm
There is no sample number...  this is an expression.  What you'd do on a normal character is see this.

type = posadd
x = 21
y = 69

Then convert to this:

type = posadd
x = floor(21 * const(size.xscale))
y = floor(69 * const(size.yscale))
Title: Re: Posadds and scales-- make them posadd correctly in any scaling ratio!
Post by: shinra358 on August 31, 2006, 06:31:33 pm
oooooooooh i seeee.....thanx for the clarification.