1. Storm1208

    GMS 2.3+ [Solved] Grid Generation Code Not Printing All Lines

    Hey all! I've been working on some grid creation code and I ran into an issue with it last night. I've been trying to fix it for the past day but I haven't had any luck. The code is supposed to generate a 5x8 size grid within the screen (not based on the room's height and width, but within a...
  2. E

    Remove line breaks from string

    Hello, how would you remove line breaks from a string? So that it goes from this: Hello World. to this: Hello World.
  3. Lens

    GMS 2 Need help retrieving (reading) data from ds_grid

    Hello! I'm making a tile-matching game (Tetris). After a piece fall down and collides for a second its' underneath collision rectangle, it creates "Dead tiles" so to say ( gets converted into 4 "dead" objects). //In one of the pieces Triggered alarm if collidedU = 1 { global.Morph = 1...
  4. Morkinas

    GML [SOLVED] Draw line alpha

    Hello, so i need to draw line with 0.5 alpha, but I guess I can only add the fade point so it starts with alpha=1 and fades to my set value 0.01 in this case. I need to set start and end alpha to 0.5 Draw Event var dir = point_direction(x, y, mouse_x, mouse_y); var d = 1800; //Hitscan for(var...
  5. FactorX12

    Drawing Curves in GMS2

    Hey all, I have searched and searched for some type of script that draws a curve using an x1, x2, y1, y2, and a beginning angle. I saw one for GMS1 posted 9 years ago, however, despite this I tried it (because why not?) but it obviously didn't work. If anyone could offer some sort of script...
  6. 0TastyPie0

    GMS 2 Drawing a line that then becomes solid for other physics objects

    I'm working on a marble run type game, were the player can draw lines for the marble to run down. I use fixtures to setup and draw the line, however other physics objects (such as the marble) seem unaffected by the line. They simply pass through it, when the line is suppose to act as a wall...
  7. zampa

    GML Opinion on my line tile collision function

    So i wanted to create a function that checks for tiles using a line, i came up with this: /// @function tile_line_collision(x1,y1,x2,y2,tilemap_id) /// @description checks for collision with a tilemap using a line /// @description it returns true if it finds some collision with assigned tilemap...
  8. RobotoSkunk

    GMS 2 Activate instances in a line

    How can I activate instances on a line? Because I've searched everywhere and I can not figure out how to do it ... I was thinking of using a "collision_line_list" but that gets bugged and the game does not start when implemented. (I used Google traslator, sorry).
  9. Suzaku

    GMS 2 Cant bookmark line in code blocks

    I found the bookmark feature on GM2 today but it doesnt seem to work well for me, I press ctrl+shift+1 on a line of code but it only bookmarks the window and not the specific line. Why that happens?
  10. H

    GMS 2 Line -1 of step event in event handler?

    Hi there, noob here. I'm working on a school project (final fantasy styled game) and this error happens on irregular intervals: ___________________________________________ ############################################################################################ FATAL ERROR in action...
  11. Warspite2

    GMS 2 draw_text with # to line break [SOLVED]

    draw_text (x,y,"this is confusing#anyone have an idea?"); Ok in gms 1.4 this would work. So what is the magic in gms 2 to simply get text to print on a second line, in other words a line break? I seen something about this I just don't remember where. I have dug around the manual and can't find...
  12. S

    Tile Collision Line?

    I need to code a collision line for tilemaps, and I’ve been tearing my hair out all day trying to figure out how. I basically just need to define two points (x1, y1, x2, y2) and get each tile that the line overlaps, but despite being decent enough at GML I can’t seem to understand everything I...
  13. T

    Over Under Line

    Is there any way to check if an object is over or under a set line? I'm needing this for an isometric game so the starting y and x are different from the ending y and x. I know how to use collision_line but I need to check if the object is above or under that collision
  14. Ayziak

    GMS 2 Question regarding drawing (primitive) lines at true resolution..

    So to cut right to the chase, my game/view/everything is run at 360x200 pixels for pixel art, and scaled up by resizing the window. What I was wondering was if there was a way to make drawn lines (specifically using the draw primitive feature) show at the same resolution as everything else...
  15. N

    Help with coding an aiming system

    In some games there is an aiming system consisting of a dotted line and an icon where a given projectile would land (most common in tank or golf games). The dotted line is my focus here, though. When aiming a projectile, I want to have a set number of dots in the line that compact as the shot's...
  16. B

    Question - IDE How to use the new features in the room editor?

    From the release notes for the lasts update: "Room Editor: Rectangle, line and fill tile tools added (these do not yet do auto-tiling)" First of all, this is great! The thing that I disliked the most about GM:S1 was that I needed to work with Tiled or...
  17. U

    Legacy GM making objects move in a straight line

    Hi guys, I have an obj_player which creates a obj_rope then he follows it around. when he is not in collision with the rope he falls that's good so far, the problem is I can't get it to stay ONLY on the rope after it collides with it because i use direction = other.image_angle; to move him...
  18. Samuel Venable

    [SOLVED] Dynamic Timelines

    This is the first time I recall the need to dynamically create a timeline in GameMaker: Studio. The problem is I want to create at random moments a new instance (with 55 * room_speed as the max), but instead of creating them all at different moments, they are all created at moment (step) zero...
  19. B

    Legacy GM [HELP] How to draw line on mouse move that have a physics

    Hi everyone , for past two days i was searching about this thing and i find nothing :( ( WHAT I NEED IS to draw a physics line by mouse to walk on it by my player ) for example the RED LINE in this image please can you help me guys
  20. A

    Draw a line between two objects and get the angle

    Hi, im actually creating a 2D game when the player needs to use a sword, to simulate the attack i thought in making 2 different objects (player body, player hand) then i could draw a line from the center of the player to the center of the hand, and use that line to set the angle of the sword the...