projectile

  1. 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...
  2. I

    GMS 2 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...
  3. 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...
  4. Viggar

    GMS 2 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...
  5. 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...
  6. 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...
  7. IE Entertainment

    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.
  8. 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...
  9. E

    GMS 2 [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))...
  10. 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...
  11. M

    GMS 2 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...
  12. 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 +...
  13. 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 =...
  14. 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...
  15. 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'))...
  16. 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...
  17. 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...
  18. 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...
  19. 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?
  20. K

    GML [Solved]Problem: Projectile Won't Slow Down

    So I've got an object called obj_projectile that's supposed to be a bullet. What I'm trying to do is figure out how to slow down the bullet from another object or script. This is from the player object that creates the projectile to go in the direction you are facing. It works. (Who knows...
Top