1. #1

    How do I make good, hit-scan bullets?

    I was planning on attaching area triggers to my turret, but I'm not allow to glue area triggers. I tried using a physics joint, but I have no idea on how to get that to work.

    Help, please! I'm afraid that using an actual bullet to do it just wouldn't work. It might lag up the game and not always be accurate.
    Share this post

  2. #2

    How do I make bullets for my turret?

    I've now tried making non-hitscan bullets, but I can't even do that! I can't get a bullet to go in a straight line perfectly, even if I set it to global. It just freaks out.

    Please, help. I know it's been done, but I don't know how.

    EDIT: I've tried making a long group of tubes and attaching them to my turret, making them invisible, and just activated the physics on them at an interval of about 0.183 seconds. The object coming towards you would have an area trigger around it ( I can do that with this one because it's moving by position, not angle). This didn't work though, I just couldn't get the aiming right on it.
    Share this post

  3. #3

    Re: How do I make good, hit-scan bullets?

    Try my skillgame called "Barrel Apocalypse", is that what you need?
    Share this post

  4. #4

    Re: How do I make good, hit-scan bullets?

    You're not allowed to glue area triggers. But you are allowed to manipulate their positions and angles. I would use an object position event with a little math.
    Share this post

  5. #5

    Re: How do I make good, hit-scan bullets?

    disableing the world gravity can help to make the bullet fly in a straight line
    Share this post

  6. #6

    Re: How do I make good, hit-scan bullets?

    Originally Posted by RickyReb
    Try my skillgame called "Barrel Apocalypse", is that what you need?
    YES! Exactly like that, except for with a turret. I'll try using the area triggers with an object position event in the mean time. Your game was awesome, I rated it 5 stars. I saw it in the new skill games section, but I skimmed over it because I thought it was going to be another game in which a bunch of barrels fly at you.
    Share this post

  7. #7

    Re: How do I make good, hit-scan bullets?

    Originally Posted by P4INKiller
    You're not allowed to glue area triggers. But you are allowed to manipulate their positions and angles. I would use an object position event with a little math.
    How would I use math? Anyway, the object position event isn't really working out. How can I make it so that the area trigger will stay right where I want it to be the ENTIRE time? I know how to move it, but I don't know how to get the exact numbers. Strangely, decreasing the Y-value of the area trigger actually takes more than increasing it. I had to decrease the Y-value at 0.06 and increase the Y-value at 0.03 to get something that would mostly stay on there. If I had the Y-value decreasing at 0.03, then it would lag behind in comparison to the increasing.

    Is that what you mean by math? Somehow getting the right number? I don't know how to do that...
    Share this post

  8. #8

    Re: How do I make good, hit-scan bullets?

    Originally Posted by Confused911
    Originally Posted by P4INKiller
    You're not allowed to glue area triggers. But you are allowed to manipulate their positions and angles. I would use an object position event with a little math.
    How would I use math? Anyway, the object position event isn't really working out. How can I make it so that the area trigger will stay right where I want it to be the ENTIRE time? I know how to move it, but I don't know how to get the exact numbers. Strangely, decreasing the Y-value of the area trigger actually takes more than increasing it. I had to decrease the Y-value at 0.06 and increase the Y-value at 0.03 to get something that would mostly stay on there. If I had the Y-value decreasing at 0.03, then it would lag behind in comparison to the increasing.

    Is that what you mean by math? Somehow getting the right number? I don't know how to do that...
    It's okay, I'm a programmer!
    We can fix this.

    I don't know exactly how you want to position your triggers in relation to the turret, but is it going to move as well as rotate?
    And are your triggers offset from the turret or are they centered on the turrets position?

    Let me know a little more how you're setting things up and I'll come up with a proper solution (which might require a lot of coordinate and angle work).
    Share this post

  9. #9

    Re: How do I make good, hit-scan bullets?

    Originally Posted by P4INKiller
    Originally Posted by Confused911
    Originally Posted by P4INKiller
    You're not allowed to glue area triggers. But you are allowed to manipulate their positions and angles. I would use an object position event with a little math.
    How would I use math? Anyway, the object position event isn't really working out. How can I make it so that the area trigger will stay right where I want it to be the ENTIRE time? I know how to move it, but I don't know how to get the exact numbers. Strangely, decreasing the Y-value of the area trigger actually takes more than increasing it. I had to decrease the Y-value at 0.06 and increase the Y-value at 0.03 to get something that would mostly stay on there. If I had the Y-value decreasing at 0.03, then it would lag behind in comparison to the increasing.

    Is that what you mean by math? Somehow getting the right number? I don't know how to do that...
    It's okay, I'm a programmer!
    We can fix this.

    I don't know exactly how you want to position your triggers in relation to the turret, but is it going to move as well as rotate?
    And are your triggers offset from the turret or are they centered on the turrets position?

    Let me know a little more how you're setting things up and I'll come up with a proper solution (which might require a lot of coordinate and angle work).
    Okay, here's how it works.

    I want it to rotate with the turret which was easy since I was able to just connect the object position event that I used for the turret onto the area trigger. The area triggers are right where the bullet animation and sound is. It will extend far enough to be able to reach enemies. The problem is my area triggers will fly above my turret since its y-value is increasing more than the turret's bank. If I make them both the same values, then the area triggers will fly up into the sky whenever I hold up on the LS control stick. It's going to have to be some decimal, and I don't know how to tell what decimal it is. I could just keep on guessing and make it pretty accurate, but I want it as accurate as I can. I'm gonna have to have a ton of area triggers all in a straight line, and that's actually pretty hard to do.

    If only I could just glue area triggers...

    Anyway, thanks a lot!

    EDIT: Sorry that I'm not that good at explaining things...
    Share this post

  10. #10

    Re: How do I make good, hit-scan bullets?

    you can't glue area triggers, but you can use a physics joint set to (point to point) and it will act as glue.
    Share this post