1. T

    GMS 2 [Solved] Camera zooming focussing on 2 objects.. An attempt was made.

    Edit: This is solved. There was a mistake in my code I didn't see until I took a break. I can't seem to delete the thread. Sorry. Good afternoon, everybody :D I have a single-screen 2 player game, with a play area of 9600 x 5400 where two people flying around planes and shoot at each other. I...
  2. csanyk


    I'm trying to write to a file, using this code: var level_data_file = file_text_open_append(working_directory + "level_data.json"); file_text_write_string(level_data_file, level_data_string); file_text_writeln(level_data_file); file_text_close(level_data_file); I am drawing the text...
  3. R

    Legacy GM Problems with if statements

    I have a set of if statements that are not executing like it should. The player name starts as an array of 9 characters due to an algorithm that will do something based on math done on the asni char values of the characters. The array is then put into a test string and checked. The set of code...
  4. Online Handle

    Windows [SOLVED] CPU hovering around 90% when using GS2

    This has been a problem since I purchased the software a few months ago. I figure I'd give it time, hoping that an update would fix the issue. Still nothing, so I'd figure I'd post a thread here about it. When GS2 is the primary selected window, it ramps up its CPU usage to around 90%. When...
  5. G

    [SOLVED] Image_index won't change because of draw event

    Hey, guys, I've tried various solutions and searched the web. It seems like the solution must be pretty simple, but now I'm ready to turn to the forum. As the title states, the image_index will change at a mouse click, but when I add the draw event, the image_index won't change. Here is code and...
  6. MudbuG

    Windows [SOLVED] Sprite is non-existent, object not visible

    editor version: runtime version: added a sprite by dragging an image into the IDE. Created an object assigned sprite to object drag object room run -- object not visible. Next, I added draw event with draw_self(); I get the following exception...
  7. A

    Legacy GM [SOLVED]tile_get_ids() Issues with instance_position objects that are drawn with tiles.

    Greetings! Thank you for taking the time to look at my post. First time posting as I have been struggling with the same issue for the past 3 days now. My project level is randomly generated and I'm currently adding colliders on to tiles to prevent my player object from leaving the...
  8. T

    Problem passing shader uniform

    I'm having a problem passing a shader uniform. Here's my fragment shader. // // Replaces brightness with a varying amount of green. // varying vec2 v_vTexcoord; varying vec4 v_vColour; const vec4 weight = vec4(0.2125,0.7154,0.0721,0); const float positive = float(0.5); void main() {...
  9. T

    Shaders Where to begin with shaders?

    Hello, I'm gonna try something simple for starters, writing a shader that turns the whole sprite black, and another that turns the whole sprite white. However, I don't even know where to begin. Where can I learn how to use shaders?
  10. K

    GML [SOLVED] Passing id of creator object to created object

    Hi, how are you all today? tl;dr version: Is there a way to let a created object know which instance created it, so i can keep it aligned with its creator's x,y, (to do the x,y, matching in the created object's code rather than doing this alignment in the creating object's code)? Long version...
  11. mather12

    GMS 2 [SOLVED]My sprite image would be twist with the change of the view position

    I don't know what's the reason,the sprite image would be twist with the change of the view position.
  12. Brenden

    Legacy GM Object depth drawing[Solved]

    I have a game where objects are in a room and have no draw code but are visible with a depth of -1. Now I have a separate object that basically controls my whole game. That object is drawling a HUD and some other stuff at the set depth of the object at -20. So all the drawings are higher up then...
  13. L

    GMS 2 Solved: Moving in the direction obj is currently facing.

    Alright, so being a dumb dumb, and not really having alll the much experience programming in general....I have a question. I have attempted to find an answer, but the closest I could find was related to using your mouse and moving in that direction...although I may have missed something.... In...
  14. T

    Drawing holes in shapes SOLVED

    Greetings, I'd like to draw a crosshair composed of the area sandwiched between two rounded rectangles. I think the easiest way to do this would be to draw two rounded rectangles, and make the inner one transparent, a cutout so to speak. What's the best way to make this happen? With the draw...
  15. T


    Hello, does anyone know the workings of collision_line? I need a line_in_rectangle collision, which is egregiously missing from the functions. I need to be able to check if a line collides with rectangles, but I can't just have an instance everywhere I need to look; I'm going to be using...
  16. mather12

    GMS 2 【help】Why it pop:"Unable to find any instance"

    I can't solve this problem, I don't even know how it happened.Please someone help me. hello?
  17. MagnumVulcanos

    GML [SOLVED] event_perform_object() need help

    event_perform_object(object,event_user,0); Will this do whatever is inside the user defined event numbered 0? or should I do event_perform_object(object,event_user(0),[some number here?]);
  18. MagnumVulcanos

    GML Relative positioning NEED HELP

    I'm trying to create a few objects that are going to be placed at a relative position from a certain object with positions x, y, but without knowing how wide those objects or the original object are. this is for an interface I am making, I would be interested in creating a circular interface but...
  19. Zuljaras

    Legacy GM [SOLVED ]Sprite animation is skipping frames

    Hello, I have noticed that my walking sprite is skipping frames when the player is walking. Here is the code for walking right: if global.paused=false && global.playermove=true && sprite_index!=playershurtright && sprite_index!=playershurtleft {if keyboard_check_direct(global.KeyDefault[1])...
  20. F

    GML [SOLVED] Spawner Code While Loop Crashes - Platformer

    Hello everyone, I have a coding error that I cannot seem to solve by myself so I hope you can help. I have a spawn controller object that runs on an alarm event. There is a step event in the object besides the alarm. While in open areas, the spawn controller works well. However, when entering...