-
Content Count
719 -
Joined
-
Last visited
-
Medals
Everything posted by opusfmspol
-
activate trigger by opening crate
opusfmspol replied to silentleopard's topic in ARMA 3 - MISSION EDITING & SCRIPTING
My thought would be: User Interface Event Handlers: onLoad -
Scripts Not Working on Dedicated Server
opusfmspol replied to klakins's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe try this: (not tested, so might need some adjusting - I note there are undefined references, so perhaps there are more to these than was posted) // initPlayerLocal.sqf: // gennorm.sqf et Al. (run only by Client p1) // start.sqf (run only by server, whether hosted or dedicated): -
Teleport all players in trigger
opusfmspol replied to barn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe try this, has some added Order of Operations and removes some parts not needed : this addAction [ "<t color='#00FF00'>ENTER WITH PLAYERS</t>", { { if (_x inArea triggertower) then { _x setPos [ ((getPos Obelisk1) select 0) +5, ((getPos Obelisk1) select 1) +0, ((getPos Obelisk1) select 2) +2 ]; }; } forEach (allPlayers - (entities "HeadlessClient_F")); setDate [2002, 4, 12, 23, 0]; }, nil, 1.5, true, true, "", "true", 3 ]; If your mission isn't using Headless Client, and you don't anticipate any being added, you might do away with its reference and just use (allPlayers). What is the markerType, x-axis and y-axis of the triggerTower marker? And what type object is Obelisk1? -
Script holding error help
opusfmspol replied to nodrog1061's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The execVM and setVariable are outside the spawn. The waitUntil runs separately in the spawn, and ends with nothing being done. Try moving the execVM and setVariable inside the spawn, after the wait. -
Scripts Not Working on Dedicated Server
opusfmspol replied to klakins's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It likely works when you use the radio triggers because the triggers exist on all machines, and when you broadcast radio Alpha the server and clients all ExecVM the gennorm.sqf. But from addAction (local to client) the server does not run anything due to the locality which @pierremgi points out. Your "if (isServer)" scopes get bypassed entirely, the scripts are only running on clients. -
Short question about remoteExec
opusfmspol replied to Sneax x's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Player is different on each machine, so you either target a defined unit or use commands owner or clientOwner to identify / target a unit. Otherwise 0 will target all, 2 will target server only, -2 will target all clients excluding server. In regards to owners, server can get any unit's owner but client's can only get their own, they cannot get other owners. If you want your mission to allow clients to get other unit owners, you have to make and include a function for it. remoteExecutedOwner will identify where a remoteEx originated from.- 4 replies
-
- remoteexec
- remoteexecall
-
(and 4 more)
Tagged with:
-
Teleport all players in trigger
opusfmspol replied to barn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What you have here is incomplete, missing a semicolon ( ; ) and ending in a period ( . ), which shouldn't work. Should be: this addAction [ "ENTER WITH PLAYERS", { { if (isPlayer _x) then { if (_x inArea triggertower) then { _x setPos [(getPos Obelisk1 select 0) +5, (getPos Obelisk1 select 1) +0, (getPos Obelisk1 select 2) +2]; }; }; } forEach allUnits; } ]; Recommend you use (_x In allPlayers) rather than (isPlayer _x), since isPlayer can sometimes be problematic in multiplayer. Also possible that in description.ext you might have security protocol (CfgDisabledCommands) in place for setPos command, allowing server to use it, but not allowing clients to use it. -
Dynamic AI Spawning *Dedicated server*
opusfmspol replied to razzored's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If all that was done was change "player" to "_unit", that wouldn't work. To "target a _unit" means a unit has to be selected from the activated trigger's list or thisList and defined in the script as _unit. Once you have a _unit defined in the script, changing the player references to _unit should work. -
Init code/script for AI to hunt the nearest player
opusfmspol replied to He'sCalledTheStig's topic in ARMA 3 - MISSION EDITING & SCRIPTING
See if this works for dedicated: if (isServer) then { _null = this spawn { Hunt_players_fnc = { _player = objNull; _players = +(allPlayers - (entities "HeadlessClient_F")); _distance = 100000; { if (alive _x && _x distance (Leader _this) < _distance) then { _distance = _x distance (Leader _this); _player = _x; }; } foreach _players; if !(isNull _player) then { _wp = (Group _this) addWaypoint [getPos _player, (50 + (floor(random 70)))]; _wp setWaypointStatements ["true","_null = this spawn Hunt_players_fnc;"]; _wp setWaypointType "SAD"; _wp setWaypointCombatMode "RED"; _wp setWaypointSpeed "FULL"; }; }; _null = _this spawn Hunt_players_fnc; }; }; -
Need Help Adding a waypoint to the closest Enemy or Uncaptured Sector
opusfmspol replied to Blitzen88's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_index = _sectors findIf { _x params[ "", "_sector" ]; _sectorOwner = _sector getVariable[ "owner", sideUnknown ]; _sectorOwner isEqualTo sideUnknown || _sectorOwner isEqualTo West }; //Find a flat position around the LZ marker & create an HPad there. _flatPos = [getPos ( _sectors select _index select 1 ), 0, 550, 10, 0, 0.3, 0] call BIS_fnc_findSafePos; Yeah, the _index findIf would return -1 as _index when Opfor or Independent holds all. You could test for that. If that's the case you could exit the script, if that's what you want to happen. if (_index < 0) exitWith {}; -
Dynamic AI Spawning *Dedicated server*
opusfmspol replied to razzored's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Checking "Server Only" is correct. Condition breaks it on dedi because Player is objNull on a dedicated server. Try using: ({_x In thisList} count AllPlayers > 0) as condition. -- edit: Also check the script for "player", that would have to target a _unit instead on dedi. -
_owner = objNull; {if (player distance (_x select 1) < 5) then {_owner = _x select 0};} forEach _Array; 5 is just suggestive radius for "inside a house". Houses will be bigger or smaller. Or use 1 or 0 if you want player right on the spot.
-
joinSilent on dedi server
opusfmspol replied to jo spanner's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try this: [_this select 0] joinSilent (Group (_this select 1)); -
Need Help Adding a waypoint to the closest Enemy or Uncaptured Sector
opusfmspol replied to Blitzen88's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe an Order of Operations issue, maybe not? If so, I would think it should occur consistently. What it means is confusion might occur over which command to run first, when multiple commands are in an expression and precedence is not conditioned ( ). Example: _flatPos = [getPos ( _sectors select _index select 1 ), 0, 550, 10, 0, 0.3, 0] call BIS_fnc_findSafePos; // Could get run as: _flatPos = [getPos ( (_sectors select _index) select 1 ), 0, 550, 10, 0, 0.3, 0] call BIS_fnc_findSafePos; // or: _flatPos = [getPos ( _sectors select (_index select 1) ), 0, 550, 10, 0, 0.3, 0] call BIS_fnc_findSafePos; -
Init code/script for AI to hunt the nearest player
opusfmspol replied to He'sCalledTheStig's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try this: -
AI won't shoot with rockets on vehicle target.
opusfmspol replied to Euroworldnetworks Yun2k's topic in ARMA 3 - MISSION EDITING & SCRIPTING
addVehicle -
Are the set variables still available after an FSM has completed (reached end state)? I've never tested for that.
-
Not tested, but try this: _fsm setFSMVariable ["_handle", _fsm]; _fsm setFSMVariable ["_result", false]; and inside the running _fsm: _handle setFSMVariable ["_result", true];
-
When creating a scenario in A2's 3d Editor, two files get created, the mission.biedi and the mission.sqf. The setPlayable command can be seen used in the mission.sqf, when a unit is placed and set as playable. So maybe it's a deprecated editor-only command, or maybe it's usable only in 3DEN or 2D setup, I dunno.
-
Have you tried to use setFSMVariable ?
-
Whitelisting 'addAction'?
opusfmspol replied to BigSnek's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Condition for addAction is a "string", not {code}. And for a string inside the string (i.e., "whitePlayer"), you would use 'semiquotes' (i.e., 'whitePlayer'). -
How to make an enemy group spawn if you kill a civilian?
opusfmspol replied to quickdagger's topic in ARMA 3 - MISSION EDITING & SCRIPTING
From COS Armaholic page : -
object ignore script
opusfmspol replied to dan ling-yang's topic in ARMA 3 - MISSION EDITING & SCRIPTING
setVariable in the dead body objects, and modify the cleanup script to look for the variable. If nil or false, clean up but if found true don't clean up. Or modify the cleanup script to include an object blacklist to check, and add the bodies to the blacklist. Probably other ways also. -
HELP Check if any unit form a specified group is in the area
opusfmspol replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For trigger condition, count the living units of each group to see whether at least one from each group is in the trigger list, and when count is correct the condition returns true, else false. Example (not tested): grpsPresent = []; {if ({Alive _x && _x In thisList} Count (Units _x) > 0) then {grpsPresent pushBack _x};} forEach [grpTeam1,grpTeam2,grpTeam3,grpTeam4,grpTeam5]; Count grpsPresent >= 5 -
Keep waypoints after respawn
opusfmspol replied to SirBa5terD's topic in ARMA 3 - MISSION EDITING & SCRIPTING
1. Use a Respawn event handler. Don't use "player" for setVariable / getVariable, because the player object will change. Refer to _unit and _corpse as given in the example. 2. Waypoints are a group function, they belong to the group. When a team gets wiped out, the group is subject to getting deleted. Waypoints get deleted with the group. There are various ways to prevent this sort of thing happening. What kind of activation effects are you saying happened?