Jump to content

Lucullus

Member
  • Content Count

    134
  • Joined

  • Last visited

  • Medals

Everything posted by Lucullus

  1. Why not use setUnitLoadout? Loadout's are so easy... player setUnitLoadout [ [], [], ["hgun_Pistol_heavy_02_F","","","",["6Rnd_45ACP_Cylinder",4],[],""], ["U_BG_Guerilla1_1",[["FirstAidKit",2]]], ["V_Rangemaster_belt",[["SmokeShell",1,1]]], ["B_AssaultPack_Kerry",[]], "H_Bandanna_camo", "", ["Binocular","","","",[],[],""], ["","","ItemRadio","ItemCompass","ItemWatch",""] ]; More Information
  2. Lucullus

    GENERIC ERROR IN EXPRESSION

    I can reproduce the error only in the context of a group.
  3. I like it! Nice would be a given direction as fourth parameter like [20,70].
  4. Lucullus

    ProgressBar Open ?

    Your dialogs are all right, the scripts are examples for animate the progress. Create your dialog, animate the progress, close your dialog and open the next one. I've updated my first post. This shows you a way, HallyG's solution another. There are so many ways...
  5. Lucullus

    ProgressBar Open ?

    give you an action named "Progress" and try... Edit: another one: first progressBar then display. I will only push you in the right direction, not write complete scripts, thats your part. the adddAction is only for demonstration.
  6. Lucullus

    ProgressBar Open ?

    you defined a picture... class Xenoa_Ouverture1 : RscPicture _pgText = _ui displayCtrl 1001; and filled the picture with _pgText ctrlSetText format ["%2 (1%1)...","%"]; and your errormsg: 16:47:46 Warning Message: Picture (1%)... not found it crys: "I want a picture, not a text."
  7. Why not test yourself? private _n = 0; while {true} do { waitUntil { systemChat str (_n); _n=_n + 1; sleep 6; {alive _x} count allPlayers isEqualTo 0; }; };
  8. Another solution: ["Initialize", [player, [], true, true, true, true, true, true, true, true]] call BIS_fnc_EGSpectator; with uiNamespace do { waitUntil {!isNull findDisplay 60492}; disableSerialization; _ctrl = findDisplay 60492 ctrlCreate ["RscStructuredText",-1]; _ctrl ctrlSetPosition [safezoneX+0.97*safezoneW,safezoneY,0.03*safezoneW,0.033*safezoneH]; _ctrl ctrlSetStructuredText parseText "<img size='1.4' image='\A3\Ui_f\data\GUI\Rsc\RscDisplayArcadeMap\icon_exit_ca.paa'/>"; _ctrl ctrlSetTextColor [0.9,0.9,0.9,1]; _ctrl ctrlSetBackgroundColor [0.1,0.1,0.1,0.9]; _ctrl ctrlAddEventHandler ["MouseButtonClick",{["Terminate"] call BIS_fnc_EGSpectator}]; _ctrl ctrlCommit 0; }; A button at the upper right corner. But Nikander´s is very cool.
  9. This is BIS_fnc_selectRandom in functionsviewer: /************************************************************ Random Select Author: Andrew Barron, rewritten by Warka, optimized by Karel Moricky, optimised by Killzone_Kid Parameters: array This returns a randomly selected element from the passed array. Example: [1,2,3] call BIS_fnc_selectRandom Returns: 1, 2, or 3 ************************************************************/ /// --- validate general input #include "..\paramsCheck.inc" paramsCheck(_this,isEqualType,[]) selectRandom _this KK has already changed it.
  10. Lucullus

    shake only in area

    on act: if (vehicle player in thislist) then {addCamShake [5, 5, 5]}
  11. Lucullus

    RPT viewer

    I use logviewer. Not an analyzer, but sufficient for me.
  12. _KeyCar1 is a local variable, present in "KeyPressCar1.sqf" not in "JumpCar1.sqf". Make it global like KeyCar1.
  13. That's why we like Arma, so many things are possible...
  14. _plane = createVehicle [_getPlane, _spawnCoords, [], 0, "FLY"]; // Create enemy plane _plane addEventHandler ["killed", {sleep (floor random [15,60,120]); execVM "Scripts\SpawnHostiles.sqf"}]; _timer not defined in EH too late
  15. For more commands you can make diary records like: myTag_com1 = {["Open",true] spawn BIS_fnc_arsenal;}; myTag_com2 = { if !(isNil "BIS_fnc_garage_center") then { deleteVehicle BIS_fnc_garage_center}; BIS_fnc_garage_center = createVehicle ["Land_HelipadEmpty_F",player getPos [10,getDir player],[],0,"CAN_COLLIDE"]; ["Open",true] spawn BIS_fnc_garage; playsound "click"; }; myTag_com3 = {skiptime + 2.0;playsound "click";}; myTag_com4 = {skiptime - 2.0;playsound "click";}; myTag_com5 = {openMap false;hintC "call or spawn what you want!"; }; player createDiarySubject ["Testmenu","Test"]; player createDiaryRecord ["Testmenu",["Commands"," <font color='#A0F020'><br/> <execute expression='[] call myTag_com1'>Arsenal</execute><br/> <execute expression='[] call myTag_com2'>Garage</execute><br/> <execute expression='[] call myTag_com3'>skipTime + 2</execute><br/> <execute expression='[] call myTag_com4'>skipTime - 2</execute><br/> <execute expression='[] call myTag_com5'>and so on...</execute><br/> </font>"]];
  16. yup hideObjectGlobal _terrainBillBoard;
  17. and then hide the _terrainBillBoard with hideObject _terrainBillBoard;
  18. What's wrong with Virtual Arsenal? If you want to access VA from object, then... yourNamedObject addAction ["Arsenal", {["Open",true] spawn BIS_fnc_arsenal}]; player enableStamina false; player addEventHandler ["Respawn",{player enableStamina false}];
  19. @Tankbuster Change line 26: _realtime = false; to _realtime = true; You can change the timeratio in line 42 & 43 @code34 nice script
  20. in initPlayerLocal.sqf: player addAction ["Arsenal", {["Open",true] spawn BIS_fnc_arsenal}]; player enableStamina false; player addEventHandler [ "Respawn", { player enableStamina false; player addAction ["Arsenal", {["Open",true] spawn BIS_fnc_arsenal}]; } ];
  21. try this: _mag = YourVehicleName magazinesTurret [0]; YourVehicleName removeMagazinesTurret [_mag select 0,[0]];
  22. Lucullus

    Missing semi colon

    This |#| marks the error. You want to execute a sqf-script, so use execVM
  23. Lucullus

    Fuel consumption script

    Ask for (local _vehicle) in the loop, and there is an EventHandler "SeatSwitchedMan". Edit: OK, another try. In initPlayerLocal.sqf: player addEventHandler ["GetInMan",{_this spawn Luc_fnc_VehicleFuel}]; player addEventHandler ["SeatSwitchedMan",{_this spawn Luc_fnc_VehicleFuel}]; Function: Luc_fnc_VehicleFuel = { params ["","","_vehicle",""]; if !(isNil {_vehicle getVariable "Luc_fuel"}) exitWith {}; _vehicle setVariable ["Luc_fuel", 0]; _type = typeOf _vehicle; _mass = getMass _vehicle; _fuelCapacity = getNumber(configFile >> "CfgVehicles" >> _type >> "fuelCapacity"); _maxSpeed = getNumber(configFile >> "CfgVehicles" >> _type >> "maxSpeed"); _enginePower = getNumber(configFile >> "CfgVehicles" >> _type >> "enginePower"); private _correction = 0.002; if (_vehicle isKindOf "Car_F") then {_correction = 0.0035}; if (_vehicle isKindOf "Wheeled_APC_F") then {_correction = 0.0015}; if (_vehicle isKindOf "Tank_F") then {_correction = 0.0065}; waitUntil {sleep 0.5; isEngineOn _vehicle}; while {(alive _vehicle) and (local _vehicle)} do { if (isEngineOn _vehicle) then { _tank_content = 1 / _fuelCapacity; _consumption = ((_mass/_enginePower)*(speed _vehicle/_maxSpeed) * _tank_content * _correction) max 0.0001; _vehicle setFuel ((fuel _vehicle) - _consumption); }; sleep 1; systemChat format ["%1 - %2",_vehicle,fuel _vehicle]; //only for Test }; _vehicle setVariable ["Luc_fuel", nil]; }; tested only local! Edit2: "Wheeled_APC_F" only 45 liters???
  24. You want a local effect on one client. Why ask for "ANYPLAYER" ?
  25. Lucullus

    Fuel consumption script

    I would add an EventHandler ("GetInMan") to player and run the fnc local on Clients. In fnc ask for example: if !(local _vehicle) exitWith {}; edit: In initPlayerLocal.sqf: player addEventHandler ["GetInMan",{_this spawn AIMGAME_fnc_fuelConsumption}]; function: AIMGAME_fnc_fuelConsumption = { params ["","","_vehicle",""]; if !(local _vehicle) exitWith {}; ... your code here ... };
×