Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Community Reputation

11 Good

2 Followers

About twirly

  • Rank
    Master Gunnery Sergeant

core_pfieldgroups_3

  • Interests
    Firearms, surfing, photography, computers, programming and electronics.

Recent Profile Visitors

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

  1. Keep up the good work Samael.... excellent! Great stuff Myke!
  2. Not sure exactly what you are trying to do.... but deleteVehicle is used to delete objects.
  3. It works perfectly.... how are you doing your testing?. You are probably getting an error because you are testing in the editor. Paramsarray does not work in Single Player. Save it as a multiplayer mission and test in COOP. It will work. Demo .pbo here. Put it in your MPMissions folder and start a COOP game with it.
  4. I placed a marker, a trigger and a unit with this in his init.. groupalpha = group this; and used that line in the trigger and everything worked fine. Check everything again... it's something simple.
  5. Try leaving out the quotes in the titles lines... so... titles[] = {};
  6. Read this thread man..... http://forums.bistudio.com/showthread.php?142833
  7. Look at the lines directly above the error and make sure there's nothing wrong there.
  8. What's the error? It looks OK....don't see anything wrong really. Maybe brackets around paramsArray select 0 but don't think it's necessary. But if all else fails... try everything you didn't try! Just to check... the Class params statements needs to be in your description.ext... and put the setDate in your init.sqf
  9. That looks like lines from the mission .sqm! Don't mess with that file.... there is rarely a need to ever open it. Read up on this command... http://community.bistudio.com/wiki/setVehicleInit ...or better yet read Mr Murrays Editing Guide and learn the basics.
  10. Also... check out... playableunits (for multiplayer) switchableunits (for singleplayer) I've been using something like this that works in both SP and MP. _controllableAI = []; _controllableAI = [] call { _array = []; if (isMultiplayer) then { _array = playableunits; } else { _array = switchableunits; }; _array }; //more code here for whatever... //blah... //blah... //blah... if (_unit in _controllableAI) then { hint format ["%1 is playable",_unit]; } else { hint format ["%1 is not playable",_unit]; };
  11. No worries man... I had a little error with the _heloTroop1 variable... calling it _helogroup in one line! It's been fixed.
  12. Try it like this....no need for setvehiclevarname! ... also don't use "_x" in a for statement it's reserved for the foreach statement. Use "_i", "_j", "_k" etc. instead (standard programming practice). //create the helo _testHelo1 = [getMarkerPos "mrk_WPtest0", 10, "LIN_UH1", west] call bis_fnc_spawnvehicle; Helo98 = _testHelo1 select 0; //move each group member into Helo for "_i" from 0 to (count units _heloTroop1)-1 do { _unit = (units _heloTroop1) select _i; _unit assignasCargo Helo98; _unit moveInCargo Helo98; sleep 0.2; }; ... another way of moving in the troops using foreach... {_x assignascargo Helo98; _x moveincargo Helo98} foreach units _heloTroop1;
  13. twirly

    SQF Encryptor

    Blah.... bad idea! No point.
  14. Something like this using "weighted arrays".... the last number in the array is the actual weight. _rifles = [ ["MR43","2Rnd_shotgun_74Slug",0.01], ["Winchester1866","15Rnd_W1866_Slug",0.01], ["LeeEnfield","10x_303",0.01], ["huntingrifle","5x_22_LR_17_HMR",0.05], ["FN_FAL","20Rnd_762x51_FNFAL",0.10] ]; Then.... _weighted = []; //rifles for "_i" from 0 to (count _rifles)-1 do { _weight = (_rifles select _i) select 2; _weight = round(_weight * 100); for "_j" from 0 to (_weight - 1) do { _weighted set [count _weights,_j]; }; sleep 0.003; }; _randrec = _weighted select floor (random (count _weighted)); _rifle = (_rifles select _randrec) select 0; _ammo = (_rifles select _randrec) select 1; This is similar to how it's done in DayZ...except there it's a function. Here it's part of the script. It creates huge arrays of numbers....but works. I have a better way.... just haven't written the code as yet.
×