OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Olle Stolpe on 23 Feb 2005, 17:59:38

Title: Put a vehicle at 1 of 10 random positions
Post by: Olle Stolpe on 23 Feb 2005, 17:59:38
Anyone have a good idea how to put a vehicle at 1 of 10 or more different locations.
I want to make a mission dynamic so that a Scud-car is positioned differently inside a town
every time you play the mission.


Thanks.
Title: Re:Put a vehicle at 1 of 10 random positions
Post by: Dubieman on 23 Feb 2005, 18:12:40
Put a marker at each of the positions and group the Scud to each. Or is it synch? I think its group it and it'll appear randomly at the spot of one of the markers. An old trick from the "Steal the Car" BIS mission. ;)
Title: Re:Put a vehicle at 1 of 10 random positions
Post by: Olle Stolpe on 23 Feb 2005, 18:20:18
I'll try it...
thx
Title: Re:Put a vehicle at 1 of 10 random positions
Post by: Olle Stolpe on 23 Feb 2005, 18:44:22
Works fine.. Put I would like to make it more precise.. Like change the Azimut on some positions.

Is there a way of putting like 5 scuds on the map and have the computer to pick out one to use
for the mission?
Title: Re:Put a vehicle at 1 of 10 random positions
Post by: ACF on 23 Feb 2005, 19:28:42
Have a look here for other ideas (I won't chide you for not searching because I just did and I couldn't find the bloody thread!)

http://www.ofpec.com/yabbse/index.php?board=22;action=display;threadid=21689 (http://www.ofpec.com/yabbse/index.php?board=22;action=display;threadid=21689)

It'll be a good little scripting exercise.

@GRK - never knew that trick though.

Title: Re:Put a vehicle at 1 of 10 random positions
Post by: Wadmann on 23 Feb 2005, 19:46:02
I am just thinking out loud here, but if you changed the azimuth of the marker could that change the direction that the Scud is facing?

Another thought would be to put a trigger at each place where the Scud could be located and if the Scud is present then set the direction of the Scud to the desired azimuth for that particular position using the "setdir" command.


                                                    Wadmann
Title: Re:Put a vehicle at 1 of 10 random positions
Post by: Dubieman on 24 Feb 2005, 00:18:28
I think Wadmann is right, change direction of marker to change scud direction. Sounds like something OFP would do. ;D
Title: Re:Put a vehicle at 1 of 10 random positions
Post by: macguba on 24 Feb 2005, 00:40:38
Changing the direction of the marker doesn't work for me.

Wadmann's second good idea, the trigger and setDir trick, would work fine.
Title: Re:Put a vehicle at 1 of 10 random positions
Post by: Olle Stolpe on 25 Feb 2005, 01:18:55
it did