Jump to content
Sign in to follow this  
Winchester Delta_1

Tracking flag in CTF?

Recommended Posts

Hey guy's,

Right now i'm editing a CTF map, and there is a little thing i want to accomplish but i really don't know how. THe mission i am making is a long distance CTF. And offcourse when you lose the flag half way it's gonna be dam hard to find him. So i need a script or somehow that puts a marker on the flag evry 5 minutes.

So conditions are:

Flag marker updated evry 5 min on flag position and it doesn't matter if the unit has the flag or doesn't have the flag on both sides and MP and JIP compatible...

Can that be done??? Appreciate you'r help allready...

(P.S. i'm a total noob in this, so if you you need me to send the mission to you i will be glad to do that.)

Edited by Winchester Delta_1

Share this post


Link to post
Share on other sites

Somebody knows what i mean?? I'm not English you know.. so if you want me to say it differently so you understand just ask.. Thanks

Share this post


Link to post
Share on other sites

Use flagOwner (I believe that's the name of the command, I don't have a comref to check), then getPos.

Share this post


Link to post
Share on other sites

Try this. I didnt test it so it might need some modifications.

Place a trigger on the map, set the A axis to 2000 and B axis to 2000. Make sure you are IN the trigger zone when you test.

Place a marker on the map and name it flagMarker.

Place a flag and name it flagOne.

The trigger has to be activated by anyone when they are present.

In the "On Act" section, paste this :

person = flagowner flagOne; flagMarker setPosition [ getPos person select 0,  getPos person select 1];

If someone has the flag, it should put a marker on the map over him.

Share this post


Link to post
Share on other sites
while{true}do{
 if(!isNull (flagOwner flag)}then{
   "marker" setMarkerPos (getPos (flagOwner flag));
 }else{
   "marker" setMarkerPos (getPos flag);
 };
 sleep 5 * 60;
};

Share this post


Link to post
Share on other sites

Or use my script pack which has this built in ? (see sig)

Share this post


Link to post
Share on other sites
Neither of these work perhaps I am doing it wrong. Any luck on getting a clearer explanation?

Put this code in a file called trackFlag.sqf:

_flag = _this select 0;
_marker = _this select 1;
while{true}do{
 if(!isNull (flagOwner _flag)}then{
   _marker setMarkerPos (getPos (flagOwner _flag));
 }else{
   _marker setMarkerPos (getPos _flag);
 };
 sleep 5 * 60;
};

Then place a marker named "flagMarker" and put this in the init field of the flag:

trackMe = [this,"flagMarker"] execVM "trackFlag.sqf"

Share this post


Link to post
Share on other sites

Hey guy's sorry i ddin't react on this post.. I gave up on this after i wasted 30 hours on this. But now i see you guy's gave me the answer. Thank you guy's and sorry for not responding to my own post.

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  

×