JAP 2 Posted May 1, 2003 Hey all, I ve got this mission to rescue a downed pilot. I was wondering how i can make the position of the pilot's movement visible on the map with a marker ? Marker should mark the realtime movement of the pilot. Cheers and thx upfront. /edit Some more info. This is for a co op, so marker should be visible for everybody ingame. ( west ) Share this post Link to post Share on other sites
bn880 5 Posted May 1, 2003 You have some options, in cadet mode you can use a reveal unit loop to each group that should see this on map. Otherwise you create a quick setMarkerPos loop. Ok ok, so I think you will ahve more complicated questions. Share this post Link to post Share on other sites
JAP 2 Posted May 1, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bn880 @ 01 May 2003,19:26)</td></tr><tr><td id="QUOTE">You have some options, in cadet mode you can use a reveal unit loop to each group that should see this on map. Otherwise you create a quick setMarkerPos loop. Â Ok ok, so I think you will ahve more complicated questions.<span id='postcolor'> Lol BN880, Somehow i knew who was gonna answer my question I m no scripting hero, so could you tell me how .... Last thing i need to finish this mission. Thx upfront. Share this post Link to post Share on other sites
iNeo 0 Posted May 1, 2003 M113marker.sqs </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop "M113marker" setMarkerPos [(getpos M113Ambulance select 0), (getpos M113Ambulance select 1), 1] ~0.5 goto "loop"<span id='postcolor'> Unit's init.field </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "M113marker.sqs"<span id='postcolor'> Change the names of the stuff so that it fits your mission. Share this post Link to post Share on other sites
JAP 2 Posted May 1, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (iNeo @ 01 May 2003,19:44)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop "M113marker" setMarkerPos [(getpos M113Ambulance select 0), (getpos M113Ambulance select 1), 1] ~0.5 goto "loop"<span id='postcolor'> M113marker is the name of the marker. M113Ambulance is the name of the unit. Change as you like. <span id='postcolor'> Ok, And what s the name of my unit ? ................. Thx neo, thx bn880 you made me a happy man ( ok, my wife did some work too .... ) Share this post Link to post Share on other sites
iNeo 0 Posted May 1, 2003 Edited my post to make it a bit clearer hehe Share this post Link to post Share on other sites
JAP 2 Posted May 2, 2003 Thx neo, Works like a charm. But then you already know cause we already beta tested it Cheers Share this post Link to post Share on other sites
SoloZone 1 Posted May 8, 2003 Ok all, this was the only area of the forum that was talking about realtime markers. I created a script that does this same function in a MP mission I am designing (WMD+Everon). content of my EastMarker.SQS #PlayerEastMarkers "EastCommanderMarker" setmarkerpos getpos EastCommander ~0.5 goto "PlayerEastMarkers" Player Init [player]exec "EastMArker.SQS" This works in MP mode up an until I die and respawn? When I respawn the marker stays where I died. Why this stumped me...since the players init would/should re-execute the SQS again. What am I missing? Any help would be appreciated.... Share this post Link to post Share on other sites
iNeo 0 Posted May 9, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (SoloZone @ 09 May 2003,00:55)</td></tr><tr><td id="QUOTE">Ok all, this was the only area of the forum that was talking about realtime markers. I created a script that does this same function in a MP mission I am designing (WMD+Everon). content of my EastMarker.SQS #PlayerEastMarkers "EastCommanderMarker" setmarkerpos getpos EastCommander ~0.5 goto "PlayerEastMarkers" Player Init [player]exec "EastMArker.SQS" This works in MP mode up an until I die and respawn? When I respawn the marker stays where I died. Why this stumped me...since the players init would/should re-execute the SQS again. What am I missing? Any help would be appreciated....<span id='postcolor'> What if you execute the script from another unit, like a gamelogic or something? Share this post Link to post Share on other sites
SoloZone 1 Posted May 9, 2003 iNeo, we had it in a Flag unit (under Init) but same issue. After looking at the script again, we realized that once the player dies and respawned, it does not retain the player name variable that was assigned in its init (ie EastCommander = this), the body stays on the map with the name. Thus the script will not move the marker over the newly respawned player. I think we have narrowed it down to that, so the question is now how do you assign the same name or move the name to the new respawned player? We are going to test deleting the man (deletevehicle _player) : #Deadplayer ~35 deletevehicle _player ~0.5 player = EastCommander ~1 _Marker setmarkerpos [(getpos player select 0), (getpos player select 1)] ~1 _player = player Share this post Link to post Share on other sites
bn880 5 Posted May 9, 2003 The technical issue behind this is, you save or pass the current Player object to an object variable. When the Player dies, the object you have saved will not change. Simple solution is to use Player all the time (no extra processing). Not save it to another variable. Share this post Link to post Share on other sites
hoz 0 Posted May 9, 2003 I use a script like this and execute it only on the client side for each player. ; positions.sqs ; usuage [] exec "positions.sqs" @alive player ?(side player == west): Goto "Loop_West" ?(side player == east): Goto "Loop_east" #Loop_West ~.1 _unit = W1; _mark = "Pos_W1" ?(!alive _unit):_mark setmarkerpos [0,0] ?(alive _unit):_mark setmarkerpos [getpos _unit select 0,getpos _unit select 1] _unit = W2; _mark = "Pos_W2" ?(!alive _unit):_mark setmarkerpos [0,0] ?(alive _unit):_mark setmarkerpos [getpos _unit select 0,getpos _unit select 1] _unit = W3; _mark = "Pos_W3" ?(!alive _unit):_mark setmarkerpos [0,0] ?(alive _unit):_mark setmarkerpos [getpos _unit select 0,getpos _unit select 1] _unit = W4; _mark = "Pos_W4" ?(!alive _unit):_mark setmarkerpos [0,0] ?(alive _unit):_mark setmarkerpos [getpos _unit select 0,getpos _unit select 1] ~1 Goto "Loop_West" #Loop_east ~.1 _unit = E1; _mark = "Pos_E1" ?(!alive _unit):_mark setmarkerpos [0,0] ?(alive _unit):_mark setmarkerpos [getpos _unit select 0,getpos _unit select 1] _unit = E2; _mark = "Pos_E2" ?(!alive _unit):_mark setmarkerpos [0,0] ?(alive _unit):_mark setmarkerpos [getpos _unit select 0,getpos _unit select 1] _unit = E3; _mark = "Pos_E3" ?(!alive _unit):_mark setmarkerpos [0,0] ?(alive _unit):_mark setmarkerpos [getpos _unit select 0,getpos _unit select 1] _unit = E4; _mark = "Pos_E4" ?(!alive _unit):_mark setmarkerpos [0,0] ?(alive _unit):_mark setmarkerpos [getpos _unit select 0,getpos _unit select 1] ~1 Goto "Loop_east" Share this post Link to post Share on other sites
SoloZone 1 Posted May 10, 2003 hoz, thanks, but you may want to check your script.That wont work..... how are you identifying which player is assigned the names of W1...W4? BN880. You gave me some ideas and I went to go implement them. My script got a lot worse and I went back to scratch....this was my original script that worked fine in non-MP mission and for MP before you die and respawn. Can you do me a favor and recode based on your input? I am on my 4th day...and I will give you all the credit on the start page of my MP map called WMD+Everon..... Each East player has init : EastCommander=this; [this] exec "EastMarkers.sqs" ....AlphaLeader=this... ... EastMarkers.SQS #PlayerEastMarkers "EastCommanderMarker" setmarkerpos getpos EastCommander "EastAlphaMarker" setmarkerpos getpos EastAlphaLeader "EastBravoMarker" setmarkerpos getpos EastBravoLeader "EastCharlieMarker" setmarkerpos getpos EastCharlieLeader "EastDeltaMarker" setmarkerpos getpos EastBravoLeader "EastEchoMarker" setmarkerpos getpos EastEchoLeader "EastFoxTrotMarker" setmarkerpos getpos EastFoxTrotLeader goto "PlayerEastMarkers" Share this post Link to post Share on other sites
hoz 0 Posted May 10, 2003 The script I use works. Each player is W1, W2, E1, E2...etc.. I think your problem is you need to run the script on each unit. The markers have to be updated on each client, markers moved on one client doesn't show on another client. Markers are identified as Pos_W1, etc.... If its a coop mission with just west players remove the EAST update and save some cpu cycles Hoz Share this post Link to post Share on other sites
SoloZone 1 Posted May 11, 2003 Ok, I think I got it for a two player game....well this will work. In the description file set respawn to base and time to 30. (assuming you know the code for that). Put a marker on the map, preferably off and out of the way called P1M & P2M (make it a 'dot' and name it whatever). Hide each marker from each side in the INIT.SQS file. Create the two players, and put in there Init field: P1 = this; [] exec "charmarkerP1.sqs" P2 = this; [] exec "charmarkerP2.sqs" In the sqs file(s): #start ?(!(Alive player)): goto "deadplayer" ~1 "P1M" setmarkerpos [(getpos player select 0),(getpos player select1)]; goto "start" #deadplayer ;the below time should be more than the time set for respawn in Description.sqs ~32 goto "start" This will not work if you have more than player on your side. It will work if you have 2 player game with one on each side. Thanks all for your combine info, it truely helped... Share this post Link to post Share on other sites
AustralianSpecialForces 0 Posted January 3, 2005 (F.Y.I. RTM = RealTime Marker) Activation Line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ["yourunit","yourmarker"] exec "RTM.sqs" In RTM.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = this select 0 _marker = this select 1 #Loop ~0.05 _marker setmarkerpos _unit goto "Loop" Nevermind it doesnt work... iNeos is currently the most efficent. Share this post Link to post Share on other sites
AustralianSpecialForces 0 Posted January 3, 2005 Oh Just checked the Topic dates....... Looks like i am a bit late Woops Share this post Link to post Share on other sites