GreatKeeper
Member-
Content Count
5 -
Joined
-
Last visited
-
Medals
Everything posted by GreatKeeper
-
Issues with caller in addAction whilst in vehicle
GreatKeeper posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
TEST_Attach = { _object = _this select 0; _unit = _this select 1; _id = _this select 2; _object attachTo [_unit, [0,-5,0]]; _unit removeAction _id; _unit setVariable ["object", _object]; _unit addAction ["<t color=""#FF0000"">Release</t>",{call TEST_Release},"", 12, false, true,"",""]; }; TEST_Release = { _unit = _this select 1; _id = _this select 2; _object = _unit getVariable "object"; _object attachTo [_unit, [0,-6,0]]; detach _object; _unit removeAction _id; }; {_x addAction ["<t color=""#0000FF"">Tow</t>",{call TEST_attach}, "", 12, false, true, "", "_this distance cursorTarget < 5"]; } forEach vehicles; I'm new to SQF and I'm having problems. I can't see what I'm doing wrong however that script works perfectly on a player walking around and attaching vehicles and releasing. The problem is if the player or unit is in another car the option comes up however the car they are in instead of the target gets stuck back. I'm not really sure why this works when not in a car but stops working when they get in a car. Any help appreciated! -
Issues with caller in addAction whilst in vehicle
GreatKeeper replied to GreatKeeper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi Hi, I'm still having the same problem, when I tow the vehicle my own vehicle gets stuck and 5 metres back. I increased the "_this distance cursorTarget < 5" to 20 but it still is having issues. -
Issues with caller in addAction whilst in vehicle
GreatKeeper replied to GreatKeeper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Okay thanks I will try increasing distance, this is more of a script to help me learn than one to be released. Thanks! -
Help with addaction using cursor targets
GreatKeeper posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
{ if (vehicle player == player) && (typeOf cursorTarget) == vehicle; then { _x addAction ["<t color=""#0000FF"">Tow</t>", {hint "test"};, "", 6, false, false, "", "_this distance cursorTarget < 3"]; }; } forEach vehicles; ^^^^ Trying to get the above to do my hint "test" when the player is in any vehicle and looking at another vehicle that happens to be less that 3m away. I am execVM'ing the script. Unfortunately I can't seem to get it to work so does anyone mind showing me a working way or pointing out any errors, much appreciated! Of course I will replace the hint "test" with an attachTo script but that's not what I need help with :) -
Help with addaction using cursor targets
GreatKeeper replied to GreatKeeper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@killzone_kid Hey, I have removed the ; but where should I put the brackets you are suggestion? @Nikander Sorry that didn't work :(