OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: NightJay0044 on 28 Jul 2004, 00:53:17
-
All right. I have a mission where i need to have the enemy start at 4 different positions each time you reply the mission.
I have 3 enemy snipers all with names, that need to start at 4 different positions. I assume you can use Game logic some how. Not sure how to. If anybody could help me out that woudl be great. thanks.
-
If you want a unit to start at one of several starting positions, chosen randomly, the easiest way is to place the unit at one location and put markers at the others. Group (or is it synchro? a thin blue line anyway) the markers to the unit. Remember to make the markers invisible in your init.sqs
"marker1" setMarkerType "empty"
Syntax and details nnot guaranted but that's the principle. If you want a whole group to start in a random place just do this for the leader and put the others in formation.
-
Hmm.. this might answer, but if you need them to start at different positions, you may want to check the placement radius option....
However, If the positions are fixed, you may want to teleport them to any of the positions with a random function at init. ^^ (providing that you know the positions, use an invisiblemarker)
Wow, I did not see McGuba post :) He gotta group em with markers... and yes, it works like a charm, I just tried it (after making the random script on my own lol, which works too)
-
Macguba's solution works wonders....group the men to the empty markers and they'll start at the locations.
Just set the marker type to empty when you place them; that removes the need to do it in the init.sqs file.
You could also script it out the long way using an sqs file and game logics (generate random numbers and use if-then conditions to place the unit according to what value range you get), but it's far easier to do it with the empty markers.
-
I got that yonks ago from "Steal the car". Just shows the value of unpboing BIS missions to learn from them.