OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: greg147 on 01 Nov 2005, 18:51:36
-
Hi all,
I've been using the grouping a unit with different markers to get a random position for that unit, but I was wondering if there was a way to randomize the position of more than one unit so they will always be at the same place.
I'm trying to make a camp in the woods random, so I need a way to have tents, a fire and several units to be randomized together at a markers position.
Is there a way to do this?
Oh, and how do you make markers invisible? They're kind of a give away to the units posible positions on the map.
Thanks.
-
1. I understand you want to put a group to a random position and create also a camp around them? Maybe you could do it so that first you put the group into the random position - a little delay - then set all the stuff needed for the camp relative to the group's leader. Does that sound like it could work? Of course you should check all possible locations how all the stuff is actually layed on the landscape.
2.To make markers invisible set their type to "empty".
-
Thanks, never thought of that. I'll try it ;)
-
If the group leader is linked to the invisible markers and the group are set to "In formation", they will appear around him whereever he appears.
Baddo's suggestion for the camp will work fine. An alternative, which may be useful if the camp has to be different at each location because of the nature of the ground, is to create the camp at every location. A few seconds into the mission, figure out where the group is and delete all the other camps.
-
I'm trying out Baddos suggestion first, but I've run into a problem.
I've got as the begining of a script:
tent1 setpos[getpos sf1 select 0, getpos sf1 select 1, 0]
Where tent1 is the tent and sf1 is the groups leader.
How do I get the tent to appear, say for example, 3m to that guys left, instead of exactly where he is standing?
-
Hmmmm......something like:
tent1 setpos [(getpos sf1 select 0) +3, getpos sf1 select 1, 0]
Maybe ::)
Planck
-
Thanks, that worked 8)