Jump to content

Search the Community

Showing results for tags 'params'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Server tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Chernarus
  • TKO's Livonia
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 7 results

  1. I'm going to learn how to use params in order to make future scripts more effective and you might learn something about params, too (please use the debug console if you want to follow along). A simple example, fnc_learnThis= { params ["_caller","_some","_thing","_luck"]; if (_luck>0) exitWith { systemChat format ["%1", _caller]; systemChat format ["%1 %2", _some, _thing]; }; }; With some luck this call will prompt the functions to run with the parameters set, [player, "is", "cool",1] call fnc_learnThis; The next example shows how to select from an array and sub-array. We can create some helpers and make the orb jump between them. Make three sets so the result isn't binary. Create the array of helpers from named objects like this, Enter the function, and call the function with, [orb, 0] call you_fnc_help; The orb should continue to go around between the three helpers each time you enter the call. To change to the next helper group, [orb, 1] call you_fnc_help; More examples continue throughout the discussion below, Have fun!
  2. Hello guys! Not long ago I had posted a topic with a problem in my loadout. I have tried long ago to fix it, but I forgot all of the scripting I have learned so there wasn't much to do... Unit today I had tried again as I am currently in a vacation from my military services (got injured). Well, I figured out that the loadout script and everything is ok, but the problem is much more small than I thought it is. I am using Mission Parameters to choose between Night or Day loadout, Add or Remove NVG according to mission time, as well as Silencer and Map Nav Aids. As the updates started to come the code was outdated, But I have tried couple of time to fix it with no luck.. If someone done it or Know how to fix it, Please reply here, As I want to regroup my old friends to start play again in this awesome MilSim. Loadout Description RPT Log fn_processParamsArray Huge Thanks Guys!!!
  3. Hi. I want to write a small function, spawning a soldier at a marker (just an understanding thing, I know it's way more easy to do this in a different way). params [ ["_class","",[""]], ["_wp","",[""]] ]; _posStart = getMarkerPos _wp; _grp01 = createGroup east; _unit01 = _grp01 createUnit [_class, _posStart, [], 0, "CAN COLLIDE"]; It's working, when called with _spawnUnit = ["O_G_Soldier_F","marker1"] call TACP_fnc_Test_spawnSoldier; Given class is spawning at the marker. But I always got the failure message "'call{_spawnUnit |#|= ["O_G_Soldier_F","marker1"] call TACP_fnc..." Error Generic error in expression." What am I doing wrong? *confused*
  4. Hey there! I've begun learning SQF scripting around a week ago, so still quite the newbie. I've been reading through the Fockers tutorial series (which I have yet to finish), and decided to try and get some practical experience making something, since that's the best way I learn code. My friend, who makes missions and does zeus stuff, suggested I make a patrol script. I liked the idea, and went along with trying to make a patrol script callable by execVM, accepting the calling unit and an array of Markers as parameters. The script works by sending the entire group to those markers assuming the group still exists and there's at least one unit alive in it. If the marker they are about to head to does not exist, the marker is deleted from the array and the loop starts from the beginning until a valid marker exists. Irrelevant at this point as I can't test to make sure that actually works, since I can't seem to get an object param passed to the file. It looks like it only accepts arrays, which I am having trouble understanding. So I need to solve this one of two ways: I need to find a way to pass an object as a parameter and keep it intact when it reaches the function. Or, I need to find a way to take the array sent as the unit, and turn it back in to the object, which I don't know how to do. This script is meant to be multiplayer friendly (despite me not having the slightest clue of how to code it for multiplayer) so please keep that in mind with the solution. My goal is not to just come to a solution to fix my issue, but to understand why it works, since I'm trying to learn SQF and understanding what the code is doing and why will help me advance in that goal. I appreciate the help and can try to give as much information as I can when asked. This is in the team leader's init box: patrolArray = [patrolMarker1, patrolMarker2, patrolMarker3]; PatrolScriptHandle = [this, patrolArray] execVM "Patrol.sqf"; This is the Patrol.sqf: // Patrol.sqf // Parameters: // 0: (Object) Unit // 1: (Array) Markers params ["_unitObject", "_markerArray"]; debugPatrolRunning = True; // Use this only for debug purposes to see if the script is still running. _unitMarkerPatrolArray = _this select 1; _patrolArrayCount = (count _unitMarkerPatrolArray) - 1; _unitGroup = group _this select 0; _shouldRun = True; while (_shouldRun) do { scopeName "patrolCheck"; sleep 0.1; for "_i" from 0 to _patrolArrayCount do { _unitsAlive = {alive _x} count units _unitGroup; _curMarkerSelection = _unitMarkerPatrolArray select _i; if ( isNull _curMarkerSelection ) then { _tempA = [_curMarkerSelection]; _unitMarkerPatrolArray = _unitMarkerPatrolArray - _tempA; _tempA = nil; breakTo "patrolCheck"; }; if ( _unitsAlive >= 1 && {!isNull _unitGroup} ) then { // I don't think I can use the Marker object itself in getMarkerPos, so let's convert it to string first. _curMarker = format ["%1", _curMarkerSelection]; _unitGroup move getMarkerPos _curMarker; sleep random [3, 5, 10]; } else { _shouldRun = False; debugPatrolRunning = False; breakOut "patrolCheck"; }; }; };
  5. I have params defined like this: params ["_object", ["_code", {}]]; Question: how to check if there is some code? if !(_code isEqualTo "") then { _object spawn _code; };
  6. I am very familiar with programming and I have been experimenting how ARMA passes variables to functions. I think I understand how params and param work, but I am having difficulty calling a function to return a desired result. This below code is simply trying to call on a function that requires the input of a group, in this instance, I am sending it "group player" with the call function. From what I understand, the function returns the last line, so the count should return the number of men in the group. However, it sends an error stating that it is expecting a number, but is getting type string. This is confusing because I am sending it Group Player, an array of men to be counted. Just writing a count out with "_num = count units group player" works without a hitch. So why is it I am unable to pass it the _grp parameter? getGrpCount = { param ["_grp"]; count units _grp; }; _num = [group player] call getGrpCount; hint format ["%1",_num]; no workie _num = count units group player; hint format ["%1",_num]; works Existing user? Sign In
  7. ok so basically I'm editing some code of load outs, and as I am told call Bis_fnc_Param (is no good). and private []; "should be" params []; but as I do so, (change code) I see no difference. old Private ["_unit","_PERIdent","_Randomise","_role","_Uniforms","_Voice","_Uniform","_Headgear","_Goggles"]; _unit=[_this,0,objNull,[ObjNull]] call Bis_fnc_Param; _PERIdent=[_this,1,true,[true]] call Bis_fnc_Param; _Randomise=[_this,2,true,[true]] call Bis_fnc_Param; _role=typeOf _unit; new params ["_unit","_GBIdent","_Randomise","_role","_Uniform","_Uniforms","_Voice","_Headgear","_Goggles"]; _unit = param [0]; _GBIdent = param [1]; _Randomise = param [1]; _role = typeOf _unit; why is the reason of using params to private, or the reason to need to change and not use call Bis_fnc_Param ? I don't see the optimization. I'm Only asking so ill have a better understanding wiki explains params ["_one","_two","three"]; blah blah blah [1,2,3]; better yet I wish people posting in wiki would sometimes remember that no everybody understands and maybe should post some working code as an example kinda like what I posted above (but with the rest of the code).
×