[Resolved] Flip Graphics in Game

Started by ShadowSaber, April 20, 2011, 01:30:57 am

Previous topic - Next topic

ShadowSaber

April 20, 2011, 01:30:57 am Last Edit: April 20, 2011, 09:28:31 am by ShadowSaber
One more question,

I want to know how to flip character graphic in game

THanks ~

-----edit : resolved-----

ForeverZer0

Actually, the easiest way would be to just get a charset with the graphics flipped, then use an event to change the graphic.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

ShadowSaber

Quote from: ForeverZer0 on April 20, 2011, 01:35:18 am
Actually, the easiest way would be to just get a charset with the graphics flipped, then use an event to change the graphic.


it's the easiest method but... what should i say...

I wanted to do it with a script to reduce graphics needed

I want to use it for all event in certain map,
to create flipped version on each graphics will increase a lot of size

Zeriab

If you have light coming from a specific angle simply mirroring the graphic may not look right.
Consider if this is the case for the character graphics you want flipped because you'd get a better result spriting the flipped character to reflect the light.

*hugs*

ForeverZer0


class Scene_Map
 attr_accessor :spriteset
end

class Spriteset_Map
 attr_accessor :character_sprites
end

module ShadowSaber
 
 def self.flip
   $scene.spriteset.character_sprites.each {|chr| chr.angle += 180 }
 end
end


Just use the script call "ShadowSaber.flip"

This is about as down and dirty as it gets. With a couple more minutes, it could actually be scripted properly...
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

Isn't that rotation by 180 and not flipping? Under flipping I'd understand a horizontal or a vertical flip. There's always Sprite#mirror that can be set to true in that case.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ForeverZer0

Yeah, but as far as mirroring goes on character sprite, its basically just the sprite facing the opposite direction. I kind of assumed he meant vertically.
ShadowSaber?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Ryex

a true vertical flip would rotate 180 AND mirror it
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

ForeverZer0

oooooh, and the shit just got deeper....  :haha:
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

LiTTleDRAgo

April 20, 2011, 07:12:50 am #9 Last Edit: April 23, 2011, 04:26:29 am by LiTTleDRAgo
-----removed-----

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ShadowSaber