If you want an animated tileset, ...don't ask me, I don't know :/If you want to animate, say, something like a character graphic (which has frames stacked together and you want to use those frames the way you like), you need a sprite,@da_sprite = Sprite.newYou need to set the bitmap to the graphic@da_sprite.bitmap = RPG::Cache.picture('Charset_experiment')

Then, you need to keep changing the source rectangle (src_rect) to suit your needs, like this:

@da_sprite.src_rect.set(x, y, w, h)

where x and y are the coordinates of the top-left corner of the required rectangle, w and h are also obvious. You might want to check the 'update' method of the class 'Arrow_Base' in the default scripts. There, the battle cursor blinking is done in the same way. The spurce rect is changed every 8 frames. You can get a clear idea.

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

@menuactor is supposed to be a sprite, not a number. src_rect is a property of a sprite, not a number (the 'Fixnum' roughly means the numbers class). You use another variable to control the counter, like @count or something. It should be like this:

>> I've been tinkering with this script snipplet for some time now, and I still haven't been able to get it to work, is it because I'm trying to use it in a window, which is constantly refreshing itself?? The Arrow_Base doesn't have a single refresh methos in it's coding...

Is it possible to call an @"whatever" from a different class, so long as they are in the same script??

For reference, say I just wanted to sexperiment with this snipplet, where would I use it?? In a window, or a scene or what?? Where does this code go??

You can have animated autotiles like the water tile. And how about using events to animate stuff like flowers. A fully animated tileset could be possibly made by modifying the tileset swap script. In any of those cases the lag would increase pretty much.

QuoteI've been tinkering with this script snipplet for some time now, and I still haven't been able to get it to work, is it because I'm trying to use it in a window, which is constantly refreshing itself??

So you see? The 'update' method is called every frame, that is, 40 times per second. That's why in every scene, most of your code goes into the method 'update'. Now let's say you've used your code in a window class named Window_AnimChar. That is, you've defined a class Window_AnimChar, and defined the update method as in the code (changing the rect). Now you've initialized (or 'created') this object in the scene, say Scene_Menu, like this in 'main:

Now unless you update this window in the scene's update, it wont be updated. So in the scene's update method, you add this:

@char_win.update

So now, since the update of the scene is 'called' every frame, all the code gets executed all the time. And You called the update of the window (@char_win.update), so even that gets updated every frame. Get it?

Tip: None of the followin methods are in-built into the RGSS dll, you can change how everything works and you can see how everything works unlike built-in functions.

1. main2. update3. refresh

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