Search the Community
Showing results for tags 'SetMarkerPos'.
Found 2 results
-
How to set markers on vehicles - Best practice/method
csk222 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello. I set the position of a marker on a helicopter in the init.sqf In the editor I have 2 triggers that change the marker color and text whether the helicopter is alive or dead I have been experimenting with deleting the 2 triggers (Alive/Dead) and adding the code to the init.sqf Is this a good idea? Is there a better method or more compact way of achieving this? Or should I stick with the trigger method in the editor? Note (Not Necessary): I am also interested in making the marker (helicopter c_air) point in the direction the vehicle is traveling instead of it always pointing north on the map. How is that done (Out of curiosity)? Thanks in advance. -
Hi all, I am currently developing a system that will select random objectives then assign markers to that area so that it is visible. I have run into an issue with the "SetMarkerPos" command. The error I receive is "Error setmarkerpos: type string, expected Array". The reason it is setup below is due to the fact I have 3 objective types. Town Objectives Primary Objectives Secondary Objectives The script i have created for setting marker positions for Town and Primary objectives is simple as all that is required is that the markers for those are moved to that designated town. However, a secondary objective can only exist inside a primary objective and not all of the primary objectives have a secondary objective. The idea is/was to combine the name of the Primary objective (publicvariable of "mainmark") with secondary_%1 to create the names of the secondary objective markers. I am then able to see if there is a secondary objective nearby to the randomly selected Primary objective and if there is, move the marker to it to indicate such. however I receive the above mentioned error when trying to set the markers position. I was hoping I could receive assistance in fixing this error either via directing me on how to assign the string into an array so the error stops or by finding another way to achieve this goal. Thanks. Below is the script I am using to achieve this goal. null = execVM "obj\objective_controller.sqf"; _distm = getmarkerpos mainmark; _distt = getmarkerpos townmark; _dista = _distm distance _distt; if (_dista < 2200) then { execVM "obj\objective_controller.sqf"; }; if (_dista > 2200) then { _getmarkm = getmarkerpos mainmark; _showobjectivem = "mark_main_area" setMarkerPos _getmarkm; _showobjectivem = "mark_main_name" setMarkerPos _getmarkm; _getmarkt = getmarkerpos townmark; _showobjectivet = "mark_town_area" setMarkerPos _getmarkt; _showobjectivet = "mark_town_name" setMarkerPos _getmarkt; }; //----------------------------------------------------------------------------------------------- //Find secondary nearby _townsec = format ["secondary_%1",mainmark]; _dists = getmarkerpos _townsec; _secfind = _distm distance _dists; if (_secfind < 500) then { hint format ["placing %1 in %2 area", _townsec, mainmark]; _showobjectivesec = "mark_secondary_area" setMarkerPos _townsec; _showobjectivesec = "mark_secondary_name" setMarkerPos _townsec; }; if (_secfind > 500) then { };
- 3 replies
-
- SetMarkerPos
- string
-
(and 2 more)
Tagged with: