Falsche9
Member-
Content Count
38 -
Joined
-
Last visited
-
Medals
Everything posted by Falsche9
-
How do I change the yaw on a moving vehicle? I try setDir and setVectorDir commands and it stops the vehicle or overwrites the vehicle velocity to [0,0,0]; these 2 examples turn the boat at the required rate and angle but speed is cancelled to 0. boat01 addAction ["<t color='#FFFF00'>Rudder Port 10</t>","rudderLeft.sqf", 10, 0.4, false, true]; _boat = _this select 0; _caller = _this select 1; _amount = _this select 3; _counter = 0; _amount = _amount *10; while {_counter < _amount} do { _counter = _counter + 1; _boatDir = getDir _boat; _boat setDir (_boatDir - 0.1); sleep 0.01; }; this also: boat01 addAction ["<t color='#FFFF00'>Rudder Port 10</t>","rudderLeft.sqf", 10, 0.4, false, true]; _boat = _this select 0; _caller = _this select 1; _amount = _this select 3; _counter = 0; _amount = _amount *10; _vel = velocity _boat; _v1 = 0; _v2 = 0; while {_counter < _amount} do { _dir = round(getDir _boat); If ((_dir >= 0) && (_dir <= 90)) then {_v1 = -0.015; _v2 = 0.0015;}; If (_dir >= 90 && _dir <= 180) then {_v1 = 0.0015; _v2 = 0.0015;}; If (_dir >= 180 && _dir <= 270) then {_v1 = 0.0015; _v2 = -0.0015;}; If (_dir >= 270 && _dir <= 360) then {_v1 = -0.0015; _v2 = -0.0015;}; _counter = _counter + 1; _vecDir = vectorDir boat01; _boat setVectorDir [(_vecDir select 0) + _v1,(_vecDir select 1) + _v2,_vecDir select 2]; _boat setVelocity _vel;//I put this here to keep velocity but no effect sleep 0.001; };
-
Change Yaw on moving vehicles
Falsche9 replied to Falsche9's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks Tajin - that works! -
Change Yaw on moving vehicles
Falsche9 replied to Falsche9's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks again - that also doesn't work. BIS_fnc_UnitCapture is not suitable as I was trying to script a sailing dinghy with the "C_Boat_Civil_01_F" and steer it from cargo positions 1&2 so the helm switches sides as in reality. So far I have a moving sail and the mathematics done for velocity relative to wind/sail angle. I thought the steering would be the easy part! It's not so bad, I will just have to use the driver position instead. -
Change Yaw on moving vehicles
Falsche9 replied to Falsche9's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for reply but it doesn't work - boat has 0 velocity until loop is finished. How do BIS steer vehicles? Is there a script somewhere for WASD keys? I will try with setVelocityTransformation also. -
Need help with towing script!
Falsche9 replied to Yolo Joe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Anyone tried setVelocityTransformation ? setVelocityTransformation example /* Rope Towing Script for Arma3 --->> setVelocityTransformation Not a bad result with only a little stutter and better than either setVelocity or attachTo as all vectors/directions are matched without rigid link, but strage things can happen if the rope is too short or _time value is too low. 0 = [car1,car2] execVM "tow.sqf"; */ private ["_v1","_v2","_rope","_dist","_time","_spd","_v1_pos","_dir","_newPos","_arr"]; _v1 = _this select 0; _v2 = _this select 1; _rope = ropeCreate [_v1, [0,-3,0], _v2, [0,1.5,-1], 10]; _dist = 12; while {alive _v1} do { _time = 0.07;//set this too low and bungee effects! _spd = speed _v1; _v1_pos = getPosASL _v1; _dir = (getDir _v1) + 180; _newPos = [ (_v1_pos select 0) + _dist*sin _dir, (_v1_pos select 1) + _dist*cos _dir, _v1_pos select 2 ]; _arr = [getPosASL _v2, _newPos, velocity _v2, velocity _v1, vectorDir _v2, vectorDir _v1, vectorUp _v2, vectorUp _v1, _time]; if (_spd > 1) then {_v2 setVelocityTransformation _arr}; }; edit: something needs adjusting in the array - works well on flat terrain nut goes FUBAR on hills - towed car floats. -
turn helicopter lights on and point to a marker position?
Falsche9 replied to craptakular's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I put this in the waypoint of a helicopter to make it chase the player with it's spotlight on. Works best if you are in a fleeing vehicle. Maybe you can adapt it? null = [] spawn {while {true} do { (driver heli1) action ["lightOn", heli1]; sleep 0.01;};}; null = [] spawn {while {true} do {_index = currentWaypoint group heli1; [group heli1, _index] setWaypointPosition [position player, 0]; sleep 1};}; -
activate trigger when open a door on a metal container?
Falsche9 replied to craptakular's topic in ARMA 3 - MISSION EDITING & SCRIPTING
container named c1 Trigger Activation: anyone once Cond: ((c1 animationPhase 'Door_1_rot') >= 0.5 || (c1 animationPhase 'Door_2_rot') >= 0.5) onAct: hint "c1 door open"; onDeac: hint "c1 door closed"; Condition is in the config viewer under user actions (there is no ID for editor placed objects) -
Teleport vehicle with others players in.
Falsche9 replied to sgt.cr@$h's topic in ARMA 3 - MISSION EDITING & SCRIPTING
TAG_fnc_teleport = { (vehicle player) setPos _pos; hintSilent format ["Moved to grid %1", mapGridPosition player]; ["Teleport_ID", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; }; ["Teleport_ID", "onMapSingleClick", "TAG_fnc_teleport"] call BIS_fnc_addStackedEventHandler; Does anyone notice that if you set this up to work for 1 teleport only it breaks the shift + LMB player waypoint function? Try the above code, teleport, then open map again, press shift + Left Mouse Button and you do not get a waypoint. -
Remove the other magazines from the F18-E: (You can see this in the config viewer) this removeMagazineGlobal "js_m_fa18_m61"; {this removeMagazineGlobal "js_m_fa18_aim9x_x1";} forEach [1,2]; {this removeMagazineGlobal "js_m_fa18_aim120c_x1";} forEach [1,2,3,4]; {this removeMagazineGlobal "js_m_fa18_Maverick_x1";} forEach [1,2]; Place a JTAC unit near your opfor target. The AI JTAC will laser the target for you. Or laser the target yourself - the AI pilot will bomb the target with the above code.
-
How to make Bridges Indestructible ?
Falsche9 replied to pawelkpl's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Does this thing happen when the server is locked an no one else joined? ;) -
Change position in vehicle
Falsche9 replied to beerhunter125's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It does sound like it?! Press F2 to select you 1st AI teamate Press 4 to display nearby vehicles Select the vehicle from the list Menu will appear with something like 1.Anywhere 2.Driver 4.Gunner 5.Ride in back If there is only 1 vehicle on the map the keys to press in sequence will be F2-4-2-2 to move your 1st AI team mate into the driver position of the vehicle. -
Change position in vehicle
Falsche9 replied to beerhunter125's topic in ARMA 3 - MISSION EDITING & SCRIPTING
As fight9 said it's all still there in the commanding menu and has not changed since Arma2? Select AI with F1 - F11 Vehicle options are 4 key Select vehicle and seating options menu appears get in: Driver,Gunner,Commander,Ride in Back Select driver with function keys then move to - open map and click middle mouse button. -
Why won't these vehicles move when spawned?
Falsche9 replied to Flens's topic in ARMA 3 - MISSION EDITING & SCRIPTING
http://community.bistudio.com/wiki/setVehicleVarName http://community.bistudio.com/wiki/moveInCargo unitName moveInCargo [vehicle, CargoIndex] http://community.bistudio.com/wiki/assignAsCargoIndex http://community.bistudio.com/wiki/orderGetIn _unit1 assignAsCargoIndex [_vcl, 1]; [_unit1] orderGetIn true; -
AI Attack/Destroy Neutral or Civillian Targets
Falsche9 replied to ParaStrike's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you want enemy aircraft to destroy a building use a laserTarget: _nBuild = [0,0,0] nearestObject 26967;//replace with building ID _box = boundingBox _nBuild; _height = _box select 1 select 2; _lt = "LaserTargetE" createVehicle [0,0,0]; _lt attachTo [_nBuild,[0,0,_height]]; -
How do you find out what type of explosive hit an object?
Falsche9 replied to brians200's topic in ARMA 3 - MISSION EDITING & SCRIPTING
results from config viewer: configfile >> "CfgAmmo" >> "DemoCharge_Remote_Ammo" = ["PipeBombBase","PipeBombCore","TimeBombCore","Default"] configfile >> "CfgAmmo" >> "SatchelCharge_Remote_Ammo" = ["PipeBombBase","PipeBombCore","TimeBombCore","Default"] -
How do you find out what type of explosive hit an object?
Falsche9 replied to brians200's topic in ARMA 3 - MISSION EDITING & SCRIPTING
this script detects explosions: //nul = [this,25] execVM "exploDetector.sqf"; private ["_list","_unit","_range","_target","_class","_fired","_fnc_exb"]; _fnc_exb = { _item = _this select 0; _class = typeOf _item; waitUntil {!(alive _item)}; player sidechat format ["%1 exploded",_class]; }; _unit = _this select 0; _range = _this select 1; _fired = []; while {alive _unit} do { _list = (position _unit) nearObjects ["Default",_range]; if (count _list >=1) then { _ammo = _list select 0; if (!(_ammo in _fired)) then { nul = [_ammo] spawn _fnc_exb; _fired = _fired + [_ammo]; }; }; sleep 0.01; }; -
_ret = [ configfile >> "CfgVehicles" >> "I_Heli_light_03_F", {getText (configfile >> "CfgVehicles" >> "I_Heli_light_03_F" >> "displayName")} ] call BIS_fnc_uniqueClasses; copyToClipboard (str (_ret)); _ret: Do not ask me what it means - no clue. Diagnostic function to see what information feeds to the class from the config tree?
-
Popup Target hitmarker
Falsche9 replied to joejoe87577's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I came up with something similar: place a "Simple Target" (class "Target_F") on your range and put this in the init: this addEventHandler ["HitPart", {_spr = "Sign_Sphere10cm_F" createVehicle [0,0,0]; _spr setPosASL (_this select 0 select 3);}]; this worked on vehicles and other signs too. -
IR Lazer not working when force it on action
Falsche9 replied to thetrooper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This works: player removePrimaryWeaponItem "acc_pointer_IR"; player addPrimaryWeaponItem "acc_flashlight"; //then player action ["GunLightOn", player]; //then player action ["GunLightOff", player]; IRLaser action does not. AI will use laser during combat with this code but I also can't get player laser to work: unitName enableIRLasers true; -
Splendid Animation Viewer Broken?
Falsche9 replied to sproyd's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Working here - did you start the viewer again? Try A & P set to unknown for a larger list. -
It probably could be added to the module for anyone that can't type or copy and paste text in init lines.
-
Newbie on Missions Edition pls help
Falsche9 replied to Chippy's topic in ARMA 3 - QUESTIONS & ANSWERS
Firstly it is better to ask these questions in the mission editing forum: http://forums.bistudio.com/forumdisplay.php?162-ARMA-3-MISSION-EDITING-amp-SCRIPTING Place another 32 units on the map and set them to playable. -
"B_IRStrobe" createVehicle (getMarkerPos "markerName"); "I_IRStrobe" createVehicle (getPosATL player); "O_IRStrobe" createVehicle (position something);
-
making ai take more damage
Falsche9 replied to Azza FHI's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Put this loop into a file called initServer.sqf in the mission folder or execVM the loop file from initServer.sqf. while {true} do { { if ( side _x == EAST) then { if (_x isKindOf "Man") then { _x removeAllEventHandlers "HandleDamage"; _x addEventHandler ["HandleDamage",{_damage = (_this select 2)*2; _damage}]; }; }; }forEach allUnits; sleep 300; }; or [] execVM "damageLoop.sqf"; https://community.bistudio.com/wiki/Event_Scripts -
making ai take more damage
Falsche9 replied to Azza FHI's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is a script used for testing, replaces fired bullet with another type: _soldat = _this select 0; TAG_fnc_kugelErsetzen = { _kgl = _this select 0; _vel = velocity _kgl; _pos1 = getPosATL _kgl; _nKgl = "B_127x108_Ball" createVehiclelocal _pos1; _nKgl setVelocity _vel; }; _soldat addEventHandler ["fired", { if (_this select 1 == (primaryWeapon (_this select 0))) then { [_this select 6] call TAG_fnc_kugelErsetzen; } }]; /* "B_762x51_Ball" "B_127x108_Ball" "B_20mm" */