News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Image rotating code

Started by abls1, November 28, 2013, 01:01:43 PM

Previous topic - Next topic

abls1

I need to rotate and image in a screen packbut i do not know how to do it so does anyone know how to rotate 360 or like a wheel? If anyone knows please post the sample code

Thanks
New MUGEN Forum Opened

Sheng Long

If its in mugen code, I can only do it with mugen characters via angledraw, and angleadd. Not sure about screen packs.

Else, you could try a manual rotation with a image editing software that has image rotation, like Paint Shop Pro, or Adobe Photoshop or something, I guess.

There's actually another program that does perfect pixel rotation for things like animation and stuff, but it escapes me right now.....

"You must defeat my flaming
dragon punch to stand a chance."

Dissidia

Sadly, Angledraws on screenpacks, stages and lifebars don't exist and you'll have to do those manually. You can try Rottsprite but the edges will not be looking very smooth, or if you have Adobe After Effects, you can make a rotating animation of your choice with the image. I believe video editing programs such as Camtasia and Vegas Pro can also rotate images or videos as well.

Arias

#3
in 1.1:

    0,        0,          0,              0,         1,    HV,  AS256D256(A,S),     1.1,      1.1,      (0 to 360)
Group, Image, PositionX, PositionY, Time,  Flip,    Transparency,   ScaleX,  ScaleY,    Angle

so if you want a wheel rotating and scaling up at the same time while fading out:

[wheelthing]
type  = anim     
actionno = 99                   

[Begin Action 99]
0,0, 0,0, 3,,AS256D256, 1.1,1.1,0.1
0,0, 0,0, 3,,AS246D256, 1.2,1.2,0.2
0,0, 0,0, 3,,AS236D256, 1.3,1.3,0.3
0,0, 0,0, 3,,AS226D256, 1.4,1.4,0.4
0,0, 0,0, 3,,AS216D256, 1.5,1.5,0.5
0,0, 0,0, 3,,AS206D256, 1.6,1.6,0.6
0,0, 0,0, 3,,AS196D256, 1.7,1.7,0.7
0,0, 0,0, 3,,AS186D256, 1.8,1.8,0.8
0,0, 0,0, 3,,AS176D256, 1.9,1.9,0.9
0,0, 0,0, 3,,AS166D256, 2,2,1
0,0, 0,0, 3,,AS156D256, 2.1,2.1,1.1
0,0, 0,0, 3,,AS146D256, 2.2,2.2,1.2
0,0, 0,0, 3,,AS136D256, 2.3,2.3,1.3
0,0, 0,0, 3,,AS126D256, 2.4,2.4,1.4
0,0, 0,0, 3,,AS116D256, 2.5,2.5,1.5
0,0, 0,0, 3,,AS106D256, 2.6,2.6,1.6
0,0, 0,0, 3,,AS96D256, 2.7,2.7,1.7
0,0, 0,0, 3,,AS86D256, 2.8,2.8,1.8
0,0, 0,0, 3,,AS76D256, 2.9,2.9,1.9
0,0, 0,0, 3,,AS66D256, 3,3,2
0,0, 0,0, 3,,AS56D256, 3.1,3.1,2.1
0,0, 0,0, 3,,AS46D256, 3.2,3.2,2.2
0,0, 0,0, 3,,AS36D256, 3.3,3.3,2.3
0,0, 0,0, 3,,AS26D256, 3.4,3.4,2.4
0,0, 0,0, 3,,AS16D256, 3.5,3.5,2.5
0,0, 0,0, 3,,AS06D256, 3.6,3.6,2.6
0,0, 0,0, 3,,AS0D256, 3.7,3.7,2.7
etc.
etc..
etc...

or easier interpolating

[wheelthing]
type  = anim     
actionno = 99                     

[Begin Action 99]
0,0, 0,0, 3000,,AS256D256,1,1,0  ;(more ticks = slower rotation/animation)
interpolate angle                     
interpolate blend
interpolate scale
0,0, 0,0, 1,,AS0D256,3,3,360

Just the rotation btw:

[wheelthing]
type  = anim     
actionno = 99                     

[Begin Action 99]
0,0, 0,0, 3000,,,1,1,0  ;(more ticks = slower rotation/animation)
interpolate angle                     
0,0, 0,0, 1,,,1,1,360

abls1

@Margatroid your code worked for spining but the image moves away from its own axis!  I need it to spin like a fan



here is the code i used

[Begin Action 111]
111,2, 0,0, 3000,,,1,1,0  ;(more ticks = slower rotation/animation)
interpolate angle                     
111,2, 0,0, 1,,,1,1,360

also rotating is slow how do i speed it up?
New MUGEN Forum Opened

Arias

Because you don't have it centered.
Center the sign Y wise in the Sff & decrease the time from 3000 to like 700 or less.

Kreuzer

keep the center of the object (Dot in the middle) in the middle of the sprite cross.

abls1

ok guys that worked now how do i change the direction of rotation right now is rotating counter clock wise.. iIneed it to rotate clock wise

Thanks
New MUGEN Forum Opened

Duke of Corvus

... how about inverting the angles value... --;
instead of going from 0 to 360, go from 360 to 0...
Lord Noble Eye of Dezeroff; High Commander of the Reconnaissance Division, Airborne Corps; Fifth Seat in the Murder's Council; and Duke of Corvus

abls1

The Mike please post the whole line of code you suggest!!! I'm very much a noobeee...
New MUGEN Forum Opened

Duke of Corvus

assuming you used this code:

[Begin Action 111]
111,2, 0,0, 3000,,,1,1,0  ;(more ticks = slower rotation/animation)
interpolate angle                     
111,2, 0,0, 1,,,1,1,360


invert the angle values

[Begin Action 111]
111,2, 0,0, 3000,,,1,1,360  ;(more ticks = slower rotation/animation)
interpolate angle                     
111,2, 0,0, 1,,,1,1,0


or, if it works with negative angles(I dunno) try:

[Begin Action 111]
111,2, 0,0, 3000,,,1,1,0  ;(more ticks = slower rotation/animation)
interpolate angle                     
111,2, 0,0, 1,,,1,1,-360
Lord Noble Eye of Dezeroff; High Commander of the Reconnaissance Division, Airborne Corps; Fifth Seat in the Murder's Council; and Duke of Corvus

abls1

Thanks @The Mike your codes both work!
New MUGEN Forum Opened