PDA

View Full Version : Moving Marker Question



Kocrachon
Jun 12 2009, 02:05
Quick and easy question, how do I create a marker that follows a vehicle around? I want the marker to create when a Humvee is droped out of a C-130 and follow it around afterwords so that the men who also jumped can find it on the ground.

pogoman979
Jun 12 2009, 02:24
exec/spawn:


createMarker["marker",[0,0,0]];
"marker" setMarkerShape "ICON";
"marker" setMarkerType "DOT";

while {alive humvee} do

{

"marker" setpos getpos humvee;

sleep 1;

};

deletemarker "marker";

obviously you can give the marker whatever properties you want, not just the above ones.

Kocrachon
Jun 12 2009, 03:12
exec/spawn:


createMarker["marker",[0,0,0]];
"marker" setMarkerShape "ICON";
"marker" setMarkerType "DOT";

while {alive humvee} do

{

"marker" setpos getpos humvee;

sleep 1;

};

deletemarker "marker";

obviously you can give the marker whatever properties you want, not just the above ones.

Thank you very much kind sir =)

---------- Post added at 03:12 AM ---------- Previous post was at 02:48 AM ----------

Actually slight hic-up... I dont quite see the marker. I set the humvees name in the script but still no marker showing up. I also have the humvee as the source of executing the script at init.

CarlGustaffa
Jun 12 2009, 05:33
Shouldn't you use: "marker" setMarkerPos (http://community.bistudio.com/wiki/setMarkerPos) getPos humvee; ?

pogoman979
Jun 12 2009, 07:05
yar, my bad. im sure he'll figure it out :P

Kocrachon
Jun 12 2009, 07:57
I ended up getting it working after I went through the marker commands some more. Thanks for the help.

])rStrangelove
Jun 12 2009, 09:23
Just curious: can the above code be pasted into the init field of the humveh in the editor? Or would i get an error because it has a loop included?