• 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!

projectile

  1. A

    SOLVED Projectiles are messed up whenever a new one is created (using instance id and not object)

    I'm working on a tower defense game and I ran into this problem. I created a projectile and every time a new one is created, all of the projectiles that are currently on screen are messed up, I came to the conclusion that perhaps the variables are being changed every time a new projectile is...
  2. sweep

    SOLVED Help with projectiles.

    Hope someone can help. I've set up a player who can throw a dagger . The code is below. But in the game the player throws multiple daggers. I only want to show one dagger . I've tried to figure it out but without much luck. I know using two dagger images (one facing left/ one right) isn't the...
  3. I

    GameMaker Best way to do projectile collisions

    Forgive me for what might be a fairly obvious question, I'm new to GMS2. I'm making a multiplayer game that is heavily based on the players firing projectiles at each other. There will be multiple different types of projectiles, and I have set up a parent object for all the projectiles so I can...
  4. Z

    Boomerang like effect

    I have been working on a flying enemy that swerves back and forth and often times changes its elevation I have to code it the best of my abilities but the sprites themselves just vanish into thin air. It is hard to put it into words so I have a video to give general idea i am trying to aim for...
  5. V

    GameMaker a simple boomerang-ish projectile

    hello, I've stumbled on a problem that seems really simple, but I can't wrap my head around it. I want to make a simple object that returns to the player after it flies a certain distance or hits a wall, but the collision is always inconsistent and it bounces off the walls like ping pong. this...
  6. J

    GML Making a projectile shoot up,down,left and right

    I am creating a top down RPG and one of the items which the user cna pick up is a bow, i am having a probelm so when my character faces up, down or left the arrow does not go the direction where the character is facing and just goes right. Any help would be great! The button to shoot the arrow...
  7. Warspite2

    Physics projectiles and image angles [SOLVED]

    I have a physics game with a player helicopter. Player presses key to apply physics force on y axis to raise heli. Below are AA tanks which fire bullets at the heli. How can I get the aa bullets to shoot straight? I would rather the bullet not use physics but if I uncheck uses physics then it...
  8. I

    I need a Boomerang!

    Hey, guys. I am in need of a boomerang mechanic. I currently have a projectile that shoots from the player but I want it to act as a boomerang and return to the player. Any suggestions? Thanks, guys in advance.
  9. A

    Legacy GM Side scroller projectile help

    Hello! I'll preface this with: I've eyeballed a whole bunch of related tutorials, but for some reason can't seem to find (or correctly tweak) an existing one to fit with what I'm doing: I'd like to trigger a projectile within an attack script. I can't seem to figure out how to tell the...
  10. E

    GameMaker [SOLVED]Can't properly apply impulse to an instance

    So here is my code: var ximpulse, yimpulse; ximpulse = lengthdir_x(0.1,point_direction(phy_position_x,phy_position_y,mouse_x,mouse_y)); yimpulse = lengthdir_y(0.1,point_direction(phy_position_x,phy_position_y,mouse_x,mouse_y))...
  11. A

    Projectile Problems

    I'm making a Tower Defense-style game for a class I'm enrolled in, and I have many of the basics down for towers/ enemies at the moment. However, I'm absolutely clueless as to one thing: How do I get my projectiles to orient themselves to face the enemies? For example: I have an Archer Tower...
  12. M

    GameMaker Projectile: image_angle problems...

    I'm pretty stumped at the moment; I have a character (obj_player) in a top-down game which can shoot a projectile (obj_bullet) based on where the mouse is. However no matter how I code it I cannot seem to rotate the image of the bullet to the corresponding direction it is moving... the line...
  13. G

    GML [SOLVED] Movement Along Grid

    hey all, i'm having some trouble figuring out how to get stuff to move along my grid more naturally. the problem is most visible in projectiles atm, but i'm not sure what i can do to smooth it out. obj_player : Step Event : state.aim if(input_fire) { var _inst = instance_create_depth(x +...
  14. J

    Teleport to an Object

    The main character shoots an arrow and I am trying to have them teleport to the arrow but I can't figure out how to have the arrow get destroyed when the left click is pressed again, the character will teleport but the arrow keeps going. if(!firing) { if(instance_exists(Obj_arrow)) {x =...
  15. A

    [Solved] How do I Make a projectile fire from a specific point on an object that can rotate?

    I lurked a bit on these forums and on the steam forums and have been unable to find a working solution for my case despite may other similar systems. Put simply, I have an object that the player con rotate. Said object is only supposed to fire projectiles from a specific point. {(18,-8) The...
  16. J

    Windows [SOLVED] Help with Projectiles

    Hello, everyone. I need some help with projectiles. I'm trying to limit how many projectiles my character can fire at a time based on a single key input, not held down and pressed. Here's a simple code for my archer character firing an arrow when pushing D key: if keyboard_check(ord('D'))...
  17. A

    GML Step event or collision check for attacks?

    Hi all. Im still fairly noob but learning more everyday. In some (melee/projectile) attack tutorials they say to use a collision check event to initiate the code of dealing damage etc, and in others they say to put that code in the step event. which is better [for what purposes] and why? I've...
  18. C

    Motion based projectiles

    (I am fairly new to game maker, and game making in general) I am making a tower defence game, where you controll a plane from above, and I want the bombs to drop from the plane. The problem is that i want the bombs to be affected by the x speed of the plane. Im thinking that the bombs should...
  19. T

    Legacy GM Physics - Neutralizing / cancelling an impulse

    Hey folks, I have a game where the player aims and then fires an arrow which then bounces around. The arrow has a set number of rebounds it can do. The arrow is launched using a impulse in its create event: //Make arrow move physics_apply_impulse(x, y, lengthdir_x(6, dir), lengthdir_y(6...
  20. 2

    Projectile Aim for Player Each Frame, but Limit Change in Direction for Projectile

    How do you make a projectile change the direction it's moving to aim towards the player each frame, but without it being able to change the direction it's moving more than maybe 4-10 degrees in either direction each frame so it's only so maneuverable?
Top