• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

target

  1. C

    How to shoot the closest enemy

    hi i am making a top down base defense game. i'm gonna have 4 computer controlled towers that fire at enemies automatically. I've managed to get them to shoot the enemy and destroy it but they all target the same enemy (Video), i want them to target the closest enemy to them (i dont want to have...
  2. L

    What is the point of targets on certain functions (e.g. random number) and what does the value of a variable do?

    Hello, I'm very new to programming so forgive me for being naive, but I'm confused regarding to importance of targets and variable values in GML. How exactly do these work? Thank you.
  3. J

    SOLVED Calculate Speed to reach target.

    Trying to achieve calculating the speed needed to move an object to a target (in this case, the mouse). My game is top down so no gravity, just speed & friction. When I press spacebar, I want the object to find (and set) the speed needed to reach the mouse and stop (with whatever friction in...
  4. KyleRansford

    GameMaker How to Set a Camera Offset with a Target

    I've got a platformer game that I'm working on, and am having trouble with setting the Camera Position offset while following a target, which is the player. For instance, I know how to set the Camera borders with camera_set_view_border() which works ok, but, in certain areas of a level, I want...
  5. A

    SOLVED Target platform: "Test" or Opera GX?

    After the update, I can not select the Windows platform. The only platform is OperaGX, and "Test" remained from the others. What is this "test"? I can't export the game, it is just doesn't work! Sorry for my English. And anyway, maybe it's all my fault? I didn't really fiddle around with the...
  6. J

    Windows Creator License but no Windows Target

    Getting the "Packages can not be built for the selected platform" message. Looked around for solutions and found the magical target button (which, btw, would be nice to clarify that the button exists for beginners like myself). However, it's empty, unlike the guides suggest. And I can't find...
  7. S

    Unbalanced Surface Stack error, but not using surface_set_target anywhere

    Hello, I've been working on a game in GMS 1.4.1804. All of a sudden, I'm getting the error message "Unbalanced surface stack. You MUST use surface_reset_target() for each set." This occurs when the player is being prompted to enter a high score. I tried searching my game for the...
  8. giraffeman210

    GML Visual click on an object

    I see that you can set the mouse to do something when clicked but how do I make it so I can click on specific objects? GMS2 and dnd. Thanks!
  9. SuperRonanCraft

    GameMaker Path prediction for projectiles

    I've been trying to find a way to get the angle that a supposed turret will need to aim at taking into consideration projectile speed, distance and the current position an enemy is in to where they WILL be when a projectile could hit its mark This is what i have at the moment, this only aims...
  10. MMM

    Asset - Demo Knife Throwing

    If you ever played Knife Hit https://play.google.com/store/apps/details?id=com.ketchapp.knifehit&hl=en and wanted to make something like that this GMS1 / GMS2 demo will show you how. :) https://marketplace.yoyogames.com/assets/7510/knife-throwing
  11. Vinsane

    Android Samsung S9 Not detecting with GMS2?

    Hi all! I recently purchased a Samsung S9 and it seems GMS2 does not want to detect it. Even if I try to manually detect the phone via the targeting it does not find the phone. I've made sure developer mode is turned on and USB permission has also been granted to my PC to transfer files. I can...
  12. R

    GameMaker trying to build with wrong support lib android

    Hi, I'm trying to build an android target for a year old project that used to build ok. On GameMaker version 1.4.1763. Nothing has changed on the machine but now it's failing with this:- > Could not find com.android.support:support-v4:27.0.2. Searched in the following locations...
  13. Vinsane

    Android (SOLVED) Exporting the Game to Android Missing

    Hi there, I just purchased the android edition on steam for Game Maker Studio 2. I have downloaded it but when I try to run it I cannot find export to android in the target section? I have followed the official YoYo Guide on installing the SDK's and Java etc so why is this happening? I really...
  14. H

    Legacy GM Make enemy fire at either player 1 or player 2

    Hello! So I'm currently trying to make this turret fire at either player 1 or player 2 depending on which one it started targeting first. However, I'm having trouble making it work. At the moment, the turret is only firing at player 1, and completely ignores player 2. See this picture; This...
  15. R

    Platform dependant compilation

    Hi, I can't find out how to exclude code from a specific target platform. I've tried a suggestion found on the forum but it doesn't work. (PLEASE NOTE, this has nothing to do with os_type == os_android, this is about at compile time, not run time) I have a new configuration which has a custom...
  16. C

    Finding the angle to hit a target

    GM Version: GMS2 Target Platform: ALL Download: - Implemented example: http://host-a.net/u/Cheesebird/calculate_trajectory_v2.zip - Guide in .pdf:http://host-a.net/u/Cheesebird/target_trajectory_v2.pdf Links: N/A Summary: This is a guide on calculating the trajectory and angle of a...
  17. C

    Legacy GM Need help on how to loop through instances

    Hi I'm trying to make a game where the player can choose a target within certain range and the direction he is looking. I've tried thinking how i can do it and i can find the nearest enemy But i don't know how to do so if i press shift it changes enemy from the nearest to the 2nd nearest and...
  18. mar_cuz

    Legacy GM Instance nearest in direction

    Hi Guys, I'm making a top down game and I'm trying fire a projectile at the nearest instance in my current direction only. The instances I'm trying to fire at are different but share the same parent. I'm trying to use the parent as the target so I can just hit the nearest instance in my...
  19. U

    How do I tell what platform I'm running on?

    So I'm going to develop a small breakout clone and I've just figured out about scaling with the help of Hyomoto and his script. I'm going to be detecting the size of the display for determining scaling, however, with html5 I'm going to need to grab the browser height instead of the display...
  20. Avod_Rashod

    Predator/Prey

    Anyone know how to make creatures attack any animal within range of it's view? I am trying to make a Wolf/Sheep/Grass predator/prey system, but I cannot get the wolves to attack a sheep right next to it, and sheep to attack grass right next to it. this is my current code...
Top