super64 0 Posted May 20, 2017 Hi guys, I know what Im trying to do has been done before. But after searching the forums I am unable to find it. I am working on a jet dogfight mission where players can fly through the "hoops" (used in the helicopter time trials) to instantly rearm, refuel and repair. I'm pretty good with copy/pasting scripts and code into the correct fields. I just can't code personally. Anyone know how this feature can be accomplished? Thank you! Share this post Link to post Share on other sites
Midnighters 152 Posted May 25, 2017 Here is a little start. while{true} do{if(("Land_HelipadCircle_F" in (nearestObjects [player, [], 25]))) exitWith {[(vehicle player)] call mid_fnc_repair; sleep 0.5;}; mid_fnc_repair = { params["_vehicle"]; _vehicle setFuel 1; _vehicle setDamage 0; _vehicle setVehicleAmmo 1;}; (Obviously this isn't the best example, and should be used merely as a starting point in making your own) Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 25, 2017 Good example, definitely something to build upon, as a suggestion one could improve the performance to use nearentities (since it only checks alive units and is way faster in small areas) and do the check on each frame for the check to be more reliable. Considering a speed of 500km/h you'll cover around 140meters per second (500/3,6), or 70m in half a second. You'll probably have a hard time getting repaired with a distance check of 25m every 0.5 seconds. Checking on every frame considering 30 fps would even work out, since the player moves around 5m on every frame at 500km/h and 30fps. Just food for thought, heh. Cheers 2 Share this post Link to post Share on other sites