fireshadows10
Member-
Content Count
12 -
Joined
-
Last visited
-
Medals
Community Reputation
3 NeutralAbout fireshadows10
-
Rank
Private First Class
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Driving waypoints help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This doesn't give me any error but it spawns a waypoint 20km away. Also the arrows don't show up anymore. private "_examVehicle_dir"; params ["_monitor","_examinedplayer","_id","_parameters"]; _parameters params ["_examtype","_examvehicle","_examtimeout", "_examlocation", "_examVehicle_dir"]; private _exam_veh = _examvehicle createVehicle getMarkerPos "drivingcheckpoint_0"; _exam_veh lock true; _examinedplayer action ["GetInDriver", _exam_veh]; _examinedplayer moveInDriver _exam_veh; hint "Your Driving License exam began! Follow the checkpoints!"; private _grp = group _examinedplayer; private ["_wpt","_helper","_mkr","_pos"]; private _mkrs = ["car_orino_1","car_orino_2","car_orino_3","car_orino_4","car_albera_1","car_albera_2","car_albera_3","car_albera_4","car_albera_5","car_albera_6"]; {_x setMarkerAlpha 0} forEach _mkrs; private _helpers = []; while {count waypoints _grp >0} do {deleteWaypoint [_grp,0]}; for "_i" from 0 to count _mkrs -1 do { _mkr = createMarkerLocal [format ["%1_%2_%3",_exam_type,_examlocation,_forEachIndex], somePositions #_forEachIndex]; _pos = getMarkerPos _mkr; _wpt = _grp addWaypoint [_pos,0,-1]; _wpt showWaypoint "never"; _wpt setWaypointStatements ["this distance2D waypointPosition [group this,currentWaypoint group this] <15",""]; _helper = "Sign_Arrow_Large_blue_F" createVehicleLocal _pos; _helper setpos (getpos _helper vectorAdd [0,0,3]); _helper setObjectScale 3; _helpers pushBack _helper; _mkr setMarkerTypeLocal "mil_circle"; _mkr setMarkerColorLocal "colorBlue"; _mkr setMarkerAlphaLocal 1; [_helpers,_grp,_mkrs] spawn { params ["_helpers","_grp","_mkrs","_currHelper","_nextHelper"]; _idx = currentWaypoint _grp; while {sleep 0.1; !isNull objectParent player && _idx < count _mkrs} do { _currHelper = _helpers select _idx; _currHelper setObjectTexture [0,"#(argb,8,8,3)color(1,0,0,0.75,ca)"]; _mkr = _mkrs select _idx; _mkr setMarkerColorLocal "colorRed"; waitUntil {sleep 0.1; currentWaypoint _grp > _idx or isNull objectParent player}; _currHelper setObjectTexture [0,"#(argb,8,8,3)color(0,1,0,0.75,ca)"]; _mkr setMarkerColorLocal "colorGreen"; _idx = _idx +1; }; {deleteVehicle _x} foreach _helpers; {_x setMarkerAlphaLocal 0} forEach _mkrs; while {count waypoints _grp >0} do {deleteWaypoint [_grp,0]}; }; }; -
Driving waypoints help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi I have a question. I plan to make this script more flexible, and by that I mean that I want players to be able to take the exams in 3 different cities. Also, there will be two kinds of exams, one for regular cars and one for trucks. So my idea is this: I want to add an additional parameter, which is _examlocation. Furthermore, I want the checkpoints to be named using this format: "examType_dcp_examLocation_checkpointNumber" for example car_dcp_kavala_1. How can I edit the checkpoint-defining line to make it more customizeable according to this format? I was thinking about using this, but I'm not sure how I would code the part which finds all the matching checkpoints and includes them into private _mkrs private _mkrs = format ["%1_ecp_%2_%3",_exam_type, _exam_location, number]; Thank you! -
Driving waypoints help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I understand, thank you very much! -
Driving waypoints help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi Works like a charm! Thank you so much friend, you helped me more than you can imagine! I will take a while to try and understand the script itself, I'll let you know if there's any lines of code that I don't understand, if I find any I'll kindly ask for help, hopefully you'll be able to explain them when/if you'll have a little time. One more thing: the text of the waypoints (the arma 3 white ones, not the arrows or map markers ) show "MOVE" when you reach them and "HOLD" when you haven't reached them yet. How can I change that text? I was thinking of maybe having them say "Drive Here" or better yet, have them give custom directions - for example, "drivingcheckpoint_1" can say "FORWARD", "drivingcheckpoint_2" says "TURN LEFT", and so on. Maybe a system to just have them all say "FORWARD" except the final one which should say "FINISH" and custom ones that I'll change depending on the direction that follows the marker for example "TURN LEFT" or "TURN RIGHT" Once again, I want to thank you for your help and time, it means a lot to me! I hope you have an amazing day! -
Driving waypoints help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi Wow, your script is amazing! It is much better than I initially imagined it! Thank you very much! I am getting an error saying "Invalid number at expression" at line 59 which is the very last line: }; Got any idea what that means and how I can fix it? EDIT: This is also the entire script, thought it could be useful private ["_examtype", "_examvehicle", "_examtimeout", "_examvehicle_dir", "_examinedplayer"]; _examtype = _this select 3 select 0; //variables from the Editor NPC which activates the Driving Exam _examvehicle = _this select 3 select 1; _examtimeout = _this select 3 select 2; _examinedplayer = _this select 1; _examtype = _this select 3 select 0; private ["_exam_veh"]; _exam_veh = _examvehicle createVehicle getMarkerPos "drivingcheckpoint_0"; //Spawn desired vehicle at marker _exam_veh lock true; _examinedplayer action ["GetInDriver", _exam_veh]; // This works on dedicated server _examinedplayer moveInDriver _exam_veh; //This works locally hint "Your Driving License exam began! Follow the checkpoints!"; //_checkpoint_pos = getMarkerPos "drivingcheckpoint_2"; //_waypoint = (group _examinedplayer) addWaypoint [_checkpoint_pos, 0]; //_waypoint setWaypointCompletionRadius 0; //_waypoint setWaypointType "HOLD"; //_waypoint setWaypointDescription "Drive Here"; private _grp = group _examinedplayer; private ["_wpt","_helper","_mkr","_pos"]; private _mkrs = ["drivingcheckpoint_1","drivingcheckpoint_2","drivingcheckpoint_3","drivingcheckpoint_4"]; {_x setMarkerAlpha 0} forEach _mkrs; private _helpers = []; while {count waypoints _grp >0} do {deleteWaypoint [_grp,0]}; for "_i" from 0 to 4 do { _mkr = _mkrs #_i; _pos = getMarkerPos _mkr; _wpt = _grp addWaypoint [_pos,0,-1]; _wpt showWaypoint "never"; _wpt setWaypointStatements ["this distance2D waypointPosition [group this,currentWaypoint group this] <15",""]; _helper = "Sign_Arrow_Large_blue_F" createVehicleLocal _pos; _helper setpos (getpos _helper vectorAdd [0,0,3]); _helper setObjectScale 3; _helpers pushBack _helper; _mkr setMarkerType "mil_circle"; _mkr setMarkerColor "colorBlue"; _mkr setMarkerAlpha 1; [_helpers,_grp,_mkrs] spawn { params ["_helpers","_grp","_mkrs","_currHelper","_nextHelper"]; _idx = currentWaypoint _grp; hint str _idx; while {sleep 0.1; !isNull objectParent player && _idx < count _mkrs} do { _currHelper = _helpers select _idx; _currHelper setObjectTexture [0,"#(argb,8,8,3)color(1,0,0,0.75,ca)"]; _mkr = _mkrs select _idx; _mkr setMarkerColor "colorRed"; waitUntil {sleep 0.1; currentWaypoint _grp > _idx or isNull objectParent player}; _currHelper setObjectTexture [0,"#(argb,8,8,3)color(0,1,0,0.75,ca)"]; _mkr setMarkerColor "colorGreen"; _idx = _idx +1; }; {deleteVehicle _x} foreach _helpers; {_x setMarkerAlpha 0} forEach _mkrs; while {count waypoints _grp >0} do {deleteWaypoint [_grp,0]}; }; }; -
Driving waypoints help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks you very much, friend! Appreciate your help a lot! Will try your script asap, seems more interesting than what I was initially thinking! -
-
Hello people! Hope you all have a great afternoon. I made a script that lets players use an action on an NPC - this action spawns a car and places the player inside the car. I want to make some sort of checkpoint/waypoint system - the player has to drive the car through each one consecutively (meaning you can't jump from checkpoint 1 to checkpoint 3, you have to go through all of them) What is a good way to do this? I am a new scripter and I've been researching for a while but sadly I can't come to a conclusion. I was thinking maybe I can place a few map markers named checkpoint_1, checkpoint_2, checkpoint_3, etc. and when the player reaches a checkpoint, the next one becomes active and so on. Preferably, I would like it to also show on map (like when you shift+click in game and it places a visible waypoint that the player actually sees in the world and not just on the map) Last but not least, at the final checkpoint I want the vehicle to be removed and the player to be taken out of it. (this might not be a problem to do for me although I though I should mention this aswell) Thank you in advance!
-
moveInDriver help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Conclusion: My original code seems to work after all. Apparently, I was editing the wrong fn_drivingexam file, not the one in the actual mission I was testing on. I'm an idiot. Thank you @sarogahtyp for your help and swift responses! -
moveInDriver help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you very much, friend, for the quick and helpful responses! I am grateful! I will mess around with what I learned from you and post back once I get home, hopefully I'll get it to work (I spent an entire day just trying to get that vehicle to spawn so as you can imagine I'm not that much of a scripter, yet) -
moveInDriver help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The simulation is disabled only on the NPC which gives out the option to Being the driving exam, not on the player. Basically, I'm trying to make a system which allows people to pass a drivers test before getting a drivers license. The NPC's simulation is not needed for that purpose as its only purpose is to act as an activator for players. thank you for your response, will check soon as I'm at work now. Also, can you explain the params part and the _args_array params? I don't really understand what they do. Thank you! -
moveInDriver help
fireshadows10 replied to fireshadows10's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have only tested it in Eden editor, will try your fix then I'll come back with the results. Thank you for your time! EDIT: Still does not work. The script only spawns the vehicle but the player is not placed inside of it. -
Hello, learning scripter here. Hope you all have a pleasant afternoon! So, after countless hours of headaches I managed to make an addAction on an NPC that spawns a car at a custom checkpoint. However I have no idea why the player who activated the action does not get teleported into the vehicle. Any help and explainations would be much appreciated! This is the code inside the NPC in the Editor: this allowDamage false; this enableSimulation false; this addAction ["Car Driving Exam", "drivingexam\fn_startexam.sqf", ["car_license_exam", "C_Offroad_01_F", 55, 80]]; This is the "fn_startexam.sqf" script: private ["_examtype", "_examvehicle", "_examtimeout", "_examvehicle_dir", "_examinedplayer"]; _examtype = _this select 3 select 0; //variables from Editor NPC _examvehicle = _this select 3 select 1; _examtimeout = _this select 3 select 2; _examinedplayer = _this select 1; private ["_exam_veh"]; _exam_veh = _examvehicle createVehicle getMarkerPos "drivingcheckpoint_0"; //Spawn desired vehicle at marker _examinedplayer hint "bla bla"; _examinedplayer action ["GetInDriver", _exam_veh]; // This works on dedicated server _examinedplayer moveInDriver _exam_veh; //This works locally The car spawns successfully however the rest of the code does nothing. It seems to me like the code does not find the player who activated the action, although I am new so I don't know much. I defined it as select 1 since I believe 0 is meant to be the activator object and 1 the player who activates. Thank you in advance!