OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 26 Jul 2005, 12:12:09

Title: random spawning
Post by: 456820 on 26 Jul 2005, 12:12:09
okay ive got a mission where several different things can happen as you advance through a small valey type bit
anyway you encouter patrols definate i can make that random but with the out post wich has a small percent of being there i cant make random becuase all of the tents and things must be the same distance apart from one another so i basically want the camp to spawn in 3 different places but all relative so a tents not 20 metres over one direction whilst the mg nest is 40 metres over to the other side

you might not understand but thats the best description i can think
Title: Re:random spawning
Post by: Hawkins on 26 Jul 2005, 12:42:00
From what I understood, you want to spawn a camp randomly at one location out of three? There's a few ways of doing this, some are:

Build three camps, name all the objects, and delete the ones you don't need after you've selected the camp location.

Using the camera.sqs, take location coordinates of buildings and tents for all three camps, then setpos the stuff at the camps. You can setdir the stuff to face the right direction.

Make three gamelogics at the center location of the camp and setpos/camcreate the objects around the gamelogic and then setdir them. Personally, I wouldn't use this option.

Just a few, there's more I'm sure. I would love to make an example mission, but I'm at work ATM so that's impossible. I don't think my boss would be happy if he saw OFP on this computer. ::)
Title: Re:random spawning
Post by: 456820 on 26 Jul 2005, 13:13:18
thanks for the ideas ill have a go with the first one seems less hastle free
Title: Re:random spawning
Post by: 456820 on 27 Jul 2005, 15:58:35
option 1 is fine worked great
thanks alot
topic solved