YesNoOk
avatar

AngleDraw (SCTRL) (Read 11203 times)

Started by JustNoPoint, October 22, 2015, 05:14:31 pm
Share this topic:
AngleDraw (SCTRL)
#1  October 22, 2015, 05:14:31 pm
  • ******
    • www.justnopoint.com/
Draws the player (for 1 frame) rotated about his axis by the angle set by the AngleSet controller. When facing right, a positive angle means a counterclockwise rotation.

Required arguments:
none

Optional arguments:

value = angle (float)
Sets the drawing angle in degrees.

scale = xscale, yscale (float, float)
Scales the player sprite.

Notes:
Rotation/scaling does not affect the player’s collision boxes.

Example:
none
Last Edit: October 22, 2015, 05:34:53 pm by Just No Point
Re: AngleDraw (SCTRJ)
#2  October 22, 2015, 05:34:07 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
Seeing as I've never actually tried this before, does the value parameter take priority over the value set by the AngleSet controller?
Re: AngleDraw (SCTRL)
New #3  October 23, 2015, 10:52:31 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
AFAIK, yes. If you use angleset and then set a value in this, it will overwrite that value.

I have never really seen a need for angleset unless for some reason you really wanted to save a variable.

As angledraw does scale as well, having a special one for angleset is rather pointless.

Additional note. Rotation/Scaling will break any transparency settings used in the .AIR file. If you wish to use transparency like A, A1 or addalpha settings when scaling or rotating you must also make use of the TRANS sctrl.


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.
Last Edit: December 14, 2016, 06:15:41 pm by Just No Point
Re: AngleDraw (SCTRL)
#4  October 23, 2015, 04:09:57 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
Another thing i've noticed from experience is that AngleDraw's scaling is done from the sprite's axis, not the animation axis, so displacing a sprite's axis in the animation data will only displace it by that amount after the scaling.
Re: AngleDraw (SCTRL)
#5  October 26, 2015, 03:59:03 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
I'm probably wrong, but I think the AngleSet controller is required for AngleDraw to work (?)   Or at least in custom states?

I was trying to use AngleDraw controllers in a custom state, but it had no effect whatsoever until I added an AngleSet controller with trigger1=1, and no parameters

Re: AngleDraw (SCTRL)
#6  October 27, 2015, 05:37:10 am
  • avatar
  • ****
  • I'm behind you!!!
I've seen angleset and draw in a few characters when regarding projectiles. Akuma's air fireballs have some angle set to em depending on button press.

ESFANDY011's MKvsSF characters on the MK side of things have an angledraw to the back and forward jumps.

I think I used angledraw with the Axe and the knife on Zox's Simon Belmont.

Re: AngleDraw (SCTRL)
#7  October 27, 2015, 02:25:40 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
One thing regarding the scale parameter;

If you use Angledraw to set the scaling, and then switch to another state that also uses Angledraw for scaling, both Angledraw controllers will take a multiplicative effect . For instance;

Code:
[State 2000 AD]
type = angledraw
scale = 2.0,2.0

[State 2000, CS]
type = changestate
value = 2001

[Statedef 2001]
..

[State 2001, AD]
type = angledraw
trigger1 = 1
scale = 2.0,2.0

For the very first tick of state 2001, the scaling from both state 2001 and state 2000's AngleDraw controllers will take a multiplicative effect, giving you a scale of 4.0,4.0 (2.0*2.0=4.0). Changing the trigger of the second Angledraw controller to time>0 seems to resolve this issue.
Re: AngleDraw (SCTRL)
#8  February 11, 2016, 03:47:47 pm
  • ******
    • www.justnopoint.com/
I'm probably wrong, but I think the AngleSet controller is required for AngleDraw to work (?)   Or at least in custom states?

I was trying to use AngleDraw controllers in a custom state, but it had no effect whatsoever until I added an AngleSet controller with trigger1=1, and no parameters

Just had to use this in a custom state and it worked fine without AngleSet. Must have been something else causing issues?

[State 0, AngleDraw]
type = AngleDraw
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(5) < 0
value = -90
Re: AngleDraw (SCTRL)
New #9  February 11, 2016, 05:44:56 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
I'm probably wrong, but I think the AngleSet controller is required for AngleDraw to work (?)   Or at least in custom states?

I was trying to use AngleDraw controllers in a custom state, but it had no effect whatsoever until I added an AngleSet controller with trigger1=1, and no parameters

Just had to use this in a custom state and it worked fine without AngleSet. Must have been something else causing issues?

[State 0, AngleDraw]
type = AngleDraw
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(5) < 0
value = -90

OK, I decided to screw around with my code to figure out what exactly I was having trouble with back then (instead of talking out of my A$$ :))

AngleAdd will not do anything without an active AngleDraw.  Reading the comments on AngleAdd, it doesn't really make AngleDraw sound like it's required in combination.

Last Edit: February 11, 2016, 05:50:54 pm by altoiddealer