-
Content Count
719 -
Joined
-
Last visited
-
Medals
Everything posted by opusfmspol
-
is there a way to import single player missions into the in game editor?
opusfmspol replied to graygray27's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Look through the mission's triggers. There is a LOSE trigger which triggers the ending when a team member dies. -
He was using a trigger, and a trigger's expression code on activation has to return nothing at the end. To satisfy the trigger, the execVM handle had to be captured in a variable so that nothing would be returned. There might be some other instances where a return must be captured, I can't recall right now, but that's what I observe from the given post. someParam execVM "someScript.sqf"; // Handle is returned. null = someParam execVM "someScript.sqf"; // Nothing is returned, variable "null" holds the handle.
-
Trying to find and mark locations on map.
opusfmspol replied to Phantom Aspect's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You might try using BIS_fnc_locations. Example, to find locations of type "NameCity": ["NameCity",[[0,0,0],1000000],true] Call BIS_fnc_locations; Classname types you might check for: "NameCityCapital" "NameCity" "NameLocal" "NameVillage" "NameMarine" "Hill" -
How to rearm your infantry squad in Warfare mode?
opusfmspol replied to EMP1305's topic in ARMA 2 & OA - QUESTIONS & ANSWERS
If a vehicle (or other object) has ammo stored in its gear, move your units there and then one by one, highlight one, select "action", and order them to rearm from it, same as you would have them rearm from a dead body or crate. Has to be done individually. When they're done, you might have to order them to report status to change a unit's icon from orange back to green. But the right ammo has to be there for them to rearm with. When around a purchase point (factory, depot or camp), selecting the units might provide them with a "buy weapons" or "buy ammo" option, but I can't recall if that works, I think only a team leader can purchase anything, team members don't have access to the team funds. Basically, purchase gear for their rearm and store it, either in your team vehicle, or another vehicle on hand, and have them rearm from there; or have them rearm at an ammo truck, or rearm them from bodies of dead friendlies, stuff like that. -
Create Airports in Warfare
opusfmspol replied to EMP1305's topic in ARMA 2 & OA - QUESTIONS & ANSWERS
In Warfare (WF) missions, Airports are captured in the same manner as towns, they don't get created or purchased during gameplay. They get placed in the map when the mission is created in editor by the person making the mission; so a mission will either have airports or it won't. An airport is a fixed structure which serves as a factory, not a factory a commander can build. In the same manner captured town depots provide a menu to heal, rearm, refuel, etc., or captured camps provide a menu for static defenses and gear, an airport structure gets captured, then provides a menu for buying fixed-wing aircraft. - In Arma2 (A2), I'm aware of two WF missions that have capturable Airports set up in them; Bear Rising, and Superpowers. The other missions (as I recall) don't. - In Op Arrowhead (OA) the WF missions have no capturable airports set up (likely because in OA standalone, the hangar used by Warfare is not available in editor). - But when playing Combined Ops (A2 + OA combined), the A2 hangar becomes present in the editor, so a mission maker can use it to make capturable WF airports on the OA maps. As far as the menu you mention that opens up, you are likely seeing the icon for a fixed-wing aircraft. It's for purchasing an airplane, and is always greyed out unless you are at an airport your side has captured. When there, you will see a list of fixed-wing aircraft you can buy. Unless however, you play side Resistance; in the base game (no mods used), Resistance have no fixed-wing aircraft configured as available to them, and their list is empty. So in short summary, there are two scenario missions from A2 that have capturable airports set up for buying fixed-wing aircraft, otherwise you have to make a mission from scratch and set up any airports you desire. Hope this helps. -
solved Can't get if condition to fire
opusfmspol replied to JulesMK2's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Move the if-then inside the addAction code. -
Waypoint cycle switched to other waypoint
opusfmspol replied to LordX71's topic in ARMA 3 - MISSION EDITING & SCRIPTING
With mods, or without mods? -
Random Town name in task
opusfmspol replied to Casio91Fin's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_TownName is the returned location itself. If the name text of the location is what you want, use: Text _TownName Also, nearestLocations will search multiple location types ("NameCity", "NameVillage", etc.) and the locations it returns are sorted by distance. -
Troubles with enableAI "Move"
opusfmspol replied to Sergeant_Emerald's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The likely reason enableAI did not work on dedicated is that the command has to be run where the unit is local. addAction runs local to the client (player). When AI is a one-man group (i.e., leader of his own group) the AI is local to the server. In singleplayer and MP hosted, the host client is also the server, and the command run in addAction will work there. With dedicated server they are not local to client, so the command fails, it has to be run by server. But in the event locality of the unit is in question, best to just remoteex using the _unit as the target, then the enableAI command will run wherever the unit is local, whether server or client. Multiplayer Scripting remoteExec remoteExecCall -
VIP Helicopter with annoying pilots
opusfmspol replied to ApceHka71's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Waypoints are a group function. It sounds like you have the target and pilots in the same group. The target and pilots need to be in separate groups which have their own waypoints. -
missionConfigFile can get description.ext entries for comparison. But I thought client received mission from the server when connecting... how would they run different versions?
-
Scripting question about dedicated server
opusfmspol replied to fawlty's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe I'm misunderstanding the scenario and the {false} should instead be {true} for trigger condition. Certain MP behavior with Units and Group commands may also need to be considered, see Kronzky's note at the bottom of the Units biki page. The alternate detection might need to be: if (isNull playersGroup || {{Alive _x} Count (Units playersGroup) < 1}). What exactly is the extract setup/scenario using the trigger? Are all the player/playable units in one group (playersGroup), or are there multiple groups with playable units being extracted? What respawn type is used (Instant, base, group, etc)? < 1 is same as == 0, meaning no Units are detected in a group. Reversing that would be > 0 Units, meaning Units are still detected in a group. -
Scripting question about dedicated server
opusfmspol replied to fawlty's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Check to see if the respawned unit belongs to a different group. If that's the case, use respawn event handler to have him joinSilent the playersGroup, so long as the group still exists. Or redefine playersGroup as the respawn unit's group if it no longer exists. -
Scripting question about dedicated server
opusfmspol replied to fawlty's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try this: (if (isNull playersGroup || {Count (Units playersGroup) < 1}) then {false} else {{_x in heli_1} Count (Units playersGroup) == {Alive _x} Count (Units playersGroup)}) -
Scripting question about dedicated server
opusfmspol replied to fawlty's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not to my knowledge. Player is a command (I would say a local command though wiki has no indicator for it), and the return is different on each machine. Dedicated server has no user. The command's use has to be reviewed in each 'composition' you have, with an eye toward the objNull returned by dedicated server. Multiplayer Scripting -
Scripting question about dedicated server
opusfmspol replied to fawlty's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Only to one unit in the group. With dedicated server you have to use direct unit references instead of Player, and group references from some unit rather than relying on (Group Player ). Unit reference is as simple as naming units in editor. @dreadpirate provides example above of setting a group reference and using it. -
Should be: "_this distance _target < 3", "_caller distance _target < 3", Means "not the server". Will execute on all connected clients, but the server itself will be excluded. It's commonly used to keep a dedicated server from executing Player and hasInterface related stuff where it might result in errors, since Player is objNull on dedicated server and it has no interface.
-
Yes, please. What you have is this: [ puitdevin, "<t color='#00FF00'>SEARCH</t>", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_requestleadership_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_requestleadership_ca.paa", "_this distance _target < 3", "_this distance _target < 3", {}, {}, { [_this select 1] execVM "randompuits.sqf"; [(_this select 0),(_this select 2)] remoteExec ["bis_fnc_holdActionRemove",[0,-2] select isDedicated,true]; }, {}, [], 2, 0, true, false ] call BIS_fnc_holdActionAdd; Try changing array select 5 to: "_caller distance _target < 3".
-
How to fire trigger when a percentage of items are present
opusfmspol replied to Varn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If its an unchanging value, as the items list here appears to be, best practice is definitely to predefine the value in an init script. Maintain it in a separate process, if necessary. Sometimes running code ahead of evaluating condition is needed and helpful for getting condition values. In this case, trying to find what works, it's helpful. But you've got it right, whenever possible best practice is to use condition alone. Array should be predefined elsewhere and trigger should just run the condition check. -
Trigger statement missing ]
opusfmspol replied to -Varan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not sure these are the issue, but: _script is undefined in the expression. Spawn uses function, not script. execVM uses script. Trigger activation must return nothing, and spawn or execVM returns a handle, so might try "nul = [%1] spawn function;" or "nul = [%1] execVM 'folder\script';". Also might try formatting the statement first, then set triggerStatement: _expression = format ["nul = [%1] spawn function;", _variable]; _trigger setTriggerStatements ["this", _expression, ""];- 10 replies
-
- 1
-
- trigger
- statements
-
(and 1 more)
Tagged with:
-
How to fire trigger when a percentage of items are present
opusfmspol replied to Varn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can, a = true; b = false; a || b works a = 2; b = 1; a >= b also works I was in error thinking triggers would list empty objects. Apparently they don't. Also, pushBack gets me every time, would have been pushback _x instead of pushback [_x] if had been used correctly. I'm always stuck with array = array + [_x] in my head. @Harzach has it right. Tested and this appears to work in condition field: ItemsTotal = [o1, o2, o3, o4]; ({_x inArea thisTrigger} Count ItemsTotal) >= ((Count itemsTotal) * 0.75) -
How to fire trigger when a percentage of items are present
opusfmspol replied to Varn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Crawl, then walk, then run. Untested, but try this in trigger condition: ItemsTotal = [o1, o2, o3, o4]; ItemsInArea = []; {if (_x In thisList) then {ItemsInArea pushBack [_x]};} Count ItemsTotal; Count itemsInArea >= ((Count itemsTotal) * 0.75) Should trigger when 3+ items are in trigger area. But as said, counting cargo items will need more. -
How to fire trigger when a percentage of items are present
opusfmspol replied to Varn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Beginners Guide on Arrays A3 Script Commands Because _itemsInArea is undefined (also see note). - Define the array of all items, either as ItemsTotal or _itemsTotal (note: editor triggers don't allow the "_local" variable type in primary scope, but triggers created by scripts do). ItemsTotal = [item_1, item_2, item_3, item_4]; - Build an array of the items that are in the area: either as ItemsInArea or _itemsInArea: ItemsInArea = []; {if (_x In thisList) then {ItemsInArea pushBack [_x]};} Count ItemsTotal; - Then determine if number in area meets the desired percentage: Count itemsInArea >= ((Count itemsTotal) * 0.75) That should count the editor placed items, but counting the cargo items in objects needs more. -
Scripts Not Working on Dedicated Server
opusfmspol replied to klakins's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Moving to a separate script would be proper since remoteExec the addactions doesn't return the handles for storing and removing them later. -
How to fire trigger when a percentage of items are present
opusfmspol replied to Varn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
// 75% or more in area. Count _itemsInArea >= ((Count _itemsTotal) * 0.75)