APP [CLEO] AutoHeli.cs - Helicopter autopilot!

SA-MP Version
0.3.7
Requirements
CLEO 4.1.1.30f, SAMPFUNCS

Zin

Well-Known Member
Joined
Aug 1, 2013
Messages
1,472
Likes
58
Points
98
Website
youtube.com
#1
AutoHeli.cs - Helicopter autopilot.
Description:
This basically makes your helicopter fly up and then just fly to whatever coordinates and slows down as it approaches them. There's an opcode that allows helicopters to fly by themselves similar to how cars can also "auto-drive" but that sort of thing seemed buggy, didn't keep to the selected altitude entirely and also wasn't very natural. This is the opposite of all that as it does what it says on the tin, the altitude is kept very accurately eventually stabilising within 0.5 of the selected altitude. This is the most effective way of flying a helicopter as it's 100% XY velocity (I remeber during testing it beating a human "benchmark").

Instructions:
Just hop in a helicopter, make sure you have a marker set and type /HFLY [ALTITUDE]. To turn it off just do /HFLY. (It stops itself anyway).
Let me know any issues and don't ask for 0.3DL version. I quite like this idea so I MAY update in the future with some cool features, for now just enjoy! Also it's open-source (some const vars you may want to change) incase you wanna make some changes or incorporate it into your own CLEO (just don't steal).

Credits:
Monday & OpcodeXe as alot of this is based on their VehiclePathRecorder CLEO.
 

Attachments

monday

Well-Known Member
Joined
Jun 23, 2014
Messages
1,077
Likes
93
Points
98
20
#3
Credits:
Monday & OpcodeXe as alot of this is based on their VehiclePathRecorder CLEO.
thanks for including me in the credits but frankly speaking I don't think there's any contribution of mine in this code. OpcodeXe was kind enough to include me in the credits of his path recorder despite using only a single function (for vehicle turning as far as I remember) from the code I posted (I think it was in "automowing.cs")
 
OP
OP
Zin

Zin

Well-Known Member
Joined
Aug 1, 2013
Messages
1,472
Likes
58
Points
98
Website
youtube.com
#4
thanks for including me in the credits but frankly speaking I don't think there's any contribution of mine in this code. OpcodeXe was kind enough to include me in the credits of his path recorder despite using only a single function (for vehicle turning as far as I remember) from the code I posted (I think it was in "automowing.cs")
I mean this wouldn't have been possible without that turning func (which I changed the order slightly, still the same func really), so good enough.
 

Opcode.eXe

Well-Known Member
Joined
Feb 18, 2013
Messages
1,476
Likes
206
Points
113
Location
( ͡° ͜ʖ ͡°)
Website
www.youtube.com
#5
thanks for including me in the credits but frankly speaking I don't think there's any contribution of mine in this code. OpcodeXe was kind enough to include me in the credits of his path recorder despite using only a single function (for vehicle turning as far as I remember) from the code I posted (I think it was in "automowing.cs")
The turning function was one of the most important thing in all those mods ( ͡° ͜ʖ ͡°)
Without it everything would be different. I had tried to create that function myself but failed hard
so it was nice to just use your function.


The mod looks very nice, but you should add a little bit of humanism.
- The tilt of the helicopter is a bit too strong and has a fixed angle (Maybe add a timer so it does it every 1-2seconds)
- dont just make it fly up, but try to make it go up while flying towards your destination ᕦ( ͡° ͜ʖ ͡°)ᕤ

After that it will almost be perfect ^^
 
OP
OP
Zin

Zin

Well-Known Member
Joined
Aug 1, 2013
Messages
1,472
Likes
58
Points
98
Website
youtube.com
#6
The turning function was one of the most important thing in all those mods ( ͡° ͜ʖ ͡°)
Without it everything would be different. I had tried to create that function myself but failed hard
so it was nice to just use your function.


The mod looks very nice, but you should add a little bit of humanism.
- The tilt of the helicopter is a bit too strong and has a fixed angle (Maybe add a timer so it does it every 1-2seconds)
- dont just make it fly up, but try to make it go up while flying towards your destination ᕦ( ͡° ͜ʖ ͡°)ᕤ

After that it will almost be perfect ^^
I mean some people may want precision as if you're taking off between buildings and a shit ton of obstacles you will probably fly into them. But yeah the next level would be adding some complex obstacle detection system with auto adjusting alitude and realistic flying with the sacrifice of altitude precision no doubt. I actually made this as part of a job bot so as a somewhat "base version" it's pretty decent for anyone else interested.
 

soleh

Well-Known Member
Joined
Apr 16, 2013
Messages
66
Likes
0
Points
56
#13
AutoHeli.cs - Helicopter autopilot.
Description:
This basically makes your helicopter fly up and then just fly to whatever coordinates and slows down as it approaches them. There's an opcode that allows helicopters to fly by themselves similar to how cars can also "auto-drive" but that sort of thing seemed buggy, didn't keep to the selected altitude entirely and also wasn't very natural. This is the opposite of all that as it does what it says on the tin, the altitude is kept very accurately eventually stabilising within 0.5 of the selected altitude. This is the most effective way of flying a helicopter as it's 100% XY velocity (I remeber during testing it beating a human "benchmark").

Instructions:
Just hop in a helicopter, make sure you have a marker set and type /HFLY [ALTITUDE]. To turn it off just do /HFLY. (It stops itself anyway).
Let me know any issues and don't ask for 0.3DL version. I quite like this idea so I MAY update in the future with some cool features, for now just enjoy! Also it's open-source (some const vars you may want to change) incase you wanna make some changes or incorporate it into your own CLEO (just don't steal).

Credits:
Monday & OpcodeXe as alot of this is based on their VehiclePathRecorder CLEO.
sir i got crashed everytime entering heli, any suggestion sir?
 

soleh

Well-Known Member
Joined
Apr 16, 2013
Messages
66
Likes
0
Points
56
#15
now i win all human henlicopnter rances!!!!
thank

0.3.7? senpfuncs?
Yes is use samfucn an cleo, i got cras only when enterint heli, but when entering car, bike and ariplane not get crash, anyway thanks for sharing sir
 
Top