I'm trying to figure out how to smoothly move an instance with hspeed and vspeed variables, which I roughly figured out, but it doesn't work exactly how I would like it.
The issue comes when the instance tries to move diagonally, it's speed suddenly skyrockets without any warning. How can I fix...
Hello,
I'm trying to acquire the vertical and horizontal speed of an instance in which is using a path, but apparently there is no way to do it...
I just did this:
CREATE EVENT:
my_path = -1;
alarm[0] = 2;
STEP EVENT:
// hspeed and vspeed
hsp = x - xprevious;
vsp = y - yprevious;
ALARM 0...
I use below super basic platformer move code in my on_ground state in user_event_0.
Simplified version of my code related to this problem:
key_left = keyboard_check(ord("A"));
key_right = keyboard_check(ord("D"));
var move = key_right - key_left;
hsp = move * move_speed; //move_speed = 4...
How would I do the equivalent of hspeed=0 (leaving the vertical component of speed intact while killing the horizontal component) to kill speed in one diagonal direction without affecting the other diagonal? Thanks.
Well, the first thing I say (in addition to my bad English), is that I'm using GameMaker 8.1 Lite. Why? Well, because years ago I had obtained this version and was already somewhat accustomed to its interface, I have also GameMaker 2, but I still do not get used, as I saw that YoYo games no...
I have a background layer called bg_random.
But this code:
randomize();
var lay_id = layer_get_id("bg_random");
var back_id = layer_background_get_id(lay_id);
global.backgr=choose(bg_regular,bg_dark);
layer_background_index(back_id, global.backgr);
doesn't work.
Nor does this work...
A little bit of explanation before. I have my character who goes right automatically but he can go on Conveyor Belts that makes the character slide slowly to the direction it is going. I have four variables (left,right,up & down) that are used to handle this (if up is on 1, all character's...
Hi I want to be able to change these:
in my code. Specifically the Horizontal Speed property. Apparently GMS1 had a variable for this (background_hspeed) but GMS2 does not. I can't use the regular layer hspeed function because this is a _background_ layer and I need the image to wrap. Also I...
Hi Guys,
My game is a one-touch infinite runner with variable hspeed which I think is the cause of the problem.
I've recently been having a bit of trouble where my player lands too close to a floor block to be able to jump over it in time.
Is this going to require ballistic trajectory?
Any...
(Placeholder Doom sprites)
I have many different types of weapons. Some have knockback, one even pulls the enemy closer, enemies can fall off ledges, etc. In my game, the enemy can FALL vertically down, and even have horizontal speed as well. Thus, falling down at an angle or slope.
Many...
So I've began making another version of my game for android that I can play on my phone and share with a few friends, but whenever I play the game my Up and Left buttons dont work. I use Hspeed and Vspeed, and it would take me a while to redo the collision code for any other type of movement...
can somebody help me with my custom physics?
I need to convert length and direction to length_x, length_x and direction_x, direction_y and back again
this is what I have so far
/// Create Event
// Directional movement
max_vel = idle_maximium_speed
vel = idle_minimium_speed
dir...
Hi
how can I stop the horizontal speed of a specific background in the room?
On the official Website they use this code: background_hspeed[0]
but this one seem not to be usable anymore in the latest version.
I have Backgrounds_1 in the room with a hspeed of -2 and want to stop this on a...
Idk, maybe I've been staring at this for too long, but this code should work, and it doesn't.
if hspeed = 0 and vspeed = 0
{
sprite_index = SPR_PlayerStatic;
}
The weirdest part is that my problem is that when I hit a wall, the animation continues, however when I lift the walk key...
Hey all!
So I have a few different spawning objects.
I would like to set a certain vspeed/hspeed for the instances created by the each of spawning objects.
For example an instance created with obj_spawner_a would have a vspeed of 1, but if that same object was instanced through obj_spawner_b...
I have an object that draws parallax backgrounds. I used the following code in the draw event of the object:
draw_background_tiled(gradient1, view_xview, view_yview/1.22);
draw_background_tiled(clouds1_back, view_xview/1.01, view_yview/1.22);
draw_background_tiled(hills1, view_xview/1.14...
Hey gang,
My game is composed of three background objects: rocks, trees, and blossoms. The blossoms are separate objects because enemy blood splatters against it. Initially, the player object moved across the level. Now I've given the background objects a global hspeed to give the illusion of...
So I've recently started a new project, and I’ve decided that this time I’m going to do it right. In past, I’ve used the key press events to change an object's animation to the walk cycle, however it was always buggy. This time, I was planning on testing the hspeed and vspeed values to change...