I was wondering if someone could make a script that will add animation to characters when you aren't moving them.
EX.
- Hair blowing in the wind
- Blinking
I'll give this a shot :^_^':
Thank you Landith!
Okay, this is what I have so far...
It doesn't work though.
class Game_Player
attr_accessor :character_name_org
attr_accessor :character_name
def initialize
super
@character_name_org = @character_name
end
def update
unless self.moving?
@character_name = @character_name_org + '_idl'
update_idle
end
end
def update_idle
if self.moving?
@character_name = @character_name_org
update
end
end
end
Someone can take over because I thought it would be easy but i was wrong... :<_<:
Sorry Calintz...
wait, isn't this a built-in function of rmxp? I'm pretty sure... lemme check...
EDIT: Yes, ok, I think I found it. Setting a character's step_anime property to true should give it idle animation. Hence, you code would look something like:
@character_name.step_anime = true
Yes, that should be it...
Are you talking about idle sprites?
Idle sprites aren't a built in RMXP Function, although it would have been nice to have...
@Calintz: I think you can use Blizz-ABS with it being compatible with your side-view system and use the sprite handling it uses without configuring anything else. I'm not sure though...
I edited my earlier post with it.
And... yes, they are built in. Unless we are talking about two different types of idle sprites...
Oh, I get it. you want to switch between two different sprites, am i correct? One for idle, and one for movement? Yeah, that's not built in... I just thought you were talking about animating a sprite in place. :stupid:
Yeah...switch between two separate sprites...
I didn't think it would be that hard actually...I thought it would just consist of something like if player is moving, then it would use one, but if no buttons are being pressed it would search the specified folder for a certain image and animate it...
I guess I was wrong, Lol...
Thanks anyway Landith!
Just check out how I did it in Blizz-ABS. It's all in BlizzABS::Controller and Map_Battler.
I don't know ANYTHING about scripting sadly...
I meant winkio and Landith. xD
oh, fine, ill do it... Give me a few minutes...
Lol, you don't have to!!
- This IS a REQUEST!! I'm not picky, Lol
lol 48 lines! It goes below defaults, above main, and just name your idle sprites the same as the character sprite with _idl on the end
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# With idle sprites. name the idle sprites the same as their normal ones
# except with '_idl' on the end (before the extension)
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :character_name_org # original character file name
attr_reader :current_sprite # current sprite suffix
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias initialize_idlesprites_before initialize
def initialize
initialize_idlesprites_before
# set original character name
@character_name_org = @character_name
# set current sprite
@current_sprite = ""
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias update_idlesprites_before update
def update
update_idlesprites_before
if @character_name != ""
if moving?
if @current_sprite != ''
@step_anime = false
@character_name = @character_name_org
@current_sprite = ''
end
else
if @current_sprite != '_idl'
@character_name_org = @character_name
@step_anime = true
@character_name += '_idl'
@current_sprite = '_idl'
end
end
end
end
end
I tested it and it worked fine. An example of naming would be:
moving sprite: MainDude.png
idle sprite: MainDude_idl.png
Your a beast...
I will test it now =)
I know this is a small scriplet type thing, but you should make a quick demo and add it to the scripts section.
*powers up*
I think it has a bug - the same bug mine had when I made the first version.
The short moment where you are fully standing on a map square, even though you are pressing a movement button, would display the idl sprite for one short moment. I fixed this by adding "&& Input.dir4 == 0" (actually it was Input.dir8, lol) to the "moving?" condition. You should try out the script if it works normally. If it does, then this fix is unecessary.
I will look for that bug now...
Good job Winkio!
*Powers Up*
I wish I could script... :(
Well...it's not working the way I wanted...
The sprite is idle, but just doing a moving animation. I have created a quick sprite alter that makes the character blink, but he isn't blinking, he is just moving in place...
Err, mine works fine. Here, I'll put up a demo in a bit.
@Blizz: thanks for that. I didn't test with a drastically different sprite so i didn't notice :).
Ok, here's the demo. The idle animations are stupid, but that's all i could come up with in about 15 seconds.
http://www.sendspace.com/file/u8lbfo (http://www.sendspace.com/file/u8lbfo)
recopy the slightly-fixed version out of there.
ignore the other random left-over stuff in the demo.
I don't know...it doesn't work for me :\
wait, the demo itself doesn't work? Is anybody else having this problem? I'm certainly not...
So am I correct in saying, Calintz, that when you run the demo, when the guy is standing in place, his arms/head don't move around?
wink, the demo works for me.
Calintz, check your other scripts; one of them might be conflicting.
the thing is, that this one small 48-line script is THE ONLY CUSTOM SCRIPT IN THE DEMO. So... wait, are you using PKE or some other version of RMXP?
i like this script i just wish i could had a good idle pose to have.
p.s im haveing no problems yet with it
No!! The DEMO works perfectly, but the script is not running correctly in my game...
It is probably conflicting somewhere, but I don't know enough about scripting to check...
Besides, this wasn't a key feature of the game, soI can live without it, but I kinda wanted it.
tell me what scripts you are using, and I'll tell you the conflict, I might be able to help fix it...
I am using these scripts...
- Minkoff's Animated Battlers
- Arevulopapo's Worldmap
- Ccoa's UMS
- Blizzard's Tons
- Blizzard's CMS
- Blizzard's Chaos Rage System
- Blizzard's Artbook Viewer - Custom script he made for me
- Moghunter's Title Screen
That's it...
I can't really see why there is a confliction here...
Maybe with the WorldMap as it resizes the charaset and what not...
its either Worldmap, or Tons. Most probably Worldmap if it resizes, and the lazy coder guy decreased its compatibility. Send it to me, and I'll see if I can make it compatible
EDIT: better yet, upload your scripts.rxdata
Like send it through like Sendspace or something??
sure
I sent the link in the Shoutbox...
ok the conflict is with Tons part 1. The caterpillar is doing it. Let me see what i can do...
Are you using caterpillar?
no I am not using the caterpillar effect...
ok, I was going to have you take it out, but I have a better solution:
go to line 2677 in Tons part 1 (DEAD_DISPLAY = 1) and change the value from 1 to 0. Then you are done! (lol)
Wait...are you serious, Lol??
Will that allow me to have full function ability of both scripts??
yes, it just wont show ghosts in caterpillar anymore, but I don't think that will be a problem :)
Haha, not at all!!
Thank you very much, this is working perfectly now!!
Final version of the script, for anyone who wants it:
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# With idle sprites. name the idle sprites the same as their normal ones
# except with '_idl' on the end (before the extension)
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :character_name_org # original character file name
attr_reader :current_sprite # current sprite suffix
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias initialize_idlesprites_before initialize
def initialize
initialize_idlesprites_before
# set original character name
@character_name_org = @character_name
# set current sprite
@current_sprite = ""
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias update_idlesprites_before update
def update
update_idlesprites_before
if @character_name != ""
if moving?
if @current_sprite != ''
@step_anime = false
@character_name = @character_name_org
@current_sprite = ''
end
elsif Input.dir4 == 0
if @current_sprite != '_idl'
@character_name_org = @character_name
@step_anime = true
@character_name += '_idl'
@current_sprite = '_idl'
end
end
end
end
end
This is the same version as the one used in your DEMO, correct??
yes, just so that people don't have to download the demo if they don't want to.
Good choice, and you will be added to my projects special thanks and script credits in 2.5secs...
Thank you Winkio...
So does that mean this topic is finally resolved? If so, Calintz you should add a [Resolved] Tag. :P
Why am I not doing it? Because I know you're a big boy Derek. :)
This script is extremely useful to have, I know that for a fact. Though I also know someone evented something like this...but hey, scripts are cool. :x
Haha, I forgot to add the resolved...I'm sorry StarrodKirby!! Right now =)
I for some reason never touched this feature. *powers up winkio*
@winkio: You should post this in the scripts section or request Bliz to add it to Tons. Good job :)
Ton, tons, tons!!
That would be great, because then maybe Blizzard would make it 100%compatible with the caterpillar script!! =)
Ugh, I don't want to go through all that trouble for 48 lines right now. Especially when I'm desperately trying to finish the intro of my game, since I got behind schedule over the weekend :(. I will sometime soon, though.
Haha, okay ;)
This is a massive gravedig, but someone messaged me on discord about fixing this script to be compatible with caterpillar ghosts. I updated the script and put it in it's own thread here: https://forum.chaos-project.com/index.php/topic,16211.0.html