Refresh Character

Started by jcsnider, July 12, 2008, 03:06:20 pm

Previous topic - Next topic

jcsnider

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

Phasedscar

Why not just use an event with the Change Actor Sprite command?

Or is this for a very specific command from another script?
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Starrodkirby86

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.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Blizzard

July 13, 2008, 08:43:55 am #3 Last Edit: July 13, 2008, 08:45:58 am by Blizzard
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
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.

jcsnider

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)

Blizzard

You need to change ID to the ID of the actor in the database. xD
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.

jcsnider

is there anyways to make ti like remember the char ID until the char gets off the bike or logs out of the game?

Blizzard

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
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.

jcsnider

ok that is fine but  still get an error

Blizzard

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
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.

GAX

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?

Rule 2: ShowHide
Quote from: Rule No.2Keep your signatures at reasonable size. The pictures in your signature may altogether be no more than 200kB and take up an area of 1600px2. That means 2 pictures of 400x200 are fine, one picture of 800x200 is fine and so on. Also your pictures height must not exceed 200 pixels, width can be as big as you want as long as your pictures match the other criteria. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

jcsnider

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

GAX

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.

Rule 2: ShowHide
Quote from: Rule No.2Keep your signatures at reasonable size. The pictures in your signature may altogether be no more than 200kB and take up an area of 1600px2. That means 2 pictures of 400x200 are fine, one picture of 800x200 is fine and so on. Also your pictures height must not exceed 200 pixels, width can be as big as you want as long as your pictures match the other criteria. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.