GID Positioning System tips and tricks

GID Positioning System tips and tricks

« posted: Apr 14, 2015, 05:07 PM »
So as a small start on using the GID Positioning System by Lynx
http://www.armaholic.com/page.php?id=21925
http://forums.bistudio.com/showthread.php?160709-GID-Object-Positioning-System

I load the object i want in the world with this (down by the weather, jumping etc.) from the main init.sqf
Code: [Select]
if (isServer) then {call compile preprocessFile "addons\extraSites\init.sqf";};

In the addons\extraSites\init.sqf i have
Code: [Select]
#include "site_A.sqf"

systemChat "Extra sites and buildings Initialized";
diag_log "Extra sites and buildings Initialized";

And as an example in site_A.sqf that is located in addons\extraSites\ together with the init.sqf
Code: [Select]
// Main airfield
_pos = [14511.586914,16334.287109,0.00123787];
_object = createVehicle ["Land_Scrap_MRAP_01_F", _pos, [], 0, "CAN_COLLIDE"];
_object setDir 320;
_object setPosATL _pos;
_object setVariable ["R3F_LOG_disabled", true];

This places an dismantled hunter at the vehicle store by the main airfield, each of (in my case) the site_X files can have many many objects, ill attach a file for a "base" down in the SW corner of the map with a 1km runway (that unfortunatley doesnt work  ::) ,at least not with that model/object)

This example will create an camo net with a dismantled hunter some barrels and other stuff, plus a laptop that i used with micoverys parking addon. Here im also using "attachTo" which works well if you want to put things relative to another not caring about the position

Code: [Select]
// Main airfield
_pos = [14511.586914,16334.287109,0.00123787];
_object = createVehicle ["Land_Scrap_MRAP_01_F", _pos, [], 0, "CAN_COLLIDE"];
_object setDir 320;
_object setPosATL _pos;
_object setVariable ["R3F_LOG_disabled", true];

_laptop = createVehicle ["Land_Laptop_unfolded_F", _pos, [], 0, ""];
_laptop setPos getPos _object;
_laptop attachTo [_object, [-0.55,-2.5,0.3]];
_laptop setVectorDirAndUp [[0,-1,-0.33],[0,0,1]];
_laptop setVariable ["is_parking", true, true];
_laptop setVariable ["R3F_LOG_disabled", true];

_net = createVehicle ["CamoNet_BLUFOR_big_F", _pos, [], 0, ""];
_net setPos getPos _object;
_net attachTo [_object, [2.5,4,0]];
_net setVectorDirAndUp [[0,0,0],[0,0,1]];
_net setVariable ["R3F_LOG_disabled", true];

_table = createVehicle ["Land_CampingTable_small_F", _pos, [], 0, ""];
_table setPos getPos _object;
_table attachTo [_object, [3,0,-0.95]];
_table setVectorDirAndUp [[0,0,0],[0,0,1]];

_chair = createVehicle ["Land_CampingChair_V2_F", _pos, [], 0, ""];
_chair setPos getPos _object;
_chair attachTo [_object, [3,1,-0.77]];
_chair setVectorDirAndUp [[0,0,0],[0,0,1]];

_barrel = createVehicle ["Land_MetalBarrel_empty_F", _pos, [], 0, ""];
_barrel setPos getPos _object;
_barrel attachTo [_object, [-2,0,-0.77]];
_barrel setVectorDirAndUp [[3,0,0],[0,0,-0.9]];

_barrel = createVehicle ["Land_MetalBarrel_empty_F", _pos, [], 0, ""];
_barrel setPos getPos _object;
_barrel attachTo [_object, [-3,0,-0.77]];
_barrel setVectorDirAndUp [[3,0,0],[0,0,-0.9]];

_barrel = createVehicle ["Land_MetalBarrel_empty_F", _pos, [], 0, ""];
_barrel setPos getPos _object;
_barrel attachTo [_object, [-2,1,-0.77]];
_barrel setVectorDirAndUp [[3,0,0],[0,0,-0.9]];

_barrel = createVehicle ["Land_MetalBarrel_empty_F", _pos, [], 0, ""];
_barrel setPos getPos _object;
_barrel attachTo [_object, [-3,1,-0.77]];
_barrel setVectorDirAndUp [[3,0,0],[0,0,-0.9]];
// Marker
_marker = createMarker ["ChopShop_1", _pos];
_marker setMarkerShape "ICON";
_marker setMarkerText "Vehicle Services";
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_dot";
_marker setMarkerSize [0.6,0.6];

Other settings for the objects could for example be
Code: [Select]
_object enableSimulation false;

Code: [Select]
_object allowDamage false;

Code: [Select]
_object setVariable ["R3F_LOG_disabled", true, true];

This one places a white medivac chopper in the middle of the main airfield
Code: [Select]
// Main airfield
_pos = [14646.488281,16299.760742,0.010643];
_object = createVehicle ["O_Heli_Transport_04_medevac_F", _pos, [], 0, "CAN_COLLIDE"];
_object setDir 0.0328524;
_object setPosATL _pos;
//_object setVariable ["BIS_enableRandomization", false]; //Only needed vehicles that have randomization, i.e. not needed on this
_object setObjectTexture [0, "#(argb,8,8,3)color(1,1,1,0.5)"];
_object setObjectTexture [1, "#(argb,8,8,3)color(1,1,1,0.5)"];
_object setObjectTexture [2, "#(argb,8,8,3)color(1,1,1,0.5)"]; //This unfortunately also removes the markings on the side
_object setObjectTexture [3, "#(argb,8,8,3)color(1,1,1,0.5)"];

You can also place markers and adjust them accordingly (i did make these "local" at firs but as im loading them on the server they shouldnt be).
Code: [Select]
//Spawn island warning
_pos = [14500,5870,0];
_object = createMarker ["Info_6", _pos];
_object setMarkerShape "ELLIPSE";
_object setMarkerText "...";
_object setMarkerColor "ColorRed";
_object setMarkerType "mil_unknown";
_object setMarkerSize [120,120];
//Spawn island warning text and icon
_pos = [14500,5870,0];
_object = createMarker ["Info_7", _pos];
_object setMarkerShape "ICON";
_object setMarkerText "Dont go or Build here, you might get BANNED for doing so.";
_object setMarkerColor "ColorBlack";
_object setMarkerType "mil_warning";

At the BIS forums i linked there is more to read about this, nice thing about it is that you can place objects extremely exact (down to the millimeter) and at least for me they load in before vehicles and such, there is an issue with spawn beacons however but i think i saw someone made it so if the spawn beacon is over water it sets your spawn height to something else which was i nice touch, Could be LoudNL who did that?

Its somewhat frustrating to get things right in the beginning but when you get the hang of it you get pretty fast setting these up, be sure to comment everything thou if you want to change/edit them.

Buildings also works with the lootspawner if you have that turned on.

Maybe i should have put this in tutorials?
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: GID Positioning System tips and tricks

« Reply #1 posted: Apr 14, 2015, 05:08 PM »
Moved to tutorials.
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: GID Positioning System tips and tricks

« Reply #2 posted: Apr 17, 2015, 12:36 PM »
adding billboard or other object textures , remember to use the global function

Code: [Select]
_object SetObjectTextureGlobal [0,"mapconfig\img\bill2.jpg"];

and this also appears to work - busy with some more testing.

Code: [Select]
_object setVariable ["R3F_LOG_disabled", true, true];

- from the grassy knoll -

Re: GID Positioning System tips and tricks

« Reply #3 posted: Apr 17, 2015, 12:39 PM »
Can one use "global" on icon too maybe then?
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: GID Positioning System tips and tricks

« Reply #4 posted: Apr 17, 2015, 12:49 PM »
Can one use "global" on icon too maybe then?

give me an example ? i think setMarkerType is already global

- from the grassy knoll -

Re: GID Positioning System tips and tricks

« Reply #5 posted: Apr 17, 2015, 02:09 PM »
Aha, ok, it was a question

I have issues with
Code: [Select]
//Spawn island warning text and icon
_pos = [14500,5870,0];
_object = createMarkerLocal ["Info_7", _pos];
_object setMarkerShapeLocal "ICON";
_object setMarkerTextLocal "Dont go or Build here, you might get BANNED for doing so.";
_object setMarkerColorLocal "ColorBlack";
_object setMarkerTypeLocal "mil_warning";
But only sometimes....

Gonna try
Code: [Select]
//Spawn island warning text and icon
_pos = [14500,5870,0];
_object = createMarker ["Info_7", _pos];
_object setMarkerShape "ICON";
_object setMarkerText "Dont go or Build here, you might get BANNED for doing so.";
_object setMarkerColor "ColorBlack";
_object setMarkerType "mil_warning";
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: GID Positioning System tips and tricks

« Reply #6 posted: Apr 17, 2015, 02:19 PM »
local will not show for anyone if you running a ded server ...

- from the grassy knoll -

Re: GID Positioning System tips and tricks

« Reply #7 posted: Apr 17, 2015, 02:23 PM »
Funny thing is that it did for me and anyone else on the server for the longest time.... well i guess that was something funny arma did for me =). and this still works but then again "local" may not be applicable on "setMarkerShape" so mayb that is why that one always works.
 
Code: [Select]
//Spawn island warning
_pos = [14500,5870,0];
_object = createMarkerLocal ["Info_6", _pos];
_object setMarkerShapeLocal "ELLIPSE";
_object setMarkerTextLocal "...";
_object setMarkerColorLocal "ColorRed";
_object setMarkerTypeLocal "mil_unknown";
_object setMarkerSize [120,120];

Re: GID Positioning System tips and tricks

« Reply #8 posted: May 05, 2015, 09:05 AM »
Updated, removed anything "local" regarding markers and some other small edits, gonna see if i can find LouDs fix for spawnbeacons over water and add that to the first post