Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Morki on April 14, 2013, 06:38:00 pm

Title: [RMXP] Change character Sprite...
Post by: Morki on April 14, 2013, 06:38:00 pm
Hey guy's,
I am new and just wanted to tell you that this forum is awesome.



I tried to make a trainer like movement where there is only a Sprite moving but without
being in the actual team...

I am kind of in a loss here, since I want the player to be able to choose their sprites, but I somehow can't
manage to change it.  :(

This is the script:
class Game_Player
  Player_ID = 1
def refresh
actor = $data_actors[ [Player_ID, 1].max ];
@character_name = actor.character_name();
@character_hue = actor.character_hue();
@opacity = 255; @blend_type = 0;
  end
end


It's obvious that it only uses the sprite from player one, but I thought that if I would change Actor 1
Sprite through an Event, the movement sprite would change too, but it doesn't work.  :'(

I also use some of the scripts from Blizzard's Tons of Add-ons like the Caterpillar system.

Thank's in advance. And sorry for my bad english  :^_^':
Title: Re: [RMXP] Change character Sprite...
Post by: KK20 on April 14, 2013, 10:24:52 pm
I don't understand what you are trying to do. You want to change the player's graphic, but you can't use the evented way?
First off, add
attr_accessor :character_name

to the class Game_Player.
Now you can use this script call in an event
$game_player.character_name =
'001-Fighter01'

replacing 001-Fighter01 with the name of the Character Graphic file you want to use.

What is 'trainer like movement'?
Title: Re: [RMXP] Change character Sprite...
Post by: Morki on April 15, 2013, 12:10:53 pm
First off, thank you for your answer.  :D

Ok, so I wrote this script to have the player move with a sprite who is not in the actual party but who uses the ID of Player X in the Database...
Let's call it 'fake_actor'.

And I wanted to change the sprite of this fake actor through an Event. The Player Sprite changes, but not the fake actor one.   :O.o:

And with trainer sprite movement I tried to explain the movement in Pokemon or Digimon,
where the player moves but is not in the Status or Battle Screen.

I added the line to the script and used the scripted event, but it didn't work.  :(
Title: Re: [RMXP] Change character Sprite...
Post by: KK20 on April 15, 2013, 06:03:39 pm
What is this 'fake_actor'? Is it an event on the map?
Title: Re: [RMXP] Change character Sprite...
Post by: BetaGod on April 15, 2013, 08:08:00 pm
I am not understanding either. You want a certain sprite to be displayed while you walk on the map, and a different one for the same actor when you enter a battle? That isn't complicated to execute at all, just call the Change Character command right before a battle procces, and right after one to reset it back to the desired one. Would you care to explain yourself better if that is not what you are trying to accomplish here?

Also, if your english is bad... What is your main language? I may be able to assist you if you speak either spanish or french.