![]() ![]() Please ensure you have gdiplus on your system MsgBox, 48, gdiplus error!, Gdiplus failed to start. Uncomment if Gdip.ahk is not in your standard library ![]() SetTimer, GenerateLine, 20 Generates a new line every 50 ms Nope, it starts in a seemingly random location. For example setting 400,400 (x,y) coordinates, you would think that on 400,400 the parabola would start to draw there. Towards the end of the script, there is an X,Y,Height,Width parameters to change this, but they act utterly ridiculous. I have it figured out (I think) but now the problem is that I can't get it to start the polyline drawing in the correct spot on the screen (where my tank will be firing from) Note: To draw parabolas I use this file and the GDI+ plugin: This gives me a nice parabola that plots in google or microsoft math programs, and I'd love to draw on the screen (clicking once on my tank to specify where the parabola should start, and then seeing the path the projectile will take for that angle/power I chose.) but I don't know how to put this math formula into AHK. Once I choose an angle and power, I find out the gravity of the shot by plugging it in to this equation: X1,y1=ending position of the missle, where it lands (in mouse coordinates) X0,y0=starting position of the 'tank' which will fire the missle (in mouse coordinates) This is the formula I use to figure out gravity: There is no wind or drag or any of that messy stuff, only Power of the shot, Angle of the shot, and Gravity. I have found a way to calculate the trajectory of a missle in a 2D game (similar to tanks, or gunbound). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |