OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: TERA_Forrest on 30 May 2005, 11:07:05

Title: Random position and placing marker
Post by: TERA_Forrest on 30 May 2005, 11:07:05
What I'm trying to do is have three different places that a hostage and his killers could be placed randomly.  When the player gets intel via "addaction" then a marker will be placed on the spot that the hostage is at.  How can I do this?
Title: Re:Random position and placing marker
Post by: macguba on 30 May 2005, 11:11:44
Create a marker at two locations and place the hostage at the third.   Make them type empty so that they are invisible.     Group (or is it Synchro?) the markers to the hostage, who will appear randomly at either his start position or one of the markers.

Create your little camp and guards anywhere.  Use setPos commands (relative to the hostage) to make them appear where the the hostage is.

When the marker is to appear on the map, setPos one of the markers  you have already used to the hostage's location and use setMarker commands to make it appear as you want.    (Set the text in the mission editor, it's invisible at the start so nobody can see it.)
Title: Re:Random position and placing marker
Post by: voodzia on 30 May 2005, 13:44:52
Quote
Group (or is it Synchro?) the markers to the hostage, who will appear randomly at either his start position or one of the markers.
It's group ;) and it works great.
Title: Re:Random position and placing marker
Post by: CrashnBurn on 30 May 2005, 15:29:07
For anyone who has not grouped a marker to a unit: When you click the group button the markers disappear from view. It may be easiest to place the unit and marker next to each other, group them, then move them into position on the map. Otherwise you'll have to hunt for the invisible marker. Not hard to do on a mission in early stages of development, but things can get very crowded at later stages.
Title: Re:Random position and placing marker
Post by: 456820 on 30 May 2005, 15:49:00
what i do is put marker wherever you want it and the same with the unit and then press f6 so you can see the markers and put the cursorover it then press f2 and drag the line to the unit becuase you had the cursor in the right place it should still be
Title: Re:Random position and placing marker
Post by: TERA_Forrest on 30 May 2005, 20:22:22
works great, thanks ;)