Freedom - Ghost Dash
This is a sample dash effect that I wanted to share!
It does not end until you set the dash timer to 0 or use a toggle to change when to use the effect!
Object needing the dash effect:
Create:
// timer you pass into the dash effect function
dash_timer = 0;
// The amount of time in frames to know how long until creating another effect
time_for_effect = 10;
Step:
++dash_timer;
create_new_dash(time_for_effect);
create_new_dash function:
// This function will take the dash time, and when the dash timer is a multiple of the time for effect, create a dash effect
// White is the default color and displays the sprite normally
function create_new_dash(time, cols = c_white) {
if (dash_timer mod time == 0) {
// Can also use a with statement
var dash = instance_create_layer(x, y, "Instances", obj_dash_effect);
dash.sprite_index = sprite_index;
dash.image_index = image_index;
dash.image_angle = image_angle;
dash.image_blend = cols;
}
}
Dash effect object (obj_dash_effect):
Create:
image_alpha = .8;
fade_amount = .05;
Step:
// Fade out as long as the image alpha is above 0
if (image_alpha > 0) {
image_alpha -= inc;
} else {
instance_destroy();
}
Available at: itch.io, moddb.com, indiedb.com, and the official website!
Get Freedom
Freedom
Break free from boredom!
Status | Released |
Author | eleferret |
Genre | Platformer |
Tags | 2D, Cats, Controller, Dogs, GameMaker, Indie, Minimalist, Pixel Art, Short, Singleplayer |
Languages | English |
Accessibility | Configurable controls |
More posts
- Version B Release!May 26, 2023
- Soundtrack ReleaseJan 14, 2023
- Freedom - ReflectionAug 24, 2022
- Freedom - ParallaxJul 11, 2022
- Freedom - Best PartsJun 20, 2022
- Finishing a 2D Minimalist Platformer With Game Maker 8.1 to GameMaker (Studio 2)...May 27, 2022
- Version A.1 Release!May 27, 2022
- Version A Release!May 20, 2022
Leave a comment
Log in with itch.io to leave a comment.