Jump to content
Sign in to follow this  
Melmarkian

Position of units with BIS_fnc_spawngroup/sync created waypoints

Recommended Posts

Hi,

I have two questions about a short script I wrote. First here it is:

heavysupport = [getpos spawn2, EAST, ["T72_TK_EP1", "T72_TK_EP1", "ZSU_TK_EP1", "V3S_Open_TK_EP1"]] call BIS_fnc_spawnGroup;
engineersquad = [getpos spawn3, EAST, ["TK_Soldier_Engineer_EP1", "TK_Soldier_Engineer_EP1", "TK_Soldier_Engineer_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_Engineer_EP1"]] call BIS_fnc_spawngroup;

heavywp1 = heavysupport addWaypoint [getpos spawn2, 0];
heavywp1 setWaypointType "LOAD";
heavywp1 setWaypointTimeout [5,5,5];

engineerwp1 = engineersquad addWaypoint [getpos spawn2, 0];
engineerwp1 setWaypointType "GETIN";
engineerwp1 setWaypointTimeout [5,5,5];

heavywp1 synchronizeWaypoint engineerwp1;


heavywp2 = heavysupport addWaypoint [getMarkerPos "us", 0];
heavywp2 setWaypointType "TR UNLOAD";

I create two groups with the BIS_fnc_spawngroup and there is the first problem: The group heavysupport spawns with the vehicles nearly on the same spot. They are almost on top of each other. Is there a way to spread them a bit with the function? Or do I have to spawn them with createunit in different positions?

Second question:

I created waypoints to get the engineersquad into the V35 of the heavysupport. I thought I had to use synchronizeWaypoint but they are just ignoring the sync.

Thanks in advance!

Share this post


Link to post
Share on other sites

1: use this instead for the vehicles, then i they will spawn in a line formation 5 meter apart:

_vehiclesToSpawn = ["T72_TK_EP1", "T72_TK_EP1", "ZSU_TK_EP1", "V3S_Open_TK_EP1"];
_offset = 0;
heavysupport = createGroup east;
{[[(getPos spawn2 select 0) + _offset,getPos spawn2 select 1,0], 180, _x, heavysupport] call bis_fnc_spawnvehicle; _offset  = _offset + 5} foreach _vehiclesToSpawn

2: try and use "GETIN NEAREST" instead and place wp on top of car, no synch needed.

engineerwp1 setWPPos (getPos nameofv35);

look at this older thread by me:

http://forums.bistudio.com/showthread.php?t=116330

it has a magic teleport if thats what you want and a script that will make them enter the vehicle by actually going to it and enter it if you need to see them go in(all turrets included, wich getin/getin nearest wps ignore).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×