Nightjay0044 1 Posted March 29, 2006 Okay, I'm just making a simple short mission to do some practice with. Here's my problem: >I've placed a BMP and named it "E1", (the bmp is way on the other side of the island to where my battle takes place) >Where my battle takes place I have a marker Called "marker1". How can I make the BMP teleport to the marker whenever I choose anytime in the mission? Like say if I want it to teleport there when the enemy soldiers are dead. I know that if you place a BMP, then place to markers on the map and then group (F2) the markers to the BMP, that will make it randomly start at one of those two markers. but what i want to do is only make the bmp get the position of the marker whenever I desire, and only one marker. Just to create some suprise, because I don't want the player to notice the BMP until they are in the main battle area. Otherwise it would be no fun.. Thanks Share this post Link to post Share on other sites
pazuzu 21 Posted March 29, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">E1 setpos getmarkerpos "marker1" Just put that line in a trigger or script. Share this post Link to post Share on other sites
Nightjay0044 1 Posted March 29, 2006 Okay, thanks, now how would I do it for an entire infantry group to teleport to a marker? Share this post Link to post Share on other sites
crashdome 3 Posted March 29, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x setpos getmarkerpos "marker1"} foreach units group grpName where grpName is the leaders name Share this post Link to post Share on other sites
5133p39 16 Posted March 29, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x setpos getmarkerpos "marker1"} foreach units group grpName where grpName is the leaders name Just to clarify - actually it's where grpName is the name of ANY of the units from that particular group. It doesn't need to be only the leader. Share this post Link to post Share on other sites
Nightjay0044 1 Posted March 29, 2006 okay yes that worked. Well I tried putting down mechanized infantry squad. I did that and put that code in. Well it teleported all the soldiers including the crew inside the BMP but it did not teleport the bmp it's self. So the players didn't move to their next waypoint. So how do you make it so to teleport the tank and all the soldiers in the group. Thanks. Share this post Link to post Share on other sites
klamacz 448 Posted March 30, 2006 try to use a tank and infantry where tank isn't a part of infantry group. Then use both supplied here codes. Share this post Link to post Share on other sites
crashdome 3 Posted March 30, 2006 okay yes that worked. Well I tried putting down mechanized infantry squad. I did that and put that code in. Well it teleported all the soldiers including the crew inside the BMP but it did not teleport the bmp it's self. So the players didn't move to their next waypoint. So how do you make it so to teleport the tank and all the soldiers in the group. Thanks. Try this instead (untested): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{vehicle _x setpos getmarkerpos "marker1"} foreach units group grpName Share this post Link to post Share on other sites
Nightjay0044 1 Posted March 30, 2006 Okay I tried your code..I put it in the same on activation field of the trigger I put your code <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{vehicle _x setpos getmarkerpos "marker1"} foreach units group East1 That didn't work I played as the player in the mechanized group and I previewed it and it moved me underneath the tank. So I don't know if that works, or is there a certain spot where i have to put the line of code? Thanks Share this post Link to post Share on other sites
crashdome 3 Posted March 30, 2006 Quote[/b] ]I put it in the same on activation field of the trigger I put your code You mean you ADDED it to the other code? That's meant to be the only code in the activation line.. period. i.e. replace the other code Worked for me btw. Share this post Link to post Share on other sites
Nightjay0044 1 Posted March 30, 2006 Okay yeah it worked. this is what I did. Placed the trigger that I want. Put your line of code in the on activation field.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{vehicle _x setpos getmarkerpos "marker1"} foreach units group East1 Then that made them all teleport over to my marker position. Thanks this one is solved. Share this post Link to post Share on other sites