Jump to content

Maff

Member
  • Content Count

    364
  • Joined

  • Last visited

  • Medals

Everything posted by Maff

  1. I just wanted to clarify that you were using ArmA 2 as, most if not all, ArmA 3 functions won't work in ArmA 2. Also, there are scripting commands that are only available in ArmA 3. I would recommend re-posting in ARMA 2 & OA : MISSIONS - Editing & Scripting. In the meantime, check out the following links from @kylania. Spawn something in front of the player AI spawned waves from random direction I learned a lot from these scripts back in the day.
  2. From the latest SPOTREP: "Changed: MH-9 no longer has a crosshair. A new section was added: aiming_dot. Now it can be retextured or removed using setObjectTexture (index 1)." This should do it... heli setObjectTextureGlobal [1, ""];
  3. @Kava_Brasil It works 100% on my end. Although, I did get the same error as you though. There were some extra characters and some strange italics when I copied and pasted from your "error image" comment. It was weird... Edit: I typed it out in a new instance of notepad and it worked in ArmA. Give it a try. FNH_civilians_killed = 0; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (side group _killed == civilian && side _instigator == WEST) then { FNH_civilians_killed = FNH_civilians_killed + 1; if (FNH_civilians_killed > 2) then { hint "XXXXXXXX"; tank enableAI "MOVE"; }; }; }];
  4. @Mr H. I think he may be using ArmA 2, not ArmA 3.
  5. The function you have wont do anything by executing it from a players init, even with execVM. It must be executed on all AI groups that you want to hunt down the players. You said in a previous comment that you were using this on ArmA 2. Is that correct?
  6. Ah! Out of curiosity, if the inventory action is removed via a config, would pressing your inventory keybind still open a vehicles inventory?
  7. Removing the inventory action from vehicles is not possible as far as I know.
  8. This working on my end. The script to detect "specified item" within 7 metres on the ground is all that I could come up with. You will need to add in your own sound classnames. Change "addItemOK" and "addItemFailed" as needed. this addAction [ if (locked this < 2) then {"Lock"} else {"Unlock"}, { params ["_target", "_caller", "_actionId", "_arguments"]; if (locked _target < 2) then { [_target,2] remoteExec ["lock",_target]; [_target, "addItemOK"] remoteExec ["say3D"]; _target setUserActionText [_actionId, "Unlock"]; } else { [_target,0] remoteExec ["lock",_target]; [_target, "addItemFailed"] remoteExec ["say3D"]; _target setUserActionText [_actionId, "Lock"]; } }, [], 2, true, true, "", "('ToolKit' in items _this) or (if ( count ( ( _target nearObjects 7 ) select { ( getItemCargo _x select 0 select 0 ) find 'ToolKit' >= 0 } ) > 0 ) then { true } else { false })" ]; I am a bit confused here... You need every civilian vehicle to have this addAction on? Is that right?
  9. It's no bother. 1. So, play a sound when you lock and unlock a vehicle? That is possible. Do you have a sound or sounds in mind that you could share the classname? 2. So, everyone can see the vehicle lock state (Locked / Unlocked) but, without the "specified item" they cannot lock or unlock the vehicle? That should be pretty straightforward to do using conditions.
  10. I've used the "ToolKit" item just for an example. Take care when editing the classname, the classname should have an apostrophe instead of quotation marks. this addAction [ if (locked this < 2) then {"Lock"} else {"Unlock"}, { params ["_target", "_caller", "_actionId", "_arguments"]; if (locked _target < 2) then { [_target,2] remoteExec ["lock",_target]; _target setUserActionText [_actionId, "Unlock"]; } else { [_target,0] remoteExec ["lock",_target]; _target setUserActionText [_actionId, "Lock"]; } }, [], 2, true, true, "", "'ToolKit' in items _this" ]; I am still playing around with a method of detecting inventory items on the ground.
  11. OK. The item would need to be an inventory item. I'm sad to say the example pencil is not an inventory item. Just so I understand fully; If there are NONE of these "specified items" in the players backpack OR on the ground near the vehicle, the action to lock/unlock will not be shown. Is that correct?
  12. Works: this addAction [ if (locked this < 2) then {"Lock"} else {"Unlock"}, { params ["_target", "_caller", "_actionId", "_arguments"]; if (locked _target < 2) then { [_target,2] remoteExec ["lock",_target]; _target setUserActionText [_actionId, "Unlock"]; } else { [_target,0] remoteExec ["lock",_target]; _target setUserActionText [_actionId, "Lock"]; } }, [], 2, true, true, "", "typeOf _this isEqualTo 'B_Soldier_VR_F'" ]; Jesus! There are magic pencils in ArmA? That shouldn't be too difficult to script. Does the item have to be in their bag only - Nowhere else?
  13. Nice one! I wondered if remoteExec was needed, I thought lock was global.
  14. @brainboy Give this a try... I have not tested it as I am off out. Only a player with the class of BLUFOR VR Entity should see the action. I have also added @pierremgi's suggested remoteExec. this addAction [ if (locked this < 2) then {"Lock"} else {"Unlock"}, { params ["_target", "_caller", "_actionId", "_arguments"]; if (locked _target < 2) then { [_target,2] remoteExec ["lock",_target]; _target setUserActionText [_actionId, "Unlock"]; } else { [_target,0] remoteExec ["lock",_target]; _target setUserActionText [_actionId, "Lock"]; } }, [], 2, true, true, "", " typeOf _this isEqualTo "B_Soldier_VR_F" " ]; You may need to change the last string to: typeOf _this isEqualTo 'B_Soldier_VR_F'
  15. addAction... So many headaches with this in the past! this addAction [ if (locked this < 2) then {"Lock"} else {"Unlock"}, { params ["_target", "_caller", "_actionId", "_arguments"]; if (locked _target < 2) then { _target lock 2; _target setUserActionText [_actionId, "Unlock"]; } else { _target lock 0; _target setUserActionText [_actionId, "Lock"]; } } ];
  16. Yes. So name your plane in the editor. Let's call the plane: plane Then in a trigger On Act field put: plane call BIS_fnc_neutralizeUnit; Call is the method of executing the function; BIS_fnc_neutralizeUnit. I have never used BIS_fnc_EXP_camp_guidedProjectile but the following link has a bit more information and correct example.
  17. Quick reply... There are 2 BIS functions that spring to mind: BIS_fnc_neutralizeUnit BIS_fnc_EXP_camp_guidedProjectile Both of these can be used in a trigger.
  18. Maff

    Respawn Loadouts

    No. Always worth a quick check though... Just in case.
  19. Maff

    Respawn Loadouts

    I'm not sure what you mean. You are using a custom script to add kit to only OPFOR players based on their classname. I can tell this from the classnames you have used. So if you wanted a player to get assigned the kit from "scripts\loadouts\\medic.sqf" that player would need to be "O_Medic_F" class. There are so many ways to assign kit to units... It is unreal. I've noticed another error in onPlayerRespawn.sqf: // Heli Pilot if (player isKindOf BO_HeliPilot_F") then { [player] execVM "scripts\loadouts\HeliPilot.sqf"; }; Change it to... // Heli Pilot if (player isKindOf "O_HeliPilot_F") then { [player] execVM "scripts\loadouts\HeliPilot.sqf"; }; If that doesn't solve it for you, feel free to send a link to your mission and I can look it over for you. Added question: Are you only using this script in onPlayerRespawn.sqf? I only ask because I see in your description.ext that you have: respawnOnStart = -1; This means "Dont respawn on start. Don't run respawn script on start." which would mean your kit won't be assigned to any player until they have died and respawned.
  20. Pierre, I posted a similar post a short while ago. Your post did not show up when I was frantically searching. I have posted a workaround I have been using in there, however it is far from ideal. Hopefully someone has a solution... Being ArmA, it will be something stupidly obvious and we will both be sick.
  21. I have been attempting to create ellipse and rectangle "Area" markers with create3DENEntity in the 3DEN Editor (via the Debug Console) for an unhealthy amount of time. I have successfully created each "Icons" markers. Easy! _m = create3DENEntity ["Marker", "mil_dot", [0,0,0]]; _m set3DENAttribute ["Position", (getPosATL player)]; _m set3DENAttribute ["size2", [2,2]]; _m set3DENAttribute ["rotation", (random 360)]; _m set3DENAttribute ["baseColor", "colorRed"]; I just cannot figure out what the "itemClass" would be for either an ellipse or a rectangle. I have read through the BIKI and experimented with different 3DEN commands to return attributes of existing Area markers but to no joy. I have also been through the Config Viewer but I cannot seem to find the Area markers in CfgMarkers! The workaround I have been using is to create any "Icons" marker, and edit the mission.sqm. Example: dataType="Marker"; position[]={7003.4668,5,3916.792}; name="arrowMarker"; type="mil_arrow"; a=50; b=50; id=17; to... dataType="Marker"; position[]={7003.4668,5,3916.792}; name="arrowMarker"; markerType="RECTANGLE"; type="rectangle"; a=50; b=50; id=17; Of course I could just use the createMarker command in a script but that would be admitting defeat. I have no issues with using the workaround but I think it is well beyond the time to ask for some MUCH APPRECIATED help. Thank you.
  22. Sorry mods... I have just noticed a similar post, this did not show up when I was frantically searching.
  23. Maff

    Respawn Loadouts

    It is very early in the morning here so I may have skipped your post a bit. The only thing that is jumping out at me is The missing semicolon at the bottom of your onPlayerRespawn.sqf. I have added it for you. // Heli PT if (player isKindOf "O_Soldier_PG_F") then { [player] execVM "scripts\loadouts\ParaTrooper.sqf"; }; Hope that sorts it for you.
  24. Nice one! This will save me many, MANY hours marking out AO's.
  25. Try; this setVectorUp [0,0,1]; This levels the object to the terrain for me.
×