Jump to content

fight9

Member
  • Content Count

    382
  • Joined

  • Last visited

  • Medals

Community Reputation

13 Good

1 Follower

About fight9

  • Rank
    Staff Sergeant

Recent Profile Visitors

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

  1. fight9

    Arma 3 Dialogs help

    Errors in the description.ext (including your dialog) will cause the game to crash. It should tell you the line and error in the message. But, as said above, can't do much without seeing your code.
  2. fight9

    Scripting Etiquette?

    You can write your code anyway you want. If you don't want to capitalize, comment, or space things... Then don't. Name your folders, files, and functions anyway you like, as well. It's all up to the scripters or users preference. I will advise to keep things neat and commented. Makes it much easier to read and understand later on. Especially when you start writing super complicated scripts over hundreds of lines. I think neat code is 100x more useful then the negligible about of time gaine on preprocessing.
  3. The bino slot (rangefinder included) is the wildcard in there. You have to use addWeapon and assignItem for it. Kind of annoying. This is how I tested for it in the past when adding assigned items back to the player. _items = assignedItems player; { if (([(configFile >> "CfgWeapons" >> _x),"optics",0] call BIS_fnc_returnConfigEntry) > 0) then { player addWeapon _x; player assignItem _x; } else { player linkItem _x; }; } forEach _items; Larrows configClasses code will do that.
  4. fight9

    Start vehicle "wrecked"?

    http://killzonekid.com/arma-scripting-tutorials-how-to-make-a-wreck/ dont know about the crater
  5. I like to use BIS_fnc_objectVar instead of setVehicleVarName (it does it for you). It has always worked for me when I require vehicles to have a name. It can accept a pre-made name or create one for you. It will then return that name in string format. Use call compile or getVar to access that vehicle. let function assign a name: _varName = _object call BIS_fnc_objectVar; _vic = call compile _varName; or assign the name yourself _varName = [_object,"TheName"] call BIS_fnc_objectVar; _vic = missionNamespace getVariable _varName;
  6. (group [color="#B22222"]_group1[/color]) setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false]; Thats what the error message says is wrong anyways.
  7. It's probably easier to just always have both actions but broadcast a condition variable rather than running the addAction each time.
  8. fight9

    FSM Tutorial

    Damn, where was this a coulple weeks ago when I was learning FSMs. It's nice to see some new information... Everything out there is from OFP days. I won't be able to see it until I get home from work later... But hopefully you speak about selecting a compiler... That's one thing I had to figure out on my own. FSMs are my new go-to for endless-loop style scripts with conditions. It's super easy to write with that visual representation. Thanks for the share. Hopefully you can teach me something new.
  9. fight9

    Separating Strings

    Ah... Length of selection, not index position to finish. Good catch, I guess.
  10. fight9

    Separating Strings

    sure, I hope this helps _fnc_cutString = { private "_i"; // the string will be _this, no need for (_string = _this select 0) or similar _i = _this find " "; // find will return the index position of " ", -1 if not found if (_i < 0) exitWith {[_this,""]}; // if -1 (not found), exit fuction with the array [ string, "" ] [_this select [0,_i],_this select [_i + 1,count _this]] // end the function with array of two strings // select command can be used to cut string ( string select [start,length] ) // [ string select [0(beginning),index(position of space)] , string selct [index + 1(1 after space), end(total string count)] ] }; I'm trying to write a function to cut a string at all the spaces but havent figured it out yet ---------- Post added at 19:34 ---------- Previous post was at 19:30 ---------- BIS already has a function that can do this. You dont even need what I have above _return = ["my new string"," "] call BIS_fnc_splitString; // returns ["my","new","string"]
  11. fight9

    Separating Strings

    Pretty easy _fnc_cutString = { private "_i"; _i = _this find " "; if (_i < 0) exitWith {[_this,""]}; [_this select [0,_i],_this select [_i + 1,count _this]] }; "my string" call _fnc_cutString; // returns: ["my","string"]
  12. This was something I wrote quickly to see how mass is configured through different CfgWeapon Items. I thought I would share in case some one else was interested. Hopefully this can help someone else down the line - maybe not with mass, but sorting configs in general. Just spawn or execVM the code Export example: Code:
  13. You are gonna have to restart the game over and over again. Its the nature of the beast. Missions you can drop into your missions folder and just reload, mods that change or add things will require a restart. There will be nights that you restart the game well over a hundred times. Its a bitch...
  14. I thought it restarted the server by I am probably wrong.
×