Jump to content
Sign in to follow this  
Frizbee

Moving map markers

Recommended Posts

Okay, is there a way to mark on the map the movement of an enemy vehicle.

Ie. A script taking the position of the vehicle, and then marking it on the map accurate to within about 10 metres.

I was thinking it would make for an interesting map where 1 person is a running man, trying to get away from a team hunting him down.

Share this post


Link to post
Share on other sites

Yes, this is how you do it:

Put the marker you want to move on your mission. For example, we will call it "gubamarker"

So the name of the Marker must be "Guba" the "text" field can say anything, but the name must be the name you use in the

following script.

--------gubamarker.sqs-----------

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#loop

"gubamarker" setMarkerPos [(getpos general select 0), (getpos general select 1), 1]

~10

goto "loop"

<span id='postcolor'>

---------end gubamarker.sqs--------

In the Init field of the unit that is tracked, put this:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[this]exec "gubamarker.sqs"

<span id='postcolor'>

You can have several working at the same time, as I have done in one of my missions ThreeSnipers.

Regards,

Share this post


Link to post
Share on other sites

And if you want inaccurate position change Lt_Damage's script  :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_inac=10

#loop

"gubamarker" setMarkerPos [(getpos general select 0)-_inac+(random (2*_inac)), (getpos general select 1)-_inac+(random (2*_inac))]

~10

goto "loop"

<span id='postcolor'>

Share this post


Link to post
Share on other sites

Isn't my script, however the original person who made it did not put their details in it and I don't know who made it.. smile.gif

I can't script to save myself tounge.gif

Regards,

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Lt_Damage @ Oct. 29 2002,01:09)</td></tr><tr><td id="QUOTE">Yes, this is how you do it:

Put the marker you want to move on your mission. For example, we will call it "gubamarker"

So the name of the Marker must be "Guba" the "text" field can say anything, but the name must be the name you use in the

following script.

--------gubamarker.sqs-----------

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#loop

"gubamarker" setMarkerPos [(getpos general select 0), (getpos general select 1), 1]

~10

goto "loop"

<span id='postcolor'>

---------end gubamarker.sqs--------

In the Init field of the unit that is tracked, put this:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[this]exec "gubamarker.sqs"

<span id='postcolor'>

You can have several working at the same time, as I have done in one of my missions ThreeSnipers.

Regards,<span id='postcolor'>

why [this] if you are not using it?

you sohuld probably do

_general = _this

and then use '_general' not just 'general' in script

Share this post


Link to post
Share on other sites

As its pretty similar I was wondering if someone could lend me a hand too.

I made a trigger

Condition: (flagowner vlajkaUSA == ownerU)

Activation: Flagscript.sqs

Countdown: 300seconds

The script looks like this:

#loop

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerPos (GetPos ownerU)

?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerPos (GetPos ownerR)

?(flagowner vlajkaUSA == ownerU) : "us_flag" SetMarkerColor "ColorRed"

?(flagowner vlajkaRUS == ownerR) : "rus_flag" SetMarkerColor "ColorRed"

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerType "Marker"

?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerType "Marker"

~1

?(flagowner vlajkaUSA == ownerU) : "us_flag" SetMarkerColor "ColorGreen"

?(flagowner vlajkaRUS == ownerR) : "rus_flag" SetMarkerColor "ColorGreen"

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerType "Flag1"

?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerType "Flag1"

goto "loop"

It works fine until the player with the flag dies or he caps the flag and then I want the map marker to return to its original place. I was told to add this:

; Check whether or not the flag carrier is dead.

?(not alive flagowner vlajkaUSA) : goto "reset_marker_usa"

?(not alive flagowner vlajkaRUS) : goto "reset_marker_rus"

; Check whether or not the owner has been set to null

?(ownerU == objNull) : goto "reset_marker_usa"

?(ownerR == objNull) : goto "reset_marker_rus"

; Finally return to the loop.

goto "loop"

; Reset the Nato marker to its flagpole.

#reset_marker_usa

"us_flag_1" SetMarkerPos (GetPos vlajkaUSA)

exit

; Reset the Russian marker to its flagpole.

#reset_marker_rus

"rus_flag_1" SetMarkerPos (GetPos vlajkaRUS)

exit

goto "loop"

However it doesnt seem to work at all using that. Any help much appreciated.

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  

×