Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: jcsnider on July 12, 2008, 03:06:20 pm

Title: Refresh Character
Post by: jcsnider on July 12, 2008, 03:06:20 pm
Does anyone know of a small code that will refresh the character sprite and change it back to what it is in the actors tab of the database? Something I could put in "script" in an event?

thanks
Title: Re: Refresh Character
Post by: Phasedscar on July 12, 2008, 04:49:44 pm
Why not just use an event with the Change Actor Sprite command?

Or is this for a very specific command from another script?
Title: Re: Refresh Character
Post by: Starrodkirby86 on July 12, 2008, 05:07:03 pm
Quote from: Phasedscar on July 12, 2008, 04:49:44 pm
Why not just use an event with the Change Actor Sprite command?

Or is this for a very specific command from another script?
If his hero has multiple graphics, the Change Actor Sprite would fail as it would only work for the first default graphic. For example, you can't use the command if the hero can have multiple looks (Such as maybe some bearded man or a young child). But it would work if a switch, variable, or something along the lines of that is recorded to that choice, then you use the command of that with a conditional.
Title: Re: Refresh Character
Post by: Blizzard on July 13, 2008, 08:43:55 am
Use a call script command with:
$game_actors[ID].character_name =
$data_actors[ID].character_name
$game_actors[ID].character_hue =
$data_actors[ID].character_hue
Title: Re: Refresh Character
Post by: jcsnider on July 13, 2008, 09:07:22 am
I am using an item as a bike and I am trying to make it to if u use the item, it changes ur graphic but I want it so when you use the item again it gets you off the bike and it changes ur graphic back to the same thing as what it was to the faces thing will work.

But using those line of code I can this error... (the common event im using is under it)
(http://www.fileden.com/files/2007/5/14/1079196/error%20and%20event.png)
Title: Re: Refresh Character
Post by: Blizzard on July 13, 2008, 09:26:43 am
You need to change ID to the ID of the actor in the database. xD
Title: Re: Refresh Character
Post by: jcsnider on July 13, 2008, 09:31:27 am
is there anyways to make ti like remember the char ID until the char gets off the bike or logs out of the game?
Title: Re: Refresh Character
Post by: Blizzard on July 13, 2008, 09:45:38 am
Depends. You could use this instead if it's about the first char in the party:

id = $game_party.actors[0].id
$game_actors[id].character_name =
$data_actors[id].character_name
$game_actors[id].character_hue =
$data_actors[id].character_hue
Title: Re: Refresh Character
Post by: jcsnider on July 13, 2008, 09:53:25 am
ok that is fine but  still get an error
(http://www.fileden.com/files/2007/5/14/1079196/error%202.png)
Title: Re: Refresh Character
Post by: Blizzard on July 13, 2008, 10:47:35 am
Stupid SDK. -_- Add this code under the SDK:
class Game_Actor
 
  attr_accessor :character_name
  attr_accessor :character_hue
 
end


And change the script call to:

id = $game_party.actors[0].id
$game_actors[id].character_name =
$data_actors[id].character_name
$game_actors[id].character_hue =
$data_actors[id].character_hue
$game_player.refresh
Title: Re: Refresh Character
Post by: GAX on July 13, 2008, 04:58:34 pm
I can tell this is some sort of pokemon game...although wouldn't this be simple with events as long as you don't change the character's sprite throughout the game?
Title: Re: Refresh Character
Post by: jcsnider on July 13, 2008, 08:47:36 pm
the sprite does change thoughout the game but it dosn't matter Blizzard help me yet again
and yes it is a pokemon game...
Most of the time if you say you are making a pokemon game or using netplay (im using both) people wont help u becuz they know too many people give up because it is too hard... so far Blizzard has been the only scripter to really help me and i owe him... alot.
rmxp.org I go there alot but i have gotten nothing from there and people here do try to help here, and my game would be nothing about Blizzard
Title: Re: Refresh Character
Post by: GAX on July 13, 2008, 09:42:48 pm
RMXP.org wont help you unless you build up a huge post count and reputation...

I've been working here for a while, and ever since I got Blizzard's help with the creation of the Chaos Drive system for Chaotic Fury, I've actually been able to work on my game, although I'm still late on a demo I'll have something up soon.