Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Custom Animation

I'm using this pixel movement script which supports custom animation, viewtopic.php?f=11&t=624&start=900&hilit=Pixel+Movement

In the Readme it has variables that has the no. of frames for the player/event objects but the animation still goes back to "1" when you're walking, I was just wondering if there was a way to remove the "idle" frames when a player is in motion.

Directly from the ReadMe.
Graphics: 8-Directions / More frames (optional!):

Hero and All events can move in 8 directions (= also diagonal movement is possible)

Important: Make your Character Graphics like this: (for 8dir-Sprites)
1. Left-Down
2. Down
3. Right-Down
4. Left
5. Right
6. Left-Up
7. Up
8. Right-Up
if you use 4dir-Sprites the order is like normal

if you want a different order use this:

$pixelmovement.direction_order: contains the order of the direction frames, length has to be 4 or 8
Example/Standard: $pixelmovement.direction_order = [2, 4, 6, 8] (means Down = 1., Left = 2., etc..)

$pixelmovement.frame_order: contains the order of the frames
Example/Standard: $pixelmovement.frame_order = [1, 2, 3, 4]

$pixelmovement.stand_frame_order: If this array isn’t empty, a special frame (or even a whole animation) is used for the standing animation. If there is more than one stand frame step anime will be activated automatically. Step anime will use the stand frame order if it includes more than one element.
Example/Standard: $pixelmovement.stand_frame_order = []

For the player and caterpillars special settings are possible through changing these variables:
$pixelmovement.player_frame_order
$pixelmovement.player_direction_order
$pixelmovement.player_stand_frame_order
(only used if != nil)

It’s also possible to use special settings for some Events, just add a comment similar to these ones at the beginning of the first event page:
Frame Order: 2,3,4,5,6,7,8,9
Direction Order: 1,2,3,4,6,7,8,9
Stand Frame Order: 1
(Examples, you can also only set the Directions, etc..)

$pixelmovement.frame_speed: The frame speed of the events (1.0 is standard)
$pixelmovement.player_frame_speed: The frame speed of the player (1.0 is standard)
$pixelmovement.stand_frame_speed: The stand frame speed of the events (1.0 is standard)
$pixelmovement.player_ stand _frame_speed: The stand frame speed of the player (1.0 is standard)

You can also add a comment to an event to change the frame speed, e.g.:
Frame Speed: 1.5
Stand Frame Speed: 1.5

$pixelmovement.movement_type: Can be 'dir8', 'dir4', 'dir4diag' and 'dir8diag'
(8 directional movement, 4 directional movement, only diagonal 4 directional movement,
8 directional diagonal movment (normal and diagonal movement have been switched))
 
If I understand you correctly, you have either a 5 or 9 frame animation, with the first frame being the 'idle' pose?

It looks like you should set $pixelmovement.frame_order = [2, 3, 4, 5] (or [2, 3, 4, 5, 6, 7, 8, 9])

and, if necessary $pixelmovement.stand_frame_order = [1]
 
Ah, I figured the problem, the stand_frame_order wasn't set to [1] I tried just = 1 and got an error. Thanks, I need to start learning ruby... How hard can that be? I'm pretty damn good at C#, GML, delphi, and C++. I'm okay with javascript.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top