solved

  1. G

    [SOLVED] Health Bar Visible Only Some of the Time

    Hey, guys, What I'm trying to get done in the game I'm working on is having a set of health bars that are only visible when you click a button. The health bars don't actually represent health, though. They represent the number of enemies in the room, so the level ends when there are too many...
  2. Noah Copeland

    Legacy GM [SOLVED] Find the nearest object to the left/right

    Hello! I'm trying to figure out a way to find the nearest enemy (obj_enemy), but only in the direction you are facing. (This is a 2D sidescroller for context). If you are facing right, all the enemies to the left of you may as well not exist. The code only needs to find the nearest instance...
  3. D

    GMS 2 Draw event not refreshing

    I'm not sure if i learned bad habbits from GMS1 but Im working on a small app currently using normal draw_text_colour(x,y,string,col,col,col,col,alpha) code and everytime the draw event is run, the new text is drawing over the previous state of the text and not clearing the previous text like I...
  4. L

    Legacy GM diagonal moving like flyup

    trying to achieve diagonal movement left right with mouse left. Hi all i am trying to do diagonal movement with mouse left button like in the android game called fly up but am not succeeding so i ask for the wisdom of the GMC for help. Thanks guys heres what i tried //in create event...
  5. Phsyrik

    Legacy GM [SOLVED]Value not staying?

    So I have a store in my game, and when I buy something, and come back to the store its locked again. I need to make it stay unlocked CREATE global.orangelocked = 0; STEP if (device_mouse_check_button(0, mb_left) && global.coincount >=...
  6. cdgamedev

    GMS 2 [SOLVED] Issue with lengthdir_y

    Hello, I'm trying to use lengthdir_y but when I enter Speed = 16; direction = 45; vspeed = lengthdir_y(Speed, direction); it returns 0. However, when I enter Speed = 16; direction = 45; vspeed = lengthdir_y(16, 45); it returns -11.31 as expected. Am I missing something or is it broken? This...
  7. R

    Legacy GM Get a block to move so many points and stop [Solved]

    Trying to make a block that you can push. It moves a set number of points (16 points) and then stops, until you push it again. tried using the move_towards_point function but because the point I want it to move to is variable, it doesn't stop moving when it reaches the point. I've included my...
  8. A

    Legacy GM Selecting all of a certain object [solved]

    I currently need to know a way of selecting all of a certain object. My previous solution was: with all { if(self = ob_box) { //actions } } but i'm now pretty certain that that doesn't work at all and is the cause of many bugs. Is there a way of...
  9. Chris Smith

    Legacy GM Making Groups of Objects Recognize Each Other & React To Changes

    What I am trying to do is use groups of the same object, for clarity I call the object obj_alphablock, to create a similar effect to what you see in newer mario sidescrollers, where you walk through a part of the wall and the wall goes transparent. Essentially I want a collision between the...
  10. N

    Windows Top Down Shooter Controls.

    I am trying to make a 360 degree top down movement but there is a problem with it. When I test it, the player by default moves right and does that when I release the arrow keys and pressing down + right makes it stuck. I dunno what the problem is. Create: image_speed = 0; Step: ///Movement var...
  11. T

    Fastest way to clear a surface? SOLVED

    I'll make it quick, I need to clear a surface, i.e., take every pixel in it and replace its r,g,b,a by 0,0,0,0, as if it had been just created. What's the easiest way to do so, short of freeing the surface and creating another?
  12. T

    Shaders Shader: passing only one color SOLVED

    Hello, I'm trying to do a shader that passes exactly one color, comparing the color to a list before drawing every pixel. If the color matches a parameter, it should draw a listed color, and if the color does not, it will draw a pixel with zero alpha. How could I go about this? I tried using...
  13. C

    GML [SOLVED] Moving platform collisions

    !SOLVED! Thanks everyone for your help Solution below for reference Thankyou everyone, I got everything working, including staying grounded and sticking. I'm really happy with the result. I set an actor parent object so all my other characters can benefit from the collisions. I stuck with...
  14. 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...
  15. csanyk

    working_directory

    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...
  16. 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...
  17. 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...
  18. 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...
  19. MudbuG

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

    editor version: 2.0.5.77 runtime version: 2.0.5.49 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...
  20. 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...
Top