Script to change actor sprite[resolved]

Started by jcsnider, December 06, 2008, 05:15:49 pm

Previous topic - Next topic

jcsnider

December 06, 2008, 05:15:49 pm Last Edit: December 07, 2008, 11:47:23 am by jcsnider
Ok I searched this time  :^_^':

I am looking for the small script that would change the actors sprite...

Fantasist

Can't you do that with the ""Change Actor Graphic" event command in the 3rd(?) tab? o.O
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




jcsnider

yes, but, I am not doing an event I am in the scripts  :wacko:

Fantasist

use the "set_graphic" method. Get the actor you want and execute the method. Example:


$game_actors[ACTOR_ID(in database)].set_graphic(charset_name, charset_hue, battler_name, battler_hue)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




jcsnider

Ok, i will try it.. it looks as if it gets the char graphic from the database...

Is that what it does or does it do like Setplayer graphic = "graphic name"
I have no idea what i ma really talking about, it just looked long to just set player character graphic

Fantasist

That function gets executed when you use the "Change Graphic" event command. If you observe, you'll be selecting 4 things there: character graphic, it's hue, battler graphic and it's hue. That method only sets 4 variables to their respective values. If you only want to change one of those 4, read the variables you don't want to change and put them in the set_graphic method. For example, if you want to change only the charset graphic, do this:


actor = $game_actors[ACTOR_ID_IN_DATABASE]
charset_name = "Your charset name here"
charset_hue = actor.character_hue
battler_name = actor.battler_name
battler_hue = actor.battler_hue
actor.set_graphic(charset_name, charset_hue, battler_name, battler_hue)


Or, you can make those variables attr_accessors so that you can direrctly change them.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




jcsnider

December 07, 2008, 11:12:01 am #6 Last Edit: December 07, 2008, 11:13:34 am by jcsnider
Ok thanks, I will test it and edit with a works or not



Ok I got it, thanks Fantasist

Fantasist

Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews