Because of the limitations of not using motion blur, I have decided to make my bullets instant hit. This however leaves me without the ability to use tracers/bullet trails. I was wondering how I would draw a line from the barrel of the gun to where the bullet would go, but only maybe about 600 pixels long. If I set a sprite, or line, to the angle of the round, or where the round is, it just goes straight. I would assume this is because the bullet is gone as soon as it isnt.
If anyone has any input I would be very appreciative.
The usual way is to have a sprite which you set the width to distance(gun.x, gun.y, target.x, target.y) and the angle to angle(gun.x, gun.y, target.x, target.y), which effectively draws a line between the two. (Note this does not reference the angle of the bullet at all)
Thanks for that, but is there any way to set the length of the line... differently? I... will just test on my own. Thanks alot.
Develop games in your browser. Powerful, performant & highly capable.
Well, I am casting revive on this thread! I need some help with this exact thing once again. I can't seem to figure out exactly where the bullet is. I can't seem to make any sort of tracing line. Can anyone help me? I know I got this to work last time, I just can't this time. I find it really odd.
i remember when i asked Tulamide how can i program a "laser" weapon so the laser sprite will have an end and a start but the leight of the middle will get repeated as much as it takes to strech the psrite from one point to another (was it closer or further away). He adviced me to use the Panel Object. Your "bullet trace" is technicaly another version of that "laser" i used. I am not 100% sure will this help but still you might want to check it out.
I am not certain if that will really fix the problem I am having. The problem I am having is that since the bullet is instant hit there are no x and y values to turn the line to. At least that is what it seems to be.
The examples given assume you have a target, but if this is side view, that would mean your just shooting in a general direction.
Perhaps you should try another method for getting the trail besides an fx.