Cryptdik 5 Posted April 17, 2017 I had a sweet idea that I'm working on here. I want to make a support option that spawns a vehicle (chopper, car, submersible, whatever) at a designated marker with a respawn point attached and then moves to another designated marker, activates a new respawn point outside the vehicle and boots anyone in it out and locks it (to prevent the player riding the vehicle out of the area) and after one or two minutes it heads back to the spawning marker before being deleted. I know how to set up all the individual parts like setting up the respawn point for the vehicle before and after and booting them out, but how would I go about linking this all together (probably in an SQF I'm guessing) effectively? The setup: For the mobile respawn point I'm using the below in an SQF with the associated Init scrips in the editor. As for locking the vehicle, kicking the player out and creating a new respawn point that isn't attached to the vehicle I can figure that out myself. Also for spawning the player inside the vehicle AND creating custom support options (which I've looked into just a little) I may need some help with as well. Also it would probably take some command to force the vehicle to stay put, maybe setting its fuel to 0 for a certain amount of time and then setting it back to full when it is time for it to leave. _marker = _this select 0; _vehicle = _this select 1; while {alive _vehicle} do { _marker setmarkerpos getpos _vehicle; sleep 3; }; deletemarker _marker; This would be really cool to be able to execute if you ask me. Help is appreciated! Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 17, 2017 4 hours ago, Cryptdik said: I had a sweet idea that I'm working on here. I want to make a support option that spawns a vehicle (chopper, car, submersible, whatever) at a designated marker with a respawn point attached and then moves to another designated marker, activates a new respawn point outside the vehicle and boots anyone in it out and locks it (to prevent the player riding the vehicle out of the area) and after one or two minutes it heads back to the spawning marker before being deleted. I know how to set up all the individual parts like setting up the respawn point for the vehicle before and after and booting them out, but how would I go about linking this all together (probably in an SQF I'm guessing) effectively? The setup: For the mobile respawn point I'm using the below in an SQF with the associated Init scrips in the editor. As for locking the vehicle, kicking the player out and creating a new respawn point that isn't attached to the vehicle I can figure that out myself. Also for spawning the player inside the vehicle AND creating custom support options (which I've looked into just a little) I may need some help with as well. Also it would probably take some command to force the vehicle to stay put, maybe setting its fuel to 0 for a certain amount of time and then setting it back to full when it is time for it to leave. _marker = _this select 0; _vehicle = _this select 1; while {alive _vehicle} do { _marker setmarkerpos getpos _vehicle; sleep 3; }; deletemarker _marker; This would be really cool to be able to execute if you ask me. Help is appreciated! I am not sure what is it you need help with mate Share this post Link to post Share on other sites
Cryptdik 5 Posted April 17, 2017 OnAct: myhelo = [getMarkerPos "supporthelospawn", 0, "B_Heli_Transport_01_F", west] call BIS_fnc_spawnVehicle; createVehicleCrew (myhelo select 0); heloway1 = (group myhelo) addWaypoint [getposatl (thislist select 0), 0]; heloway1 setWaypointType "LAND"; heloway1 setWaypointBehaviour "aware"; heloway1 setWaypointCombatMode "yellow"; heloway1 setWaypointSpeed "FULL"; heloway1 setWaypointCompletionRadius 30; OnDeact: myhelo setfuel 0; marker1 = createMarker ["respawn_west", position myhelo]; sleep 60; myhelo setfuel 1; heloway1 setWaypointType "MOVE"; heloway1 setWaypointBehaviour "CARELESS"; heloway1 setWaypointCombatMode "yellow"; heloway1 setWaypointSpeed "FULL"; heloway1 setWaypointCompletionRadius 30; deleteMarker marker1 If I have something like this in a trigger, what's a way to make it function using a support menu option? Share this post Link to post Share on other sites
Midnighters 152 Posted April 17, 2017 6 hours ago, Cryptdik said: OnAct: myhelo = [getMarkerPos "supporthelospawn", 0, "B_Heli_Transport_01_F", west] call BIS_fnc_spawnVehicle; createVehicleCrew (myhelo select 0); heloway1 = (group myhelo) addWaypoint [getposatl (thislist select 0), 0]; heloway1 setWaypointType "LAND"; heloway1 setWaypointBehaviour "aware"; heloway1 setWaypointCombatMode "yellow"; heloway1 setWaypointSpeed "FULL"; heloway1 setWaypointCompletionRadius 30; OnDeact: myhelo setfuel 0; marker1 = createMarker ["respawn_west", position myhelo]; sleep 60; myhelo setfuel 1; heloway1 setWaypointType "MOVE"; heloway1 setWaypointBehaviour "CARELESS"; heloway1 setWaypointCombatMode "yellow"; heloway1 setWaypointSpeed "FULL"; heloway1 setWaypointCompletionRadius 30; deleteMarker marker1 If I have something like this in a trigger, what's a way to make it function using a support menu option? I don't recommend that you use triggers at all for this. do you not know how to execute scripts? SQF_syntax ArmA:_Introduction_to_Scripting two examples of execution of a script: [param1,param2,param3] execVM "scripts\myScript.sqf"; [param1,param2,param3] call compile "scripts\myScript.sqf"; Share this post Link to post Share on other sites