Meowzors Posted April 24, 2014 Report Share Posted April 24, 2014 All of the missions use skill level 0 and skill level 1. I was thinking of making a new mission in which the AI are skill level 2 and have the possibility of finding an item ON the ai. However, currently it seems that DZMS just randomly picks from a set of gear no matter what skill level (I am talking about the magazines\tools NOT weapons). How would we go about changing this to set gear by skill level... I tried this but now they have NO gear... switch (_skill) do { case 0: {_aigearArray = [DZMSGear1,DZMSGear2]; }; case 1: {_aigearArray = [DZMSGear1,DZMSGear2];}; case 2: {_aigearArray = [DZMSGear2,DZMSGear3];}; }; _aigear = _aigearArray call BIS_fnc_selectRandom; _gearmagazines = _aigear select 0; _geartools = _aigear select 1; if they have skill 0 this should choose arrays 1 & 2. skill 1 should choose 1 & 2. And my new harder mission at skill 2 should use gear set 2 and sometimes the nicer loot set of 3. But instead they get nothing but weapons, ammo, backpack :-/ Link to comment Share on other sites More sharing options...
TheVampire Posted April 27, 2014 Report Share Posted April 27, 2014 Make this code: //Get the gear array _aigearArray = [DZMSGear0,DZMSGear1,DZMSGear2,DZMSGear3,DZMSGear4]; _aigear = _aigearArray call BIS_fnc_selectRandom; _gearmagazines = _aigear select 0; _geartools = _aigear select 1; change to this: //Get the gear array switch (_skill) do { case 0: {_aigear = DZMSGear0;}; case 1: {_aigear = DZMSGear1;}; case 2: {_aigear = DZMSGear2;}; case 3: {_aigear = DZMSGear3;}; case 4: {_aigear = DZMSGear4;}; }; _gearmagazines = _aigear select 0; _geartools = _aigear select 1; Link to comment Share on other sites More sharing options...
Meowzors Posted April 27, 2014 Author Report Share Posted April 27, 2014 Doesn't the skill level only go 0,1, or 2 though? So case 3 and 4 would never happen. Was trying to leave some randomness to the gear also by leaving each skill level with a couple gear sets to choose from. I can't figure out y my code didn't work can u not create an array inside a switch statement? Or is it that the bis_selectRandom requires more than just the two options I was supplying it with? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now