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.

more frames/standframes and movement-system

Puck

Member

Hello there ^.^
This is the first script I made and I want to share it with you although I'm not sure if it is useful.
The reason is that there are scripts out there which got similar functions...
but my script combines some of them. I mainly made this script because I wanted to practice,
so feel free to point out my mistakes.

what it does:
  - allows you to set the number of frames, standframes and directions for each character-graphic
    by adding a short string to their name
  - you can set default values so you don't need to edit every file
  - you can choose 1 or more (animated) standframes which will only be shown while standing still
    and are NOT used for the move-animation
  - you can adjust the stand- and move-animationspeed
  - you can activate 8-directional movement


 
  • just place it above main and below the other scripts
  • you can set up as many frames as you want for heros and events by adding f[n] to the name of their charactergraphic
    ("n" stands for the number of frames)
  • you can set the directions for each charactergraphic by adding d[n] to its name ("n" is the number of directions and has to be 4 or 8 )
  • you can set standframe(s) for your charactergraphic (which is/are only used if you don't move) by adding s["n"] to its name
    ("n" stands for the number of standframes)
  • you can set default values for frames standframes and directions so you don't need to change the name of every charactergraphic
    just edit "DEFAULT_FRAMES", "DEFAULT_STANDFRAMES" and "DEFAULT_DIRECTIONS" to your needs
  • you can activate 8-directional movement by setting "EIGHT_DIRECTIONS" to "true"
  • if you set "STANDANIMATION" to "true" and a charactergraphic has more than 1 standframe, it will be animated if it doesn't move.
    the standframes will NOT be used for the move-animation
  • you can change the standanimation-speed be changing "STANDANIMATION_SPEED". the number means how long each             
    frame will be displayed, so a smaller value means a faster animation
  • you can change the "MOVEANIMATION_SPEED", a smaller value means a faster animation (does NOT affect the movespeed).
    most likely you will not need to change this because the animation speed is automatically increased if a graphic has a lot of frames

compatibility:
  - most likely not compatible with other movement systems and scripts that change charactergraphic

script & demo:
Script as a ".txt" file
Demo Project

edit: I had to remove the script because it was too long... you can copy it from the demo project or download it as a .txt file
 
man, you may need to close the spoiler and code tags like this...
Code:
you just need to include the same tag you entered at the beginning plus a / symbol preceding the code and spoiler words inside the brackets or braces, of course.
is it cut off? mmm, maybe... wait a minute... yes, it's cut off since the Game_Player script you posted at the end is cut off...
 

Puck

Member

hmmm... I pasted my script into prexus ABS demo and it seems to work for NPCs and enemies.
You can use a graphic with more frames for your hero too, the only problem is the battle part.
all your ABS graphics need to have 4 frames (NameABS, NameABS-atk,NameABS-cast,NameABS-hit) otherwise it doesn't work right.
but I'm sure you could change that...
 
If you find a way to change that, let me know please.  I'm trying to make a Zelda game, and this is actually one of the things I needed for the graphics to look right.
 
Wow. This is amazing... I requested one like this a few years back... and now it's done! No need to hammer the "Script Request" forum any longer (not that it did much good anyways...:)).

Will try the demo, and will definitely reply back.

Atemu said:
I'm trying to make a Zelda game...

*gasp!*  :eek:
 

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