Forum Jump :

Author Message


Posts: 45
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2017-09-18 21:08        
     
I.m trying to get this script to work but have some questions about just what to do. Please help if You can.

I have the Grey Eagle drone working. I wish to rearm, refuel aand repair it on a A3 Apex Stratis map. However, I may be doing something wrong or just don't understand the instalation instructions.
---------------------------------------------------------------------------------------------------------------------

Installation / Usage:
- Place a trigger on your map. The defined area of the trigger in the editor translates to the area a vehicle must enter to be serviced.------ OK Did that no problem.

- Ensure that the trigger is set to be activated repeatedly and may be activated by anyone or whomever you wish it to be activated by. -----OK Did that no problem.

- For land vehicles, place this in the trigger conditions
("LandVehicle" countType thislist > 0) && ((getpos (thislist select 0)) select 2 < 1)

I did'nt use theis part because I don't have any land vehicles on the map as of yet.

Question: Is trigger condition the same as init field?

- For air vehicles, place this in the trigger condition and replace triggername with the name of the trigger:
(getPos ((list triggername) select 0) select 2) <= 1

Question here: Do i have to give the trigger a name? Above I see "LandVehicle" used in the landvehicle script. Do i name the airvehicle "AirVehivle" ?

- Place the following into the Trigger On Act field.
_xhandle= (thislist select 0) execVM "x_reload.sqf"; OK Did that no problem.
-------------------------------------------------------------------------------------

Last Question: Do I have to do the below steps if I'm just trying to test the script out in the Eden Editor?
This ensures that the script fires upon trigger activation.

- Copy & Paste the included x_reload.sqf into your mission file.
- Export your mission to pack it into a PBO. Enjoy!
------------------------------------------------------------------------------------------------------------
Please Help? DBD


Author Message


Posts: 106
Rank:


Level: Member

Country: us
Location: Pennsylvania
Occupation:
Age:
In-game name: Xian

 
#2 Posted at 2017-09-19 01:23        
     
I've used this same script in an MP mission for my players. Here's what I did:



Make a note of the first arrow, I named my trigger repair_trig. In my 3rd arrow, the condition of my trigger, I called my trigger's List. That's what they mean by naming your trigger. I can be anything but needs to be named.

This post was edited by XianGrim (2017-09-19 01:35, 87 days ago)


Advertisement


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2017-09-19 01:42        
     
Wont the above fire for none aircraft as well?

if you need it to work on just a certain type of vehicle they you need to filter it.

{_x iskindof "AIR" && isTouchingGround _x}  count thislist  > 0

that may not work on the carrier as I don't know if it's classed as ground so this may work

{_x iskindof "AIR" && (getpos (_x) select 2) <1  } count thislist > 0


Another way would be to use an eventhandler placed in the vehicle init
when the engine is turned off it checks if it's inside the named trigger and executes the script

this addeventhandler ["engine",{if ([rep_trigger, (_this select 0) ] call BIS_fnc_inTrigger && isTouchingGround (_this select 0)) then {_xhandle= (_this select 0) execVM "x_reload.sqf"} }]

This post was edited by F2kSel (2017-09-19 02:14, 87 days ago)


Author Message


Posts: 45
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2017-09-19 21:39        
     
Thank's for the help XianGrim and F2kSel. I heed to get some things your posts above.

1. I will name the trigger "repair_trig" as XiamGrim suggests. The picture of the activation box listed above is too small fro me to read even with a magnifying glass. Can you please tell me what to put in the required Activation box fields. i.e.

-----------------------------------------------------------------------------------------------------
Trigger Nane = repair_trig

Trigger Conditions = (getPos ((list triggername) select 0) select 2) <= 1

Trigger On Act field. = _xhandle= (thislist select 0) execVM "x_reload.sqf"

-----------------------------------------------------------------------------------------------------
This is what I think I'm suppose to from the reply from XiamGrim. Please confirm or correct me. If you can list just what I need to place in each box that would be very helpful. Than's again DBD

P.S. F2kSel, I'm not a programmer so I will take a closes look at You reply after i get a better understanding of XiamGrim's reply. Or maybe You can answer some of my current ?'s. All of the instalation instructions that I listef on my first post are from the original scrip. I only know how to follow directions but sometimes the directions (in this case) are sorta vague for noobs like me.


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2017-09-20 00:38        
     
you have it about right, don't forget to change triggername to the actual name of the trigger
Trigger Conditions = (getPos ((list repair_trig) select 0) select 2) <= 1
Although I suspect it will trigger for any ground unit.

- Copy & Paste the included x_reload.sqf into your mission file.
correct, you only need to make a PBO when you've done and to wish to test in MP other wise just run from the editor in SP


Author Message


Posts: 45
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2017-09-26 16:59        
     
Thank's again for the help. I gave it another try but sitll no go. Maybe I'm not getting something right. Like I mentioned above I want to get the Greyeagle drone to re-arm, re_fuel and repair. I start a sceannario in the editor and seend a drone over to a target. When in the mode that lets one select the place to send the drone (a map with the drone windows (Pilot and Gunner windows) on the left side we have the drone status window that lets one see the amount of fuel and weapons. When the fuel gets down to about 80% I send the drone to land back at the base where the re-fuel, re-arm and repair trigger is located. However, when the drone gets to the trigger nothing happens. i.e, no re-Fuel or re_arming. Question, do I have to do something else or what?


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2017-09-27 01:46        
     
You could just use the repair vehicles and if you park the drones next to them they will repair refuel and rearm for you.

If you do want a trigger here's an example, just park either drone in the area in front of you.
drone_trigger


Author Message


Posts: 45
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2017-09-28 17:24        
     
I parked the Fuel, Ammo, and first Aid vehicles along side of the runway before I tried the script. It did.nt work. However I will give it another try.