coding

  1. tamation

    [SOLVED] Simple way to pixelate the screen

    I'm looking for a way to pixelate everything on the screen, and then have the pixelation effect reversed. All in the span of about 1 second or less. I'm assuming this would be done with a shader, but the only shader I've found for this online has only been able to pixelate backgrounds drawn in...
  2. G

    Make an Object Move when Another is Destroyed?

    Hey guys, I'm working on a battle mode for my Pong game, and I'm trying to achieve this: When a paddle fires its laser and the laser hits or misses the other paddle (despawning on contact or despawning upon leaving the room),the ball (which, all this time, is outside the room, waiting to come...
  3. P

    Help: Examining an object?

    Hey there. Sorry if the title of this post is confusing, I didn't know how to briefly explain what I'm trying to achieve. I'm working on a little game (it's not that much of a game as it is more like an interactive piece of pixel art) and in it, the player can examine different objects. Should...
  4. V

    How do i find object with variable with lowest value?

    Hello! I have objects called "obj_past" and they all have counter variable that each step adds one create event: counter = 0; step event: counter ++ And i want to create instance on object with lowest counter value (object is called obj_tail) Is there a way to do that? Thank you in advance...
  5. Fixer90

    Built-in Action to Code? (SOLVED)

    We're all no-doubt familiar with those wonderful actions we use in just about every object we put in our games: Now, I know most - if not all - of these actions have an equivalence in coding (which can be inputted in a basic Code action). But I must ask, what are they? Is there some kind of...
  6. Y

    Legacy GM Magnify a certain area of the screen?

    Heyall! I am wondering, is there any way to use an object or code to magnify only one part of the screen? Thanks!
  7. Wuzzems

    Legacy GM [SOLVED] Moving between points?

    I'm relatively new to coding. Let's say I have a player object, and I want this obj_player to be able to move between three points on the y axis. The first point will be the center of the y axis (room_height/2) the other two points will be the halfway point between the center and the top and...
  8. S

    FIXED - Testing for collision at certain fixture points?

    Hello all, this is my first time posting in these forums so forgive me if I am in the wrong area. I recently purchased GameMaker Studio and tons of modules after hearing about how good it was. Being familiar with a few other IDEs and builders, I was curious as well. Suffice to say, I am...
  9. D

    Delay

    so I wanted to have a delay for my camera view (the cont_view object) and I found this line of code online. however, to implement this into for example my character's rotation aswell, I'd like to know how this works: x += (cont_view0.x-x)/2; I'm bad with maths :/
  10. N

    Object not turning visible when button pressed

    I'm trying to make a computer version of Starfleet Battles, and I'm trying to implement the firing system. When you click the 'fire' button, the UI where you choose which weapon you want to fire appears. And when you press the button again, it dissapears; going back to movement mode. What's...
  11. Luke Pierson

    Enemy flee from player

    Hello, got a question about making an enemy run away from the player. Here's the code I have running in the states that the enemy is allowed to move during (some attacks he must be stationary) if distance_to_object(Skeleton) < 150 { if x < Skeleton.x { hspd += spd*-1; } else {...
  12. S

    [Solved] Need help with coding a realistic tentacle

    I'm trying to come up with a tentacle that can move every single joint independently without breaking apart, and preferably in only one object. I didn't find anything about it when I searched, and I have no idea how I should go about doing that. Does anyone have an Idea?
  13. Necromedes

    Looking For A Tutor?

    I'm needing to find someone who can help me to wrap my head around some things in Game Maker. Before anyone says "Look at the manual," let me explain that with the way my mind works, having someone readily available to help explain things and offer examples will help me tremendously more than...
  14. Luke Pierson

    Image_index issues

    So I have a stunned state for the player in my game that is not working correctly. They have to press the left and right buttons in rapid succession to escape the stunned state (set to A and D). Every time they press the button, it increases the variable (set to 0 in the player's creation event)...
  15. Luke Pierson

    Enemy Combo (Solved)

    Hello GM Community! Got a little question for you, concerning enemy states, attacks, and damage code not working correctly. So, the enemies in my game enter attack animations, and when they reach a certain image_index, they create a damage object with a sprite in the shape of their attack. I...
  16. K

    Legacy GM Help with this FADE TRANSITION code? [SOLVED]

    I have this code that I got from Shaun Spalding's tutorials for a room fade transition: It works fine and all, but because of the way my game is put together and how the player moves from room to room it would be better if this transition was like this: Instant black screen > fade out of black...
  17. N

    Windows [SOLVED] Allow my light surface to hurt the enemy

    I'm trying to get the light surface to damage the enemy when it touches it. [o_light_main] Create Event: surf = surface_create(room_width, room_height); surface_set_target(surf); draw_clear_alpha(c_black, 0); surface_reset_target(); Step Event: execute code: if (surface_exists(surf)) {...
  18. D

    Coding Help

    I am developing a clicker and i can't figure out how to make the shop prices increase. this is what i have in my obj_globals, what else do i need in here for that? ///init Vari global.money = 0 global.pc = 1 global.ps = 0 alarm[0] = 60 This is the alarm. ///Add Money global.money+=global.ps...
  19. D

    Legacy GM Help Health Regeneration

    My goal is for the player's health to not begin regenerating unless his hp doesn't go down for 5 seconds. I'm obviously thinking alarm but I'm not sure how to set it up so the game will wait "X" amount of time before the health begins to increase. Help please? I really appreciate it!
  20. A

    Changing A Sprite With Left Click

    You'll have to excuse me if I'm just being silly, but I'm new to GameMaker and I can't figure this coding out. So far I have this: switch (device_mouse_check_button(mouse, lmb) + sp_Pod = sprite_replace(sp_Pod, sp_Open_Pod, 1, true, false, x, y)) { case (device_mouse_check_button(0, mb_left) +...
Top