1. 2

    Legacy GM GM8 Code Equivalent of Angle Difference Function in Studio

    I am testing porting some Studio code to a GM8 project. I've mostly got it working except I need to replace the Studio function "angle_difference(ang1, ang2)" with code that does the same thing. What code would return the same result as it?
  2. M

    Object Speed Relative to Direction

    I'm creating an explosion of instances that start at a center point and move outward. I set the direction to random(360) and a speed of 20. The instances spread out in a even circle from the center at the same speed. I was wondering if its possible to set the Speed relative to the Direction so...
  3. markswinimer

    Repeating Background at an angle

    Hello, new to the forums and GMS2. I'm working on a mobile game prototype where a background scrolls as the player walks and kills/encounters more enemies. I've found the option to use horizontal tile settings, and also background_hspeed which would both work, except my background is angled and...
  4. I

    GML How can i change the sprite angle of the enemy when he's falling (<3)

    So, i making a game plataform and my enemies can walk on objects and fall. However, I would like that while they were falling, change their angle (to be more realistic) and when it touches the ground again, stay with the same starting angle. This is the code i was using: //gravity system if...
  5. GapingPixel

    GMS 2 How to implement Spine Inverse Kinematics

    So I want to implement a Spine animation with this behavior, but I can't find a function for IK. The only thing that seems close to it is the function "skeleton_bone_state_set" which lets you set the angle of a bone, but that would only work for a bone. This is a very essential animation...
  6. Z

    Game Maker 8 Drag and Drop P-Angle and Radius, object follow

    Hi, I remember that you could make an object stick to another following it with those variables, also spinning around it only changing some values in the step event. I remember all you had to do was establishing 2 variables in the create event and then two actions in the step event. Please help
  7. J

    (Solved)Rotate Player movement with camera view rotation

    So atm i can rotate the camera and the player matches the camera angle, im trying to add/subtract the angle of the camera view to the movement code of the player. if i rotate the camera 180* and move the player up, it will actually be moving down, because its not taking into account the...
  8. Qlak

    GML [SOLVED] Efficient Angle Check - 359 and 0 degrees

    Hey guys! I'm having hard time when it comes to checking angles. I managed to achieve what I wanted, but I'm sure that there must be a better way, because my code is not clean for sure. Maybe you could help me out :): -For instance, imagine that you have traditional top-up 2d shooter, left...
  9. Qlak

    GML [SOLVED] Lengthdir Problem - Elements not moving properly in circle. X and Y don't match Sprite Origin.

    Hello! I'm having trouble with (probably) lengthdir. I spent so much time on it, but I just can't figure out what I am doing wrong. I thought that maybe someone can give me the reason this is happening. Basically I was trying to draw circles in front of the character, as hands and I used...
  10. sinigrimi

    GMS 2 changes in the angle of the collision mask (rotation of the collision mask)

    can i change the angle (rotate) the collision mask? or do i need to change all sprites? :( screenshot below
  11. mbeytekin

    Skeleton World Rotation to Local Rotation conversion

    I'm searching for this for a while but I couldn't do yet. In original Spine Runtime there are some functions to do this.But I can't do with gamemaker. I want to make some procedural animations like exploding bodies etc. I have a standart human skeleton. I calculate virtual points for each bone ...
  12. Bulldrome

    2D Turrets Firing Angle

    I'm working on a 2D platformer and one of the simple hazards I want are turrets that will fire at simple 45 degree angles (8 cardinal directions). I have it working now but I feel I did it in the most sloppy way possible. I have separate objects for each turret angle but I also have separate...
  13. mar_cuz

    Design What Games Use This Projection

    Hi guys, What other games use this type of projection? I know earthbound, divine divinity and even the cool looking sock sock goes pop pop on this forum use this angle. Also, some platformers also use this style though I am looking for top down rpg style games that use it. Thanks
  14. Edwin

    How to find the angle of nearest point where the object is not colliding with other object?

    Hello, people. How to find the angle of the nearest point where object will not collide other object like in Super Mario Maker, where if you put player inside the block, he will be pushed away from it. How to perform it? For example, if the first object spawns in the same place as second object...
  15. sv3nxd

    GML [Solved] Reflection Formula

    Sooo ... I had a game-idea where you could draw straight lines/walls with your mouse, which can bounce back projectiles. I first thought the code must be simple but I'm losing all patience after trying and trying, but not getting any results. I have ... - angle of the surface - angle of the...
  16. PlayerOne

    GMS 2 Bullets angle when player is moving

    Title says it all. I'm trying to get the player to shoot properly but the bullets keep moving at angle everytime the player character moves. Trying to make a metal slug style system where you shoot 4 ways. Any help is appreciated. I'm sure it's something simple I'm overlooking. var _xx=0 var...
  17. Daniel Mallett

    GMS 2 draw_sprite_general rotation

    I'm using draw_sprite_general. It works fine when its not rotated, but as soon as you rotate it the left, top, width, height is also rotated. The links below show a screenshot of both rotated and non rotated versions. This should make it much clearer. (Not Rotated)...
  18. S

    GMS 2 [Unsolved/Closed] Rotate Around Center Using draw_sprite_general

    I want to draw a gun sprite and have it look towards the mouse. So far the rotation is based around where the drawing is made which is the top left. How can I make it rotate around the center of the drawn image using draw_sprite_general. I know using draw_sprite_ext fixes this but I would like...
  19. M

    Bullet ricochet

    Hey everyone, I am working on an project with a bullet ricochet. I tried it my way, but it worked only on the x collision. I can't see the problem. Here is my code: if(place_meeting(x, y, oCollision)) { if(spd > 10){ direction = 2 * (direction - direction) +...
  20. V

    GMS 2 Help with simple 2d camera rotation

    I’m building a game where the player should be able to rotate the camera and the gravity will shift to the new orientation. But I’m having some problems with my rotated camera. My room has a viewport of 320x240 px (20x15 tiles) Viewports are enabled. My camera object in the room is setup like...