-
Content Count
87 -
Joined
-
Last visited
-
Medals
Everything posted by Northup
-
How to get update when marker color changes
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not sure what you mean. For context, I am creating a small Outpost that will be capturable in a larger MP mission with 3 teams fighting over a single sector. The idea is that a player captures an outpost by capturing a flag (with code from here). Doing so changes the color of a named marker specific to that base, to not only show who controls it, but to act as a switch of sorts for a couple of things in the outpost.This particular one is a supply crate. The addaction by itself works splendidly, filtering it seems to be quite the chore. Beyond that there will be a healing create, three vehicle repair areas and a respawn location -- all which are only meant to work for the team matching the marker color. -
How to get update when marker color changes
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have tried if (_mrkrcolor == _color) then { player addAction ["Rearm", { _mrkrcolor = getMarkerColor _mrkr; and if (_canRearm) then { player addAction ["Rearm", { private _customLoadout = player getVariable "enh_savedloadout"; if (isNil "_customLoadout") exitWith { player setUnitLoadout (configFile >> "CfgVehicles" >> typeOf player); systemChat "Could not find custom loadout"; systemChat "Restored default unit loadout"; }; player setUnitLoadout _customLoadout; systemChat "Rearmed and Reloaded"; }, [], 0, true, true, "", "_canRearm"]; }; Neither throw errors, nor appears to have any effect. -
I managed to get this to work in one instance but not work in another. It's confounding! In some_1.sqf the following works: private _displays = uiNameSpace getVariable ["igui_displays", []]; { private _ctrl = _x displayCtrl 101; if (!isNull _ctrl && ctrlType _ctrl == 101) then { _ctrl ctrlAddEventHandler ["Draw", { _this#0 drawIcon [getMissionPath "\images\attack.paa", [1,1,1,1], (getMarkerPos "BZMarker"), 30, 30, 0, "", 1, 0.03, "TahomaB", "right"]; }]; }; } forEach _displays; In some_2.sqf: //This works and displays an icon on the player map findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", { _ALP_towers = ALP_mainZone getVariable "ALP_triggerTowers"; { _this select 0 drawIcon [getMissionPath format ["\images\tower%1_ca.paa", (_forEachIndex + 1)], [1,1,1,1], (getPos (_x select 0)), 24, 24, 0, "", 1, 0.03, "TahomaB", "right"]; } forEach _ALP_towers; }]; //This does NOT work, but doesn't throw any errors! private _displays = uiNameSpace getVariable ["igui_displays", []]; { private _ctrl = _x displayCtrl 101; _ALP_towers = ALP_mainZone getVariable "ALP_triggerTowers"; if (!isNull _ctrl && ctrlType _ctrl == 101) then { { _ctrl ctrlAddEventHandler ["Draw", { _this#0 drawIcon [getMissionPath format ["\images\tower%1_ca.paa", (_forEachIndex + 1)], [1,1,1,1], (getPos (_x select 0)), 24, 24, 0, "", 1, 0.03, "TahomaB", "right"]; }]; } forEach _ALP_towers; }; } forEach _displays;
-
Trying to pass a variable through to the custom function that spawns comps. The function works in other tests just fine. However, I am trying to call it on initServer. _ZoneComp = missionNamespace getVariable ["ALP_mainZone", ""]; diag_log format ["_ZoneComp value:%1", _ZoneComp]; _compReference = [_ZoneComp, [], [0,0,0], 0, true, true, false] call LARs_fnc_spawnComp; And just to verify here is my compositions.cfg: //LARs_spawnComp_debug = 1; //1 = RPT output, 2 = RPT output and ingame visual positioning info class CfgCompositions { class ALP_Area_01 { //Name that the composition is spawned by #include "ALP_Area_01.sqe" //Renamed composition.sqe }; }; Upon mission start, I get the Error >>: Type Object, expected string. In the RPT, this pops out: 11:17:13 "_ZoneComp value:ALP_Area_01" 11:17:13 Error in expression < missionConfigFile >> "CfgCompositions" >> _compName; Any ideas ? Edit: Fixed Thanks. Great Script!
-
I am trying to write a script that reads a composition.sqe with loadconfig and then walks through the items using configClasses and spawn them one by one. So far, no luck. I have the following code: Currently this is what the error report says: For reference, here is the test composition.sqe: Any ideas?
-
Spawning Composition not Working
Northup replied to Northup's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Solved. Still leaning syntax. My apologies. @Larrow thanks for the script. Works like a charm once I figured it out. -
Spawning Composition not Working
Northup replied to Northup's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
??? -
Spawning Composition not Working
Northup replied to Northup's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
@Larrow, I gave it another shot and was able to get into my mission, but I am unsure of how to spawn my comp via trigger? I tried _compReference = [ SAB ] call LARs_fnc_spawnComp; no luck. My composition is called SAB. Any suggestions? -
Spawning Composition not Working
Northup replied to Northup's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Thanks Larrow. I tried yours first, but I'm inexperienced enough that with yours I couldn't add the lines to description.ext, since the mission I have is somewhat complex and has a ton of other functions and was throwing me errors. Not comfortable enough to perform that kind of surgery on existing scripts and functions. I also couldn't figure out how to just straight up spawn in something on mission start without using addactions. Just trying to come of with a small, simple script that will do what I need. -
I am running a custom mission. I am trying to make a simple change that is proving to be a tad more complex than I'd thought. The simple short version is that I am simply trying to draw a (custom) 2d icon on the player map and gps with drawicon and using getmissionpath "\folder\genericimage.paa", and then update the position of that icon on a set interval. However, accessing the position of the bonuz zone is proving to be a challenge. The mission is a custom sector control mission. The mission selects either a random trigger or one chosen by name by the host. That trigger serves as the main AO. Inside, there is another trigger that acts as a moving zone. Here is how the zones are created: However, there isn't an actual position to grab there, since the bonus zone movement is handled in the sector manager: I have tried to grab the pos from _ALP_triggerBonusNewPos_X and _ALP_triggerBonusNewPos_Y,0 to no avail. I wrote a script that is executed on initplayerlocal.ini: I'm sure I am doing it all wrong. If anyone has any insight, please let me know.
-
DEFORMER - terrain height map editing in 3DEN
Northup replied to Greenfist's topic in ARMA 3 - ADDONS & MODS: COMPLETE
This is awesome. Would be nice if there was a way to plop down and resize/reshape similar to triggers, maybe use the z axis to adjust height, and still be able to retain all the same options (harshness, etc). This would make uploading base compositions super easy. Would also make loading in comps on varied terrain a lot easier as well, at least in my minds eye, since the deformation would be part of the comp. Thanks for this. -
Soldier Tracker ( Map and GPS Icons )
Northup replied to fn_Quiksilver's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am trying to figure out how to make all infantry on every team use "iconManVirtual_ca.paa" as their icon, with the player icon set as green (that part I figured out thanks to the above dialogue). I'd also like to add a red mildot along with the red iconplayer_ca.paa. -
I'm working on a mission where there will be 2 towers stacked on one another. What I want to do: Automatically destroy the top tower if the bottom one is destroyed. It's fine if both must be destroyed, though it would be nice if the bottom one could still be functional if the top one was destroyed.
-
Destroying stacked towers
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Good info. However, I've decided to leave towers as they are. My predilection for detail was getting the better of me. I already added portable rugged lamps to every level of the tower, which all are attachedto tower, plus a trigger drawing icons. I don't want to have to create an array of all rugged portable lights to destroy them when the tower goes down. I figure if the host has issues with the towers, they can just delete them in the editor. -
Destroying stacked towers
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That throws Undefined variable in expression: _wreck -
Destroying stacked towers
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is there a way to reference the swapped model after an object is destroyed? I want the tower collapse animation to play, but want it to never replace the top tower with the damaged model (or delete it immediately). -
Destroying stacked towers
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Forgot to validate if this would work in an MP environment. I tried swapping with addMPEventHandler, but handledamage returns an unknown enum value. -
Getting area agnostic marker position from names?
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No worries! Both approaches are helpful. Thanks! -
Getting area agnostic marker position from names?
Northup posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I need to get the position 6 markers. All markers follow a naming convention kavala_tower_1, pyrgos_tower_1, kavala_tower_2, pyrgos_tower_2 (every zone has 6 towers, 26 zones) etc. I have set up a trigger that will execute the following script: [] spawn { waitUntil{!isNull findDisplay 12}; findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",{ (_this select 0) drawIcon [ getMissionPath "\images\tower1_ca.paa", [1,1,1,1], getMarkerPos "kavala_tower_1", 20, 20, 0, "", false, 0.03, "TahomaB", "right"]; }]; }; //Rinse, wash repeat for towers 2, 3, 4, 5, and 6. While that works, it seems needlessly convoluted and time consuming. Instead, is there a way to get the script script to return every marker named ANYCITY_tower_1, ANYCITY_tower 2 only within the trigger zone? -
Getting area agnostic marker position from names?
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So multiple triggers exist, one for each zone. Only one trigger can be active. You are correct in that all the triggers do is add icons to specific areas of the map. The idea is that only icons in the active zone are shown. Active zone lasts the entire mission (MP), then a new zone is loaded on the next mission. Not sure how else I could show these icons on the map without a trigger in each zone, without also showing every tower on altis called "tower_1", etc. My next step would be to delete all other triggers as soon as one is activated, but not sure if that approach is the best one. You've given me something to chew on though! Edit: Didn't realize this would ditch the sqf, so took me a minute but it works as it (minus the comments, obv.)! Thanks! -
Getting area agnostic marker position from names?
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This works great for a specific trigger. Is there a way to pass thistrigger instead of yourtriggername? Or perhaps any activated trigger with "TowerTrigger" in the name? The goal is to be able to plop a trigger, have it call a script that does the above, but for any trigger. Using this would still require 26 scripts. Apologies, I am fairly new at this. -
Getting area agnostic marker position from names?
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the reply! Unfortunately that threw an error type bool, expected number. Line 23. Also, perhaps I should have mentioned each tower has its own numbered icon. So tower1_ca.paa has to appear at tower_1 marker location. My lizard brain attempted to also initially tried to pass "thistrigger" from the trigger to the sqf, so that the sqf isn't relying on the name of the trigger, but rather activates when any trigger calls it. -
I removed the comment, but this doesn't seem to work for me. I am sure I am doing something wrong. I have a trigger that executes an sqf that gets the position of an invisible marker and draws an icon there. This works fine on the main map, but I get no errors. I am not using any mods. Everything is vanilla. params [ ["_position",[],[[]]] ]; _marker = createMarker ["tower1", _position]; _marker setMarkerShape "ELLIPSE"; _marker setMarkerSize [1,1]; _marker setMarkerBrush "SolidBorder"; _marker setMarkerAlpha 0; _marker setMarkerColor "ColorOPFOR"; sleep 0.5; [] spawn { waitUntil{!isNull findDisplay 12}; findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",{ (_this select 0) drawIcon [ getMissionPath "\images\tower1_ca.paa", [1,1,1,1], getMarkerPos "tower1", 20, 20, 0, "", false, 0.03, "TahomaB", "right"]; }]; }; [] spawn { waitUntil {!isNull (uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull])}; disableSerialization; private _display = uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull]; private _miniMapControlGroup = _display displayCtrl 13301; private _miniMap = _miniMapControlGroup controlsGroupCtrl 101; _miniMap ctrlAddEventHandler ["Draw", { (_this select 0) drawIcon [ getMissionPath "\images\tower1_ca.paa", [1,1,1,1], getMarkerPos "tower1", 20, 20, 0, "", false, 0.03, "TahomaB", "right"]; }]; };
-
Lazy way to apply markers to towers within a trigger zone?
Northup posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Delete. -
Lazy way to apply markers to towers within a trigger zone?
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Delete.