Quagmire Posted December 17, 2011 Share Posted December 17, 2011 Hi guys Just playing with a scenario where civilian vehicles are fleeing a town. Thing is, I want to randomise their spawn into the game and at various times. So far I have Spawn If... 0 <== random variable X1 < 50 That is giving me a 50% chance of the spawn occurring which is OK but I would also like to randomise when they appear in a mission. I've played with the Mission>time box but that's still set at a specific time period. How do I add a random appearance time to the 50% chance of spawning? Plus (I know, a lot of questions), what exactly do I use at the top of the screen - a tick in left box before AND, or both? Cheers all, hope the above made sense to someone. :biggrin: Q PS, I've been reading through scenario design in the wiki but not sure I'm following it right. Perhaps because its late here, or maybe the alcohol has had an effect... 0 Quote Link to comment Share on other sites More sharing options...
DarkAngel Posted December 17, 2011 Share Posted December 17, 2011 You'll have to do it a long handed way.Set up a group of events or conditions like this:-0<= random variable X2 < 25 AND Mission time > 525<= random variable X2 < 50 AND Mission time > 1050<= random variable X2 < 75 AND Mission time > 1575<= random variable X2 < 100 AND Mission time > 20Now set up an event to capture the above:-{Event 1 is True} OR {Event 2 is True} OR {Event 3 is True} OR {Event 4 is True}Then for your Spawn if you do:-0 <== random variable X1 < 50 AND Event 5 is TrueNote I've done only 4 time divisions. If you want to do more then you will have to use 2 events to capture the time and random as you can only do 4 OR's in a single event. 0 Quote Link to comment Share on other sites More sharing options...
Quagmire Posted December 17, 2011 Author Share Posted December 17, 2011 Cheers DarkAngel, thanks for the quick reply! I'll give that a shot and see what happens. Given what I'm aiming for 4 divisions should be enough, especially with plenty of vehicles. Thanks again, Q 0 Quote Link to comment Share on other sites More sharing options...
Quagmire Posted December 17, 2011 Author Share Posted December 17, 2011 Hi DarkAngel, can I ask a favour? Would you mind taking a quick look at the attached Spawn Test scenario please? I followed your advice above and created 4 Blue Events named: Variable 1 Variable 2 etc. Each was set as you outlined. Finally I created a 5th - 'All Variables' that used the OR argument tying them all together. I've added 4 vehicles to the scenario and each has a spawn of: 0 <== random variable X1 < 50 AND Event - All Variables - True Each variable has a 10 second interval. Quite fast but good for testing. However, none of the vehicles appear. :confused: I've gone over it several times but not sure if I've missed something. Cheers! Q Spawn Test.zip 0 Quote Link to comment Share on other sites More sharing options...
DarkAngel Posted December 17, 2011 Share Posted December 17, 2011 The problem is in event 5 "all variables". You have set them to use AND's where as they should all be OR's. Variable 1,2,3 and 4 are mutual exclusive so the ands will never work. 0 Quote Link to comment Share on other sites More sharing options...
Quagmire Posted December 17, 2011 Author Share Posted December 17, 2011 The problem is in event 5 "all variables". You have set them to use AND's where as they should all be OR's. Variable 1,2,3 and 4 are mutual exclusive so the ands will never work.Cheers DarkAngel, don't know how I missed that!Thanks for looking. :thumbup:Q 0 Quote Link to comment Share on other sites More sharing options...
Quagmire Posted December 17, 2011 Author Share Posted December 17, 2011 (edited) Right, I'm having a blonde moment... I thought it was working now, but for some reason when it hits the :40 mark I get all or none of the vehicles appearing at the same time, instead of across the 40 seconds where there are 10-second intervals for the 4 Variable Events. I've attached this test scenario with the 4 OR arguments set, but can't see why it's showing an all-or-nothing outcome 50% of the time. :confused: Would you mind taking a quick peek at this please? Cheers, Q Spawn Test v2.zip Edited December 17, 2011 by Quagmire 0 Quote Link to comment Share on other sites More sharing options...
DarkAngel Posted December 17, 2011 Share Posted December 17, 2011 Well that is exactly what the logic is telling it to do. you are saying (50% spawn chance) when one of the timing Events is true. As each of the tanks has the same "spawn if" condition using X1 this is the expected behavior.If you want to set each tank to have a different spawn time then you will have to get more complex. 1. Four time division single event:-0<= X2 <25 OR ((25<=X2<50 AND Mission time > 5) OR (50<=X2<75 AND Mission time > 10) OR (75<=X2<100 AND Mission time >15))Set the "after true delay by" to be the time you want the spawning to start.2. Make one of those for each tank and use a different X number. Lets call them tank1,tank2,tank3 and tank4.3. On your tank set the "Spawn if" to Event tank(1,2,3 or 4) is true. 0 Quote Link to comment Share on other sites More sharing options...
Quagmire Posted December 19, 2011 Author Share Posted December 19, 2011 Thanks for the details DA. :thumbup: I've not had any time on SB today so I'll look into changing the scenario tomorrow with those figures. Cheers for the help! Q 0 Quote Link to comment Share on other sites More sharing options...
DarkAngel Posted December 20, 2011 Share Posted December 20, 2011 tried it yet?. 0 Quote Link to comment Share on other sites More sharing options...
Quagmire Posted December 24, 2011 Author Share Posted December 24, 2011 tried it yet?.I was planning to. I'm over with family now - visiting them for Christmas - but stupidly forgot to bring the dongle with me! :redface:Oh well, back home in a few days and I'll try it then.Have a Merry Christmas all!Cheers,Q 0 Quote Link to comment Share on other sites More sharing options...
Tacbat Posted December 24, 2011 Share Posted December 24, 2011 but stupidly forgot to bring the dongle with me! :redface: Rookie! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.