origin

  1. P

    [solved] Moving Platform, reversing direction

    I'm trying to do my moving platforms with an x (and y) origin point and destination point and have them flip direction at each end. Have tried these two codes but it doesn't reverse direction. if (horizontalMove) { if(x < xDest) x += hSpeed; else if (x > xDest) hSpeed =...
  2. Z

    Asset - Demo Now released! Pixel perfect sprite rotation around any pivot point

    I really hope this helps people, I worked hard on this one to figure out all the math, and make is as simple and as elegant as possible. This is very readable, compact, but incredibly powerful when it comes to rotating sprites. https://marketplace.yoyogames.com/assets/8364/sprite-rotation-toolset
  3. B

    GMS 2 SOLVED: Sliding under low ceilings/barriers in platformer: collision problem

    I've given my player in a platform game a slide attack, and it seems to be working pretty much how I want it to in regard to using it to attack enemies. I'm using the following player state script: x = x + hsp; y = y + vsp; vsp = vsp + grv; //Horizontal Collision if...
  4. FacesOfMu

    GML Isometric RPGs: Tiles and Sprite Origins

    I'm not sure if this should be posted in Programming or Game Design threads. I'm wondering what the norm is when it comes to deciding the origins of sprites for an isometric RPG? I've got sprites that will be drawn in both inventory and in the room grid. When they're in the room grid, I need...
  5. Suzaku

    GMS 2 Origin: midle centre or bottom centre?

    Im makinng a platform game with a bit of fighting game style, and I wonder which origin is the best for this kind of game. Im asking specifically for moments like when changing sprites when doing moves, and positioning objects, etc.
  6. Hudsonius

    Easy way to edit multiple origins at once?

    So all my original origins were centered, but as I started doing shading, I realized bottom centre would work a lot better. Is there any easy way to manipulate all these objects? (I have hundreds) I've tried using sprite_set_offset(sprite_index,x,y=16); and selecting the groups of objects I...
  7. J

    GMS 2 Weird error

    Hey guys! My error is very weird. Here a screenshot: The problem's, that var origin_x = sprite_get_xoffset(sprite_index); var origin_y = sprite_get_yoffset(sprite_index); doesn't work.. That did a friend for me, I have no clue, what that means. Please help me and maybe explain to me. (sorry...
  8. B

    Help with sprite and jump through platform!

    Hi guys, I got a few problems with my character's sprite and the platform. First of all, the platform can be jumped through by the player when it is under the platform. Secondly, if the player has stood on the platform, the platform's mask index changed into 1. Also, note that when I first...
  9. G

    Drag And Drop [SOLVED] My bullets aren't lining up with weapon direction/angle

    Hello guys! Maybe yall have the answer to this, I've tried a variety of things but it still doesn't work :/ [GMS2] My obstacle: I have 4 sprites trying move together at all times. Legs-Torso-Rifle-Bullet (2D side view perspective) My torso should follow/rotate wherever my mouse is located...
  10. L

    A way to dynamically change object origin to match sprite in animation?

    Greetings, My first forum post in over 10 years <3 I'm building a game and was unable to find anywhere on the internets how using gml we could move the Origin (+) that is defined in a sprite which contains a series of image indexes to be consistent with the animation when played(to have origins...
  11. Geners

    Flipping sprite on Xscale with origin at 0,0

    So I decided I didn't want to change my origin to the center in order to flip an image and have it stay in the same position so I said "I will just write in the adjustment post xscale flip" WHAT A RIDE Can someone explain this to me? So my original idea is that if I moved left I would...
Top