FoamysWorld Posted February 7, 2014 Report Share Posted February 7, 2014 FMission Launcher 1.0 This script adds scalable random selection for launching missions from the modules folder. This script can be modified to launch anything from anywhere but I wrote it for launching my custom missions. Currently when launching missions from the modules folder you use an entry like this: EpochEvents = [["any","any","any","any",35,"mission.sqf"]]; What that gives you is predictable mission launches, not to mention when you run a bunch of missions that time setup gets full and dicey. Using this script means 2 - 3 entries at most for unlimited missions, depending on how many times an hour you want to run the chance to spawn one. I personally run the sequence twice an hour. To use, put this script in your modules folder FMission_Launcher.sql /* File Name: FMission_Launcher.sqf File Created: 12/25/2013 File Version: 1.0 File Author: Foamy File Last Edit Date: 2/2/2014 File Description: Foamy Missions Launcher Variables to set: _eventspawnChance = xx; <--- is the % chance it will spawn (example: .50 = 50%) */ private ["_spawnRoll", "_eventSpawnChance", "_scriptselected", "_scriptslist"]; _eventSpawnChance = 1; _spawnRoll = random 1; diag_log("Checking Spawn Chance"); if (_spawnRoll < _eventSpawnChance and !_debug) exitWith {}; diag_log("Spawn Chance Success"); diag_log("Selecting script and launching"); _scriptslist = ["mission_file_name.sqf","mission_file_name.sqf"]; _scriptselected = _scriptslist select (floor(random(count _scriptslist))); [] execVM _scriptselected; (Put your mission file names in the spots in the file that say mission_file_name.sqf) Then to launch FMission_Launcher.sqf you add it to your init.sqf in this spot. EpochEvents = [["any","any","any","any",35,"FMssion_Launcher.sqf"]]; Add an entry for each time you want it to run. Easy script but I found it very useful so why not share. Enjoy. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted February 7, 2014 Report Share Posted February 7, 2014 Very cool. I think the dev team should add this as default. Much better way to do it. Link to comment Share on other sites More sharing options...
thekaboobie Posted February 7, 2014 Report Share Posted February 7, 2014 Agreed this is much better. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now