Jump to content

Larrow

Member
  • Content Count

    3599
  • Joined

  • Last visited

  • Medals

Community Reputation

2794 Excellent

About Larrow

  • Rank
    Chief Warrant Officer

Profile Information

  • Gender
    Male
  • Location
    LAR setpos (you getpos [-2,getdir you]);LAR say3d["BOO!"]

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is just... private _selectedMission = _availableMissions deleteAt floor( random count _availableMissions );
  2. When dealing with this you can use the side of the group of the unit. _realSide = side group _deadUnit; Does this exist? This variable will be Nil until the display is being shown and its onLoad has happened. This... ... can be replaced with just... _color = side group _oldUnit call BIS_fnc_sideColor; Surely when the mission starts this is just the side/group of the player. Not quite sure what you mean by team. Could this not be done with createMarker of type ICON, then the information would be available to all maps rather than handling them individually by placing drawIcon's on them all/
  3. Well the MOVE command from the same menu ( when you add a waypoint ) has a similar function call... //--- Add waypoint _codeWP = _logic getvariable 'GUI_WP_MOVE'; _script = [_is3D,_pos,_shift,_ctrl,false,_selected] spawn _codeWP; However, I would not change this directly as I believe it is already set by the HC system... However, you will notice this code also has a call to a function stored on the HC logic. //--- Move handler _handler = _logic getvariable "onGroupMove"; if (!isnil "_handler") then {[_group,_wp,grpnull] spawn _handler}; This _handler is run both when adding a new waypoint(MOVE) or issuing an WP ATTACK. Although I am not sure if this is already in use by the system ( did a quick grep and could not see it set anywhere ). So you could use this to cancel the doStop by issuing a doFollow as suggested on the wiki doStop page. BIS_HC_1 setVariable ["onGroupMove", { params[ "_group", "_wp" ]; units _group doFollow leader _group; }, true]; Or there is always the missionEventhandlers for onGroupClicked, or it may even be possible to inject your own command into a subMenu of RscHCGroupRootMenu see how #USER:HCWPWaitRadio etc are manipulated in hc_gui.sqf . Having a good read through the hc files in \a3\modules_f\hc\data\scripts would be a good idea and may lead you to some ideas.
  4. Are you sure the onTaskCreated code is passed anything at all in _this? Try testing what is being passed... BIS_HC_1 setVariable ["onTaskCreated", {hint format["_this is %1", [str _this,"nil"] select (isnil "_this")]}, true]; EDIT: According to hc_gui_menu.sqf it is passed the current waypoint the user is hovering over on the hc map. So your then saying... [GROUP, INDEX] call CBA_fnc_taskDefend ...Which is not what CBA_fnc_taskDefend expects Are you sure your error is not coming from CBA function? If you just want the defaults from taskDefend by just passing the group... BIS_HC_1 setVariable ["onTaskCreated", {_this #0 call CBA_fnc_taskDefend}, true];
  5. //Random composition// _random_comp = selectRandom [ "Fire_Area", "Fire_Area_Big"]; //Spawn composition// random_fire_reference = [_random_comp, location1] call LARs_fnc_spawnComp; //***other code***// //Delete composition// random_fire_reference call LARs_fnc_deleteComp; hint format ["Composition cancelled %1", random_fire_reference];
  6. _compReference call LARs_fnc_deleteComp; _compReference holds the returned STRING. However, you need to make sure _compReference is still valid, not nil, not gone out of scope. Maybe store it somewhere with setVariable or make it a global variable if it's the only comp you're dealing with.
  7. Store the handle on the trigger using setVariable. _handle = ppEffectCreate ["FilmGrain", 2000]; _handle ppEffectEnable true; _handle ppEffectAdjust [0.3, 0.15, 1, 0.2, 0.5, 0]; _handle ppEffectCommit 3; thisTrigger setVariable[ "ppEffect", _handle ]; //terminate with ppEffectDestroy ( thisTrigger getVariable "ppEffect" );
  8. You may also want to check kbAddTopic as well. This command is both LA and LE, so if your zeus_indfor is likely to move around ( on server as AI, or could be a player ) then you will need to add the topic on all respective machines. Either just add it everywhere or possibly use Local EH and check with kbHasTopic whether it needs adding.
  9. Im going to guess that your script is running on the server. The wiki page says this command is LA ( Local Argument ). So if zeus_indfor is a player, from a dedicated server they will not be local, where as in Single/Local MP they would be. If zeus_indfor is an AI then its likely they are local to the server hence why it works. Try remoteExec'ing the command to where the unit who is to speak is local. ie //Replace //zeus_indfor kbTell _tellArr; //With [ zeus_indfor, _tellArr ] remoteExec[ "kbTell", zeus_indfor ];
  10. Well you remove the original Condition and Activation with desactivation trigger, so with the ReloadAI_bob_enable trigger just replace them. ReloadAI_bob setTriggerStatements [ "true && round (time %60) ==1 and (({_x == '30Rnd_762x39_Mag_F'} count magazines bob) <= 1)", "bob addMagazine '30Rnd_762x39_Mag_F';", "" ]; Note the ' around the magazine name due to STRING in a STRING.
  11. Use setVariable to store the spawned group somewhere, e.g either missionNamespace or on the trigger, so you then have access to it from the other trigger.
  12. No, just easier to read, if you need to change anything it only has to be done in one place rather than multiple times in a large amount of code. So maybe yes, for your fingers and eyes 😄
  13. As all groups are handled the same you could just do something like...
  14. You are adding to the wrong idc. This comes from the lbSetData, data can only be STRING you're trying to add an OBJECT _x. Give the player a varName and use that instead. lbSetData [11500, _forEachIndex, _x call BIS_fnc_objectVar]; To tele to them... _player = lbData[ 11500, _index ]; player setPosATL getPosATL ( missionNamespace getVariable _player );
  15. /* Prevents dedicated server running script */ if (isDedicated) exitWith {}; //Never going to be dedicated if calling from an action /* Private variables */ private ["_cqcLiveTargets","_cqcSpawns","_azimuth"]; /* createGroup [side, deleteWhenEmpty] needed for createUnit function later */ private _cqcLiveTargets = createGroup east; /* Define spawn locations using variable names of leaflets as markers */ private _cqcSpawns = [cqcspawn_001,cqcspawn_002,cqcspawn_003,cqcspawn_004,cqcspawn_005,cqcspawn_006,cqcspawn_007]; /* type createUnit [position, group, init, skill, rank] function for spawning a unit */ //Would recommend using the other syntax of create unit { "O_G_Soldier_lite_F" createUnit [ getPosATL _cqcSpawns, //Passing whole array, should be _x current forEach element _cqcLiveTargets, //STRING in STRING notice color of MOVE //Unit is this not _this //again dir of _cqcspawns array not _x "call{_this disableAI "MOVE"; _azimuth = getDir _cqcspawns; _this setDir _azimuth;}", 0.1, "PRIVATE" ];} forEach _cqcSpawns;  So...
×