Wotyhn 10 Posted May 7, 2014 Hey there. Im trying to set up a custom Zeus that has only access to specific units. Lets say he is only allowed to spawn and interact with Blufor Rifleman, Ammo Bearer and Squad Leader. To achieve this, bistudio names the "CuratorObjectRegistered" EventHandler with this example. myCurator addEventHandler [ "CuratorObjectRegistered", { _classes = _this select 1; _costs = []; { _cost = if (_x isKindOf "Man") then {[true,0.1]} else {[false,0]}; // Show only objects of type "Man", hide everything else _costs = _costs + [_cost]; } forEach _classes; // Go through all classes and assign cost for each of them _costs } ]; I found out, that _this select1; gives an array with the classnames of all objects in arma 3. _this select1 = ["FxWindGrass1","FxWindGrass2","FxWindRock1"...................] In return the EvenHandler needs an array with an entry for each classname defined by _costs. _costs = [[true,0.1], [true,0.5,0.6], [false,0,0]......] My problem: I need something like an if-then-else funktion with multiple if-then conditions. My example code aint working ofc but it shows how a working script could look like. myCurator addEventHandler [ "CuratorObjectRegistered", { _classes = _this select 1; _costs = []; { _cost = if (_x == "B_Soldier_F") then {[true,0.1]}, if (_x == "B_Soldier_A_F") then {[true,0.1]}, if (_x == "B_Soldier_TL_F") then {[true,0.3]} else {[false,0]}; // Show only objects Rifleman, Ammo Bearer and Squad Leader, hide everything else _costs = _costs + [_cost]; } forEach _classes; // Go through all classes and assign cost for each of them _costs } ]; Any hints, thought or whatever is welcome :D. Share this post Link to post Share on other sites
Wotyhn 10 Posted May 7, 2014 Made it myself :D finally this is what i came up with. As it is, the script gives the curator "myCurator" access to B_Soldier_F (rifleman) and B_Soldier_A_F (Ammo Bearer) with the costs of 0.1, 0.2. Any other object / unit is excluded. myCurator addEventHandler [ "CuratorObjectRegistered", { _classes = _this select 1; _costs = []; { _cost = switch (_x) do { case "B_Soldier_F" : { [true,0.1] }; case "B_Soldier_A_F": { [true,0.2] }; default { [false,0] }; }; _costs = _costs + [_cost]; } forEach _classes; // Go through all classes and assign cost for each of them _costs } ]; Share this post Link to post Share on other sites
Vaikless 0 Posted June 22, 2015 Hi, I did just reset my account Password -that i forgot- just to thank you for this.!!!! I was looking endlessly for a way for a template to add mod unit costs. This ist extreamly helpfull and a perfect solution for players who want to play team VS team. ty very much. too bad i didnt find this when google searching "arma 3 zeus addon mod ressource cost" would have saved me a lot of time. thx again:yay: Share this post Link to post Share on other sites
Mopsmaster 10 Posted June 29, 2015 (edited) help me guys please I have problem saving specific loadouts for a specific soldiers while editing missions with Zeus. I am editing their outfits and load in Zeus and then I am trying to save it. I am opening MCC then I press Save/Load then Save it to profile but when I load the profile my soldiers aren't looking the way I saved them to be, they have their standart load and outfits while I saved them otherwise. Can someone please help me with my issue? This is important... It seems I cannot find solution for this problem and it's probably because I don't know how to save their specific loads. I tried copying it to clipboard and loading it but it still didn't work. Even I pressed export copied it to clipboard and then loaded it. Maybe I am doing something wrong can someone please explain to me how to do it for it to load together when my mission starts! Help please Edited June 29, 2015 by Mopsmaster damn x Share this post Link to post Share on other sites