|
| |||||||
| Wiremod Tutorials Post your wiremod tutorials/guides here. |
![]() |
| | LinkBack (2) | Thread Tools | Display Modes |
| |
#1 (permalink)
|
| Advanced Member ![]() Join Date: Apr 2008
Posts: 129
![]() | What are you building? Watch this video for a demonstration. This is a pure picture tutorial of my 6th revision of my "Spaceman Turret" The whole idea behind this is to use on any enemy. If they duck you press 2 and if you want to head shot them standing you press 1 The number wired to 1 wire mod is a head shot standing, and 2 is a head shot while ducking, no number pressed is a normal shot (feet on human) The main reason I made this was due to space build, I am in flat grass just for an open area to test the range of this turret, which it can head shot an enemy from across the map. It takes a second to aim but yeah.. Code: N@Spaceman Turret V6 I@Elevation Bearing Dist Roll Num O@ElevationThrust BearingThrust RollThrust BearingThrust = (Bearing+$Bearing*10) ElevationThrust =(HeightAngle+$Elevation*10) RollThrust = (Roll+$Roll*5) Bearing == 0 -> BearingThrust = 0; Elevation == -90 -> ElevationThrust = 0; HeightAngle = Elevation + atan(Num/Dist) This expression is so accurate when it adjust to the targets bearing within 3-5 seconds or less, I haven't counted, it gets to .001 bearing and elevation, now if you tell it to aim for the head it will say the elevation is off ![]() Yeah in this picture I said turret on accident lol but I mean thrusters, don't get it mixed and expect turrets to thrust the turret lol. ![]() ![]() ![]() ![]() ![]() I added the adv dupe file Last edited by Xtensity; 09-19-2008 at 09:07 AM.. |
| | |
| Sponsored Links | |
| | #2 (permalink) |
| Advanced Member ![]() Join Date: Apr 2008
Posts: 138
![]() | Ok i was taught that stuff in trig 3 years ago and currently doin advaced trig at senior highschool but i had to look up the english terms on google lol (im greek) . I havent watched Orb's tut on how to do the headshot but i guess that since u know the elevation which u tweaked to match the oposide side , u also know the distance which is the bottom side , u were able to find the angle (θ) with the tangent and output it to the either pitch or roll thrusters. Anyways what i dont understand in ur e-gate is the +*'s u got there what kind of function are those . |
| | |
| | #3 (permalink) |
| Advanced Member ![]() Join Date: Nov 2007 Location: Made in the USA
Posts: 117
![]() | Is the +* in your e gate the delta?? If soo sweet, I didn't know the formula for a delta.
__________________ "A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away." - Antoine de Saint-Exupry ![]() http://garrysmod.org/user/?u=40229&rnum=277222 my garrysmod.org uploads![]() |
| | |
| | #4 (permalink) |
| Advanced Member ![]() Join Date: Apr 2008
Posts: 129
![]() | WTF! Why do the delta things always disappear the code gets ass fucked! It doesn't make any sense! I cant post the code since it keeps doing this ffs and idk how to fix it. No dr its not, the delta for a variable is a dollar sign before the variable. Aspras Its like this |
| | |
| | #5 (permalink) |
| Advanced Member ![]() Join Date: Apr 2008
Posts: 138
![]() | Yup thats exactly what i typed right there lol. Anyways im really getting pissed off with my turret im still trying to get the firing thing positioned correctly , no matter where i position it the god damn bearing is at 0.001 and the bullets go nowhere near the guy . |
| | |
| | #6 (permalink) |
| Advanced Member ![]() Join Date: Nov 2007 Location: Made in the USA
Posts: 117
![]() | Sweet thanks so much Xtensity, I never knew what that blasted delta command was.
__________________ "A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away." - Antoine de Saint-Exupry ![]() http://garrysmod.org/user/?u=40229&rnum=277222 my garrysmod.org uploads![]() |
| | |
| | #7 (permalink) | |
| Advanced Member ![]() Join Date: Apr 2008
Posts: 129
![]() | Quote:
Also one thing. I don't know shit about trig really just basics. But what do sin and cos have to do with right triangles at all(not relating to circles) if Atan can get you the angle of a point.... Also whats your elevation go to when its aligned or w/e, show me a picture. Edit, I added the adv dupe file. Last edited by Xtensity; 05-06-2008 at 07:28 PM.. | |
| | |
| | #8 (permalink) |
| Advanced Member ![]() Join Date: Apr 2008
Posts: 138
![]() | You use the sine to find the angle when u know the oposite side and the hypothenuse length , you use the cosine instead to find the angle again if u know the bottom side's length and the hypothenuse the tangent is currently the only trig function used because we know the distance which is the bottom side and the height of the player which is the oposite side when the elevation is at 0. Its all basic trigonometry and you can use those 3 functions to find any of the 2 angles in the triangle as long as it has an angle which is 90 degrees it doesnt matter if its right , left sided it could be rotated as well when watching it from the side its always the same thing as long as 1 of the angles of the triangle is 90 degrees. Also the most accurate and fast way to aim in the z axis would be to use the pitch or the roll to rotate towards your target and its easier to use that instead of the elevation where u have to add 180 and stuff. PS: I realised why my turret wouldnt even aim close to the target even though the bearing was 0.001 , i thought about it a little bit and i realised that the beacon sensor has to be positioned in the exact middle of the object so that its x , y and z compared to the object itself are 0. |
| | |
| | #9 (permalink) |
| Member ![]() Join Date: Apr 2008
Posts: 94
![]() | You know you could put th gyro inside the expression ship and save yourself another prop. You also only need 1 thruster each for yaw, pitch and roll (looks like you got two)(would also save you another few props). |
| | |
| | #10 (permalink) |
| Advanced Member ![]() Join Date: Apr 2008
Posts: 129
![]() | That would make it aim slower if it used less thrusters, and I can't put the gyro inside the chip, I tried it and it was an utter fail. It updated but it spazzed out since it did not work properly, I did it the right way it just didn't work. |
| | |
| Sponsored Links | |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.wiremod.com/forum/wiremod-tutorials/4995-xtensitys-spaceman-turret-v6-tutorial-head-shots-ftw.html | ||||
| Posted By | For | Type | Date | |
| YouTube - Spaceman Turret V6 | This thread | Refback | 05-12-2008 12:04 PM | |
| YouTube - Spaceman Turret V6 | This thread | Refback | 05-10-2008 05:34 PM | |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| *puts up "Warning: Romanian on site!" sign* | Jok | Off-Topic | 5 | 09-02-2008 05:37 PM |
| Requesting "Text Screen" Tutorial | ppiksmada | Help & Support | 2 | 09-22-2007 07:38 PM |
| Need the pack that has the "Generator" and "Razor" models... | Mr. Brightside | Help & Support | 2 | 06-06-2007 11:16 AM |
| How can I make a "insta-dial" contraption to use with stargates? | Tom | Help & Support | 4 | 05-29-2007 03:56 AM |
| Request: Looking For "wiresys" Tga Files For Use On Panel Antenna (radio Mod) | philxyz | Wiremod General Chat | 0 | 05-07-2007 10:39 AM |
|