-
Content Count
753 -
Joined
-
Last visited
-
Medals
Everything posted by 7erra
-
Create tree that can be destroyed?
7erra replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The problem is that trees and other terrain objects don't have a classname. createVehicle requires such. (nearestTerrainObjects [player, ["Tree","Bush"], 200]) apply {typeOf _x} will return an array of empty strings. Using a mod is an option though, eg: Arma's Nature -
Help required for Dialogs.
7erra replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
More like -
Help required for Dialogs.
7erra replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you want to use a dialog with cutRsc or any other Rsc command you have to put it in the RscTitles config: class RscTitles { class TER_RscDisplayTargetDebug { idd = 73042; fadeIn = 0; fadeOut = 0; duration = 1e+6; onLoad = "uiNamespace setVariable [""TER_3den_RscTargetDebug_display"",_this select 0]"; class controls { ... }; }; }; These kinds of displays behave a little different from "normal" dialogs, eg they are not accessible via findDisplay. -
BIS_fnc_addVirtualBackpackCargo not adding backpacks?
7erra replied to 7erra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hm I just tested some other backpacks. Most of them seem to work, I only used the one that was not working (why ever). My test backpack was B_AssaultPack_mcamo_Ammo. -
BIS_fnc_addVirtualBackpackCargo not adding backpacks?
7erra replied to 7erra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nope, works both. Also I tried both. -
How to set custom cost in zeus to units from addon
7erra replied to erikcz-f05fb571f456ccac's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well there is BIS_fnc_curatorObjectRegisteredTable to set costs of specific units. This might be a bit of work though. -
v1.8 - "Watch Unit" Update It took some time but here it is, the promised overhaul of the debug console. I moved the Custom Commands and Extra Watch Fields to their own pages while making the area bigger as a whole. While I was at it I added the Watch Unit page where you can look what someone/something is doing in a live feed. If (you have problems OR suggestions) then {keep 'em coming}; I'm always trying to improve ;) Here are my plans for v1.9: - Something similar to the color picker but with Procedural Textures - Make the camera of the live feed turnable - Debug trigger outlines - Global/mission related notepad (- Add the custom watch fields to the live watch) <-- Ugh hard 7erra
-
Forcing a player to do an animation without it being cancelled
7erra replied to pognivet's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Modified version of another script of mine: _flag = this; _afterCommand = {}; _fncOwnFlag = { params ["_winSide"]; _flagPath = "\a3\data_f\flags\%1.paa"; _fileFlag = switch _winSide do { case west: {"flag_nato_co"}; case east: {"flag_csat_co"}; case independent: {"flag_aaf_co"}; default {"flag_white_co"} }; format [_flagPath,_fileFlag]; }; _actionParams = ["_flag", "_caller", "_actionId", "_arguments"]; _flag setflagAnimationPhase 1; _flag setFlagTexture (civilian call _fncOwnFlag); _flag setVariable ["TER_flagSide",civilian]; _icon = "\a3\ui_f\data\igui\cfg\holdactions\holdaction_takeoff2_ca.paa"; _duration = 10; _addID = [_flag, "Capture Flag", _icon, _icon, "_target getVariable [""TER_flagSide"",civilian] != side _this", "true", { params ["_flag", "_caller", "_actionId", "_arguments"]; _caller playMove "acts_millerChopper_loop"; }, { params ["_flag", "_caller", "_actionId", "_arguments","_progress","_maxProgress"]; _arguments params ["_actionParams","_fncOwnFlag","_afterCommand"]; _relProgress = _progress/_maxProgress; if (_relProgress < 0.5) then { _flag setFlagAnimationPhase (1-(2*_relProgress)); } else { if (_relProgress == 0.5) then {_flag setFlagTexture (side _caller call _fncOwnFlag)}; _flag setFlagAnimationPhase ((2*_relProgress)-1); }; }, { params ["_flag", "_caller", "_actionId", "_arguments"]; _arguments params ["_actionParams","_fncOwnFlag","_afterCommand"]; _flag setVariable ["TER_flagSide",side _caller]; [] call _afterCommand; [_caller,""] remoteExec ["switchMove",0]; }, { params ["_flag", "_caller", "_actionId", "_arguments"]; _arguments params ["_actionParams","_fncOwnFlag","_afterCommand"]; _flag setFlagAnimationPhase 1; _side = _flag getVariable ["TER_flagSide",civilian]; _flag setFlagTexture (_side call _fncOwnFlag); [_caller,""] remoteExec ["switchMove",0]; }, [_actionParams,_fncOwnFlag,_afterCommand], _duration, 1.5, false] call BIS_fnc_holdActionAdd; _addID Add this to the init field of the flag. You can also use another animation by modifying this line: _caller playMove "acts_millerChopper_loop"; Haven't tested in MP but I am confident that it will work. -
createDisplay vs createDialog
7erra replied to Leopard20's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The main differences are explained in the comments of the BIKI article. The other advantage that createDisplay gives you is that you can select your parent display. When eg you click a button in a dialog you can create another dialog on top of it and return variables with the onChildDestroyed EH. Also take note of the closeDisplay command which closes the specific display and the closeDialog which will close the uppermost dialog. There's also the dialog command which will tell you if a dialog created with createDialog is open atm. I personally use createDialog when creating a new instance of an interactable dialog and then create child displays using createDisplay on top of that one.- 2 replies
-
- 1
-
- createdisplay
- createdialog
-
(and 2 more)
Tagged with:
-
CBA - Community Base Addons - ARMA 3
7erra replied to vipermaul's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Thanks! -
CBA - Community Base Addons - ARMA 3
7erra replied to vipermaul's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Does anybody know where the config for resizing of the debug console is located? I need to have a look at it to align another control with it. Thanks! -
Hi everyone! Since I'm a noob with trigonometry I'd like to ask you how it is possible to draw the outline of a trigger with drawIcon3D. I have come so far that I can draw the border with predefined positions. params ["_trigger"]; //_tParams = triggerArea _trigger; //_tParams params ["_a","_b","_angle","_isRectangle","_c"]; _posArray = [ // predefined positions [4127,4112,1], [4127,4124,1], [4134,4124,1], [4134,4112,1] ]; _posArray apply {_x set [2,0.5]}; _posArray pushBack (_posArray select 0); _posArray = _posArray apply { if ((count _posArray) > _posArray find _x) then { [_x,_posArray select ((_posArray find _x) +1),[0,1,0,1]] } else { [_x,_posArray select 0,[0,1,0,1]] }; }; while {triggerActivated _trigger} do {// other option: eachFrame MEH, but the array will be evaluated over and over. seems redundant as the trigger wont move. Also arguments have to be passed. { drawLine3D _x; } forEach _posArray; _curFrame = diag_frameno; waitUntil {_curFrame != diag_frameno}; }; Thanks, 7erra
-
ArmA rule #34: If it exists, there is code for it. If it isn't there will be. Would you mind if I used the code in my mod?
-
Clients spawn as birds in MP
7erra replied to MrPineapple's topic in ARMA 3 - MISSION EDITING & SCRIPTING
A friend of mine had the same issue. So what we did was remove one part of the mission at a time. After many many restarts we came to the revive system of A3 itself. As soon as we enabled the revive system with respawn on custom position we had the issue you mentioned above. As far as I can see your mission doesn't have revive enabled but the "Sunday Revive" mod might change that. -
Exactly. The KeyDown EH seems really good. I was was thinking about using a waitUntil loop to detect opening of the escape menu but the actionKeys command is way better, thank you. I will use this too as I'm not only going to save loadouts but also vehicles. Those will only be saved if you bring them back in one piece. The loadouts will only be saved when the player logs out while in the base. Saving the loadout on log out will prevent players from duplicating stuff as they can otherwise just save the loadout, give it to another player, log out and receive the same gear again. That is really helpful acutally. I can use this to save som global stats which are handled on the server. Thanks! The concept of the mission is to do smaller ones while operating from a set base. Maybe I'll end the mission each time an objective is completed. This should remove any leftovers from old missions and makes it easier to save the stats to a database. Thanks for the help, all of you have been as helpful as always 7erra
-
Hi everyone, I was wondering if there was a command to detect whether the mission has ended by aborting it? the mission eventhandler only fires on the following cases: HandleDisconnect is one of the MEHs I'm currently using for saving the loadouts of the players (with inidbi2) but when there is someone hosting the server his loadout won't be saved as he is not "disconnecting". This will also be useful in case the dedicated server will get shutdown as I'm planning to add more variables to the mission which need to be saved too. My current workaround would be to use addAction to manually save the progress or a loop, which wouldn't be very performance friendly I think. Thanks in advance, 7erra
-
Is there maybe an eventhandler? getClientState will require to check every so and so seconds. If the variable changes in the time between the last iteration and log out it wont be saved.
-
help Help with BIS_fnc_GUIMessage
7erra replied to BradApex's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah that's the problem. call will not allow supsension (sleep, uiSleep, waitUntil). Try spawn instead. Keep in mind that this will not get you a return value. -
help Help with BIS_fnc_GUIMessage
7erra replied to BradApex's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe you are running this script in unsuspended environment? The waitUntil statement might cause the problem. Where and how are you calling the script? -
Force AI to switch to equipped launcher?
7erra replied to Lineman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Put this into the unit's init: this spawn { waitUntil {time > 1}; _index = 0; _unit = _this; _weapon = secondaryWeapon _unit; _vehicle = vehicle _unit; _unit action ["SwitchWeapon", _vehicle, _vehicle, _index]; while {(currentWeapon _unit) != _weapon} do { _index = _index + 1; _unit action ["SwitchWeapon", _vehicle, _vehicle, _index]; }; systemchat str _index; }; Original code from @Schatten- 8 replies
-
- 3
-
- switchweapon
- selectweapon
-
(and 1 more)
Tagged with:
-
AI takeoff from USS Freedom
7erra replied to hascoman's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The whole launch process is a rather complicated subject and not newbie friendly. If you still want to see how BIS did it you'll have to get a pbo viewer, a text editor and an fsm editor (found in the A3 Tools on Steam). The path to BI's mission is this one: <ArmA 3 main folder on Steam>\Jets\Addons\missions_f_jets.pbo\showcases\showcase_jets.altis Here is the mission for the editor: https://drive.google.com/open?id=1LJpJ4hPIQcbZ7dB-WazQ7Pi0IHozOFjy The most interesting part is the following section from missionFlow.fsm: //start the wingman launch procedure [] spawn { _mirroredAnims = false; //animate blast deflector _carrierObjects = BIS_plane_wingman nearObjects ["Land_Carrier_01_hull_07_1_F", 100]; _carrierPart = _carrierObjects param [0, objNull]; _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> "Land_Carrier_01_hull_07_1_F" >> "Catapults" >> "Catapult3"; _carrierPartanimations = getArray (_carrierPartCfgCatapult >> "animations"); _dirOffset = getNumber(_carrierPartCfgCatapult >> "dirOffset"); _direction = (getDir _carrierPart - _dirOffset - 180) % 360; BIS_plane_wingman setDir _direction; sleep 3; [_carrierPart, _carrierPartanimations, 10] spawn BIS_fnc_Carrier01AnimateDeflectors; private _duration = getNumber(missionConfigFile >> "CfgCarrier" >> "LaunchSettings" >> "duration") max 6; private _stepLength = _duration/24; sleep 12; [BIS_crewAidL_2,"playmovenow","Acts_JetsCrewaidLCrouch_loop",_mirroredAnims] call bis_fnc_carrier01CrewPlayAnim; sleep 0.5; [BIS_crewAidR_2,"playmovenow","Acts_JetsCrewaidRCrouch_loop",_mirroredAnims] call bis_fnc_carrier01CrewPlayAnim; sleep 0.5; [BIS_crewAidF_2,"playmovenow","Acts_JetsCrewaidF_runB",_mirroredAnims] call bis_fnc_carrier01CrewPlayAnim; [BIS_shooter_2,"playmove","Acts_JetsShooterIdle",_mirroredAnims] call bis_fnc_carrier01CrewPlayAnim; [BIS_shooter_2,"playmovenow","Acts_JetsShooterIdleMoveaway_loop",_mirroredAnims] call bis_fnc_carrier01CrewPlayAnim; sleep 4.7; [BIS_shooter_2,"playmove","Acts_JetsShooterIdleMoveaway_out",_mirroredAnims] call bis_fnc_carrier01CrewPlayAnim; [BIS_wingman,[BIS_shooter_2,BIS_crewAidF_2,BIS_crewAidL_2,BIS_crewAidR_2],_mirroredAnims] execFSM 'playLaunchAnims.fsm'; private _posWorld = getPosWorld BIS_plane_wingman; BIS_wingman enableAI "MOVE"; BIS_plane_wingman flyInHeightASL [200, 200, 200]; BIS_plane_wingman forceSpeed 200; private _timeStart = time; private _timeLaunch = _timeStart + (24 * _stepLength); waitUntil { BIS_wingman setVariable ["carrierCatapultState",floor((time - _timeStart)/_stepLength)]; BIS_plane_wingman setPosWorld _posWorld; BIS_plane_wingman setDir _direction; time >= _timeLaunch }; BIS_wingman setVariable ["carrierCatapultState",25]; [BIS_plane_wingman,_direction] spawn BIS_fnc_AircraftCatapultLaunch; sleep 5; //ANIMATE BLAST DEFLECTOR DOWN #3 [_carrierPart, _carrierPartanimations, 0] spawn BIS_fnc_Carrier01AnimateDeflectors; sleep 10; BIS_shooter_2 playmove "Acts_JetsShooterIdle2"; BIS_crewAidF_2 playmove "Acts_JetsCrewaidF_idle"; BIS_crewAidL_2 playmove "Acts_JetsCrewaidL_idle"; BIS_crewAidR_2 playmove "Acts_JetsCrewaidR_idle"; }; You might wanna start there if you feel up to the task. I won't be able to provide any script since I am busy atm. -
Vehicle Unflip script
7erra replied to General McTavish's topic in ARMA 3 - MISSION EDITING & SCRIPTING
First of all I'd recommend @pierremgi's solution for the condition as it is faster Mine: 0.0164 ms pierre: 0.0062 ms Secondly where are you putting the code? It is meant for the init line of the vehicle. -
Vehicle Unflip script
7erra replied to General McTavish's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This condition states that you have to be inside of the vehicle. Are you trying to flip it from the outside? -
Vehicle Unflip script
7erra replied to General McTavish's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_this addAction ["Flip vehicle",{ params ["_vehicle", "_caller", "_actionId", "_arguments"]; _normalVec = surfaceNormal getPos _vehicle; if (!local _vehicle) then { [_vehicle,_normalVec] remoteExec ["setVectorUp",_vehicle]; } else { _vehicle setVectorUp _normalVec; }; _vehicle setPosATL [getPosATL _vehicle select 0, getPosATL _vehicle select 1, 0]; },[],1.5,true,true,"","!((vectorUp _target apply {abs _x toFixed 2}) isEqualTo ((surfaceNormal getPos _target) apply {abs _x toFixed 2}))",5]; -
There has to be a way since the campaign uses .lip files. Maybe someone could take a look bc I will be absent from A3 for a while.