Jump to content

Mokey II

Member
  • Content Count

    19
  • Joined

  • Last visited

  • Medals

Community Reputation

5 Neutral

1 Follower

About Mokey II

  • Rank
    Private First Class

Profile Information

  • Gender
    Male

Contact Methods

  • Biography
    Just a hobbyist, dip my fingers into a bit of everything :)
  • Twitch.Tv
    MokeyII

Recent Profile Visitors

830 profile views
  1. Got it _missionParseSetupVars = call _setupVars;
  2. @gokitty1199 Yes, but I can't seem to get it past the function's scope.
  3. @GOKITTY199 It was actually working. Now if I can get the variable to pass outside of the function
  4. Hi all! So I'm trying to do a 'floor random [x,y,z];` for a mission I'm working on. However I can't seem to get it to work properly and return a whole number or any number at that. The portion I'm having an issue with. There's no documentation for selecting through a nested array with `random` that I can see. I need it to be random rather than selectRandom because I want the players to have a median rather than an extremely random number. I'm trying to call the money values. _moneyAmount = floor (random _moneyShipment [select 1, select 2, select 3]); I have also tried: _moneyAmount = floor (random [select 1, _moneyShipment select 2, _moneyShipment select 3]); and various other face smashing ways :) Can any1 assist me with this? The code: UPDATE: I was able to get _moneyAmount to return within the scope. but cannot outside of the scope.
  5. Thanks, got it working :) it was indeed passed elswere.
  6. Now that I'm really looking at it, it seems it's stuck at the waitUntil statement. It think this is due to A3W code. It can't find the last alive vehicle if it's already succeeded. (successExec), so how do find the last alive prior successExec? A3W Forums are down btw, hence why I am asking you :P
  7. I saw your post from a while ago, and couldn't get it to work properly. I guess I'm not understanding where or how to pass this exactly @Grumpy Old Man. It states there is an undefined variable for _vehicles. if called outside of the _successExec Scope. But it is clearly defined as the create vehicle array. If Called within the _successExec scope, it only creates 1 vehicle.and breaks the script. Script in my mission file: https://github.com/Fractured-Gaming-Official/Frac_v1.4.Stratis/blob/master/server/missions/mainMissions/mission_HostileHeliFormation.sqf Correction: It spawned all 3 chopppers, but it didn't continue with the crates: _successExec = { waitUntil {count (_vehicles select {alive _x}) isEqualTo 1}; _lastAlive = _vehicles select {alive _x} select 0; _numCratesToSpawn = 3; _i = 0; while {_i < _numCratesToSpawn} do { _vehicles spawn { params ["_lastAlive"]; _crate = createVehicle ["Box_East_Wps_F", (getPosATL _lastAlive) vectorAdd ([[_lastAlive call fn_vehSafeDistance, 0, 0], random 360] call BIS_fnc_rotateVector2D), [], 5, "None"]; _crate setDir random 360; _crate allowDamage false; waitUntil {!isNull _crate}; _crateParachute = createVehicle ["O_Parachute_02_F", (getPosATL _crate), [], 0, "CAN_COLLIDE" ]; _crateParachute allowDamage false; _crate attachTo [_crateParachute, [0,0,0]]; _crate call randomCrateLoadOut; waitUntil {getPosATL _crate select 2 < 5}; detach _crate; deleteVehicle _crateParachute; _smokeSignal = createVehicle ["SmokeShellRed", getPosATL _crate, [], 0, "CAN_COLLIDE" ]; _lightSignal = createVehicle ["Chemlight_red", getPosATL _crate, [], 0, "CAN_COLLIDE" ]; _smokeSignal attachTo [_crate, [0,0,0.2]]; _lightSignal attachTo [_crate, [0,1,0]]; _crate allowDamage true; }; _i = _i + 1; }; _successHintMessage = "The sky is clear again, the enemy patrol was taken out! Ammo crates have fallen out their chopper."; };
  8. So currently I am working on an A3W script for my server, I'm attempting to spawn crates to parachutes so the fall from the sky. I have the functionality working. But I can't seem to get it to spawn the crates on the last vehicle alive in the array. If a player kills the last chopper in the array it spawns the crate on the chopper defined. How do I pass multiple params and define the condition for the last chopper alive to spawn crates on? The successExex starts AFTER the last vehicle is destroyed. _vehicles = [ [_veh1, _missionPos vectorAdd ([[random 50, 0, 0], random 360] call BIS_fnc_rotateVector2D), 0] call _createVehicle, [_veh2, _missionPos vectorAdd ([[random 50, 0, 0], random 360] call BIS_fnc_rotateVector2D), 0] call _createVehicle, [_veh3, _missionPos vectorAdd ([[random 50, 0, 0], random 360] call BIS_fnc_rotateVector2D), 0] call _createVehicle ]; _successExec = { _numCratesToSpawn = 3; _i = 0; while {_i < _numCratesToSpawn} do { _vehicles spawn { params ["_veh1", "_veh2", "veh3"]; // HERE IS MY ISSUE, BUT CAN'T FIGURE OUT HOW TO CHECK CONDITION FOR LAST ALIVE VEHICLE _crate = createVehicle ["Box_East_Wps_F", (getPosATL _veh1) vectorAdd ([[_veh1 call fn_vehSafeDistance, 0, 0], random 360] call BIS_fnc_rotateVector2D), [], 5, "None"]; _crate setDir random 360; _crate allowDamage false; waitUntil {!isNull _crate}; _crateParachute = createVehicle ["O_Parachute_02_F", (getPosATL _crate), [], 0, "CAN_COLLIDE" ]; _crateParachute allowDamage false; _crate attachTo [_crateParachute, [0,0,0]]; _crate call randomCrateLoadOut; waitUntil {getPosATL _crate select 2 < 5}; detach _crate; deleteVehicle _crateParachute; _smokeSignal = createVehicle ["SmokeShellRed", getPosATL _crate, [], 0, "CAN_COLLIDE" ]; _lightSignal = createVehicle ["Chemlight_red", getPosATL _crate, [], 0, "CAN_COLLIDE" ]; _smokeSignal attachTo [_crate, [0,0,0.2]]; _lightSignal attachTo [_crate, [0,1,0]]; _crate allowDamage true; }; _i = _i + 1; }; _successHintMessage = "The sky is clear again, the enemy patrol was taken out! Ammo crates have fallen out their chopper."; };
  9. I'm trying to return all launchers to an array via script. My issue is, I can't seem to find any documentation on how to do so. I know you can pull everything from the missionconfigfile >> etc... Anyone know how to achieve this?
  10. Mokey II

    Toxic Gas Grenades

    This actually isn't a bad Idea... Thanks, will add.
  11. Currently I'm working on a teleportation Script. But my issue is when a player selects to use the object to teleport it keeps duplicating actions and will not remove. How do I remove all actions if the object isn't being looked at OR an option is selected? Is there another way to have a sub menu rather than callign another sqf/function?? teleporterMainAction.sqf _teleporterArray = [teleporterAirfield, teleporterAirfieldRunway]; { _x addAction ["<t color='#FF0000'>USE TELEPORTER</t>", "client\teleporter\teleporterSubActions.sqf"]; } forEach _teleporterArray; removeAllActions player; teleporterSubActions.sqf _x = player; _x addAction ["<t color='#FF0000'>Teleport To Airport Terminal</t>", {hint "Terminal Working" _this select 0 removeAllActions};]; _x addAction ["<t color='#FF0000'>Teleport To Airport Runway</t>", {hint "Runway Working"} _this select 0 removeAllActions};]; _x addAction ["<t color='#FF0000'>Teleport To Militart Base</t>", {hint "Military Base Working" _this select 0 removeAllActions};];
  12. Taking inspiration Tear Gas Scripts, I decided to make a script a while back to blur vision and deal damage over time. I've used it in my wasteland Server for over 2 years and many other servers are using it too. ONLY WORKS ON PLAYERS! AI ARE NOT EFFECTED BY THE GAS! However, AI can still throw the toxic gas grenades Directions: Code: init.sqf Toxic Gas Grenades (Thrown): Github: HERE Download: HERE
  13. Mokey II

    player removeWeapon _x

    Working, it'd help if I didn't have the only weapon I had in a different array :)
  14. Currently I'm trying to remove weapons that are equipped that are not in a white list defined by an array. after looking up on the wiki, I assumed it would work. Where is my issue? _whiteListedPrimary = _availableRifles + _availableSnipers + _availableLmgs + _availableSmgs; _primaryWeapons = (primaryWeapon player); { if !(primaryWeapon player in _whiteListedPrimary) Then { player removeWeapon (_x player); }; } forEach _primaryWeapons;
  15. Mokey II

    Can't use #include?

    Ahhh. Thanks, makes sense. Yeah, I'm working on a new template so everything is fresh and only using that line of code for testing. Was going to add Private later. Thanks! Works great @NeoArmageddon
×