-
Content Count
364 -
Joined
-
Last visited
-
Medals
Everything posted by Maff
-
How to make AI Hunt a player down while he is on the move?
Maff replied to John Douglas's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Removal of aiming dot on Pawnee windshield
Maff replied to HUEY222's topic in ARMA 3 - TROUBLESHOOTING
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, ""]; -
Number of Civs Killed > 3 (but Only WEST KILLERS)
Maff replied to Kava_Brasil's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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"; }; }; }]; -
How to make AI Hunt a player down while he is on the move?
Maff replied to John Douglas's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
@Mr H. I think he may be using ArmA 2, not ArmA 3. -
How to make AI Hunt a player down while he is on the move?
Maff replied to John Douglas's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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? -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ah! Out of curiosity, if the inventory action is removed via a config, would pressing your inventory keybind still open a vehicles inventory? -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Removing the inventory action from vehicles is not possible as far as I know. -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nice one! I wondered if remoteExec was needed, I thought lock was global. -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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' -
help lock/unlock vehicles script
Maff replied to brainboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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"]; } } ]; -
The new beginner is in town
Maff replied to Black_Ice931's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
The new beginner is in town
Maff replied to Black_Ice931's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
No. Always worth a quick check though... Just in case.
-
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.
-
cfgMarkers for ellipse/rectangle one?
Maff replied to pierremgi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.- 16 replies
-
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.
- 1 reply
-
- create3denentity
- marker
-
(and 3 more)
Tagged with:
-
3DEN: create3DENEntity and Ellipse/Rectangle markers
Maff replied to Maff's topic in ARMA 3 - EDEN EDITOR
Sorry mods... I have just noticed a similar post, this did not show up when I was frantically searching.- 1 reply
-
- create3denentity
- marker
-
(and 3 more)
Tagged with:
-
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.
-
Construction of direct lines bresenham's algorithm.
Maff replied to dimon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Nice one! This will save me many, MANY hours marking out AO's. -
Problem with rotation using setVectorUp
Maff replied to Niklas Dennerståhl's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try; this setVectorUp [0,0,1]; This levels the object to the terrain for me.