YesNoOk
avatar

Coding a custom shadow. Scaling help. (Read 362 times)

Started by Blackscale299, October 05, 2012, 02:38:34 am
Share this topic:
Coding a custom shadow. Scaling help.
#1  October 05, 2012, 02:38:34 am
  • **
  • NvP!
Well, i wanted to code a custom shadow for my game nvp.. because the normal one wouldnt fit in the game cause of the platforms.
Anyways my problem is, i dont know how to make the shadow smaller when the character leaves the ground (POS Y = 0) nor make it to the original size again..
Spoiler, click to toggle visibilty
the var(29) means pos y = 0 btw
Thats all i got by now
The smallest scale should be arround .2,.1
I hope u guys understand what i mean etc.
Last Edit: October 05, 2012, 02:52:12 am by Sasuke299
Re: Coding a custom shadow. Scaling help.
#2  October 05, 2012, 04:03:29 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Fvar makes it a little simpler so we'll stick with that

trigger1 = rootdist Y< 0
fvar(0) = rootdist Y/300

That's a guess you'll need to tweak. Apply some additional constraint's around it stopping at 0.1 or 0.2 once you get sensible values.

angledraw
trigger1 = rootdist Y< 0
scale = 1,fvar(0)

Something like that. You're really just using an equation on the fvar that's going to make your value of 1, smaller. Rootdist is unlikely to get higher than say... 240 maybe, i don't know how high your characters jump.

root, pos Y would give similar results.


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: Coding a custom shadow. Scaling help.
#3  October 05, 2012, 02:53:02 pm
  • **
  • NvP!
hmm is it possible to make the scale be like, on pos y = -10 the scale is .7, on pos y = -11 scale is .69 etc. ?