6 posts in this topic

So first off, i'm completly new to scripting. never really done it so i don't understand it.

Now, i have a helipad that i want to add a script to it's "init" line so that when a chopper lands on it, it can refuel, rearm and repair it, if needed with actions for all three. Please i'm looking all over and cant understand alot of what i'm reading so i needed some direct help :down:

Share this post


Link to post
Share on other sites

I did a quick Youtube search and found these - maybe you can use this idea for refuel also.

 

 

 

or

or check out this thread below:

 

Share this post


Link to post
Share on other sites

You don't need any script if you add some repair, refuel and rearm vehicles in vicinity of the helipad. I prefer this more realistic way.

2 people like this

Share this post


Link to post
Share on other sites

name helo "helo1" and helipad "helipad1"

 

Create a trigger:

 

condition:

(helo1 distance helipad1) < 2 && (isTouchingGround helo1);

on act:

helo1 setVehicleAmmo 1; helo1 setDamage 0; helo1 setFuel 1;

 

If you don't want it to be instantaneous, set the Timeout time to however long you want the helo to have to remain on the pad before.  if you want the rearm, repair, and refuel to take different amounts of time each, create separate triggers for each and set unique timeout times. 

 

EDIT: set trigger to repeat if you want it to work multiple times, else it will only work once.

 

Share this post


Link to post
Share on other sites

1. Create a  trigger

 

type none
activation blufor
activation type present
repeatable
this and ((getPos (thisList select 0)) select 2 < 1)
_handle = [(thisList select 0)] execVM "rearmHelicopter.sqf";

 

2. Create a  "rearmHelicopter.sqf"

 


// type none
// activation blufor
// activation type present
// repeatable
// this and ((getPos (thisList select 0)) select 2 < 1)
// _handle = [(thisList select 0)] execVM "rearmHelicopter.sqf";

private ["_veh"];
_veh = _this select 0;

if (_veh isKindOf "ParachuteBase" || !alive _veh) exitWith {};

if (!(_veh isKindOf "helicopter")) exitWith { 
	_veh vehicleChat "This pad is for Helicopter service only, soldier!"; 
};

_veh vehicleChat "Servicing Helicopter, Stand by...";

_veh setFuel 0;

//---------- RE-ARMING

sleep 15;

_veh vehicleChat "Re-arming ...";

//---------- REPAIRING

sleep 15;

_veh vehicleChat "Repairing ...";

//---------- REFUELING

sleep 20;

_veh vehicleChat "Refueling ...";

//---------- FINISHED

sleep 20;

_veh setDamage 0;
_veh vehicleChat "Repaired (100%).";

_veh setVehicleAmmo 1;
_veh vehicleChat "Re-armed (100%).";

_veh setFuel 1;
_veh vehicleChat "Refuelled (100%).";

sleep 2;

_veh vehicleChat "Service complete. Ready to GO.!";

 

Share this post


Link to post
Share on other sites

Welcome to a crash course in Alien languages.  :D 

Best thing for noobs is to find already made scripts and see how they're made and implemented.  

I use armaholic and search through the scripts on there for cool stuff to add in.  

Also as above, you tube tutorials are the shit.  

1 person likes this

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now