Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Wotyhn

Member
  • Content Count

    4
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

10 Good

About Wotyhn

  • Rank
    Rookie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Wotyhn

    custom Zeus "loadout"

    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 } ];
  2. 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.
  3. Wotyhn

    Custom Base Compositions

    Thx i think i found the part i need but im not able to use it like i want atm :D I tried to use the "CuratorObjectRegistered" Eventhandler and it works fine with the example given in the wiki. However i am quite new to scripting and i can't figure out how to change it to my needs. curator addEventHandler [ "CuratorObjectRegistered", {_classes = _this select 1; _costs = []; { _cost = if _x {"B_Soldier_F", "B_helicrew_F"} then {[true,0.1], [false,0]}; _costs = _costs + [_cost]; } forEach _classes; _costs} ]; This is what i came up with. Not working but it should be somewhere close to what i need. A simple if-then funktion for multiple objects where i can define the costs and if they are available or not to the Zeus game-master. Jan
  4. Wotyhn

    Custom Base Compositions

    Hey did you find any solution yet? Im trying to give my zeus a custom loadout but without giving access to complete classes but only to specific units.
×