hspeed

  1. Zabicka

    GML Consistent movement using hspeed and vspeed

    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...
  2. FoxyOfJungle

    SOLVED PATHS: Get hspeed and vspeed of an instance ??

    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...
  3. MartinK12

    GML [SOLVED] Basic platformer hsp move randomly switching values when player changes direction of move

    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...
  4. G

    GameMaker (solved) hspeed=0 equivalent for diagonal?

    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.
  5. C

    GML WITH THIS PROBLEM ALL THE DAY!

    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...
  6. N

    GameMaker GameMaker Background Layer Unclear...

    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...
  7. S

    (GM8.1) Making character react on conveyor belts correctly.

    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...
  8. JAG

    GameMaker Modify background layer properties in code

    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...
  9. RyanC

    Legacy GM How to ensure player has time to jump over a block

    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...
  10. D

    Legacy GM Question Regarding Sprite Collision and Corners

    (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...
  11. C

    Android (Help!) Implementing hspeed & vspeed in Android

    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...
  12. Ziberteck

    Please delete

    Please Delete
  13. S

    GameMaker custom physics help

    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...
  14. S

    GML stop hspeed of background

    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...
  15. A

    GameMaker The simplest thing isn't working...

    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...
  16. N

    setting vspeed/hspeed upon instance_create

    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...
  17. H

    Legacy GM [SOLVED] Help setting background hspeed by code

    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...
  18. C

    Moving objects at same hspeed

    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...
  19. A

    Legacy GM Issues with detecting hspeed/vspeed..

    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...
Top