Matthijs 40 Posted April 3, 2002 I wrote a script that keeps track of the user defined markers. My brother found out that placing markers in the editor caused my script to fail. Here is what happens In OFP, the code for reading a user defined marker, the code looks like this: getmarkerpos "_USER_DEFINED #0/0" Â Â (for 1st marker) getmarkerpos "_USER_DEFINED #0/1" Â Â (for 2nd marker) getmarkerpos "_USER_DEFINED #0/2" Â Â (for 3rd marker) (etc. etc.) The problem is that OFP increases this count, for every marker placed in the mission using the mission editor. So, if you place 2 markers in the editor for example, the code changes to: getmarkerpos "_USER_DEFINED #0/0" Â Â (empty) getmarkerpos "_USER_DEFINED #0/1" Â Â (empty) getmarkerpos "_USER_DEFINED #0/2" Â Â (for 1st marker) (etc. etc.) The workaround is simple but not very elegant: Let the mission creator place the number of markers in a value in the init.sqs, so your scripts can access this variable and take it into account. I thought this could be usefull to my fellow mission-makers. Share this post Link to post Share on other sites
Spinor 0 Posted April 3, 2002 Another workaround would be at mission start to constantly (in a loop) check the position of say the first 50 markers; As soon as one of these is nonzero, you know the player has placed a marker and you have its index. Now you can normally track the placement of usermarkers. Share this post Link to post Share on other sites