Randomising objectives
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING :: EDITING Q+A
Page 1 of 1
Randomising objectives
Is it possible to randomise objectives in the editor, I've been trying to do something that was suggested to me about a set of objectives that need to be done but you don't know what they are until you go in game and the info is made clear at that point.
here is what I have tried using the basic randomisation code.
Each objective is placed into a set in the objectives table above in onMissionStart(). In theory this should work, but unless I have something spelt wrong or the objectives are not able to be spawned in (I can't remember!) be great if someone can solve this.
Possible solution would be to make the objectives invisable, then get them randomly visable.
The plan is to have four locales on the map, once you start, you don't know what, where you have to go until one pops up in game after a timed delay. Once you get there, it could be a case of assault, defend, recon, destroy, etc etc.
Cheers
MD
here is what I have tried using the basic randomisation code.
- Code:
function onMissionStart()
objectives = {"objset1","objset2","objset3","objset4"}
obj_points = {"obj","obji1","obji2","obji3"}
EDX:simpleTimer("objtimer", 3000)
end
function objtimer()
local random_obj = math.random (1,#objectives)
local random_pts = math.random (1,#obj_points)
objspawn = OFP:spawnEntitySetAtEntityPosition(objectives[random_obj],obj_points[random_pts])
end
Each objective is placed into a set in the objectives table above in onMissionStart(). In theory this should work, but unless I have something spelt wrong or the objectives are not able to be spawned in (I can't remember!) be great if someone can solve this.
Possible solution would be to make the objectives invisable, then get them randomly visable.
The plan is to have four locales on the map, once you start, you don't know what, where you have to go until one pops up in game after a timed delay. Once you get there, it could be a case of assault, defend, recon, destroy, etc etc.
Cheers
MD
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING :: EDITING Q+A
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|