Jump to content

fight9

Member
  • Content Count

    382
  • Joined

  • Last visited

  • Medals

Everything posted by fight9

  1. Remove the "_Rebelcamp1 =". I think that's the problem.
  2. I may be confused about what you want... but this may be it. [color="#FF8040"][color="#191970"][b]while[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_result[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] fnc_IsAtBase[color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]![/b][/color][color="#1874CD"]_result[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#000000"]true[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// for the scope[/i][/color] [color="#1874CD"]_damage[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]damage[/b][/color] [color="#191970"][b]vehicle[/b][/color] [color="#000000"]player[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_damage[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// exit scope with action[/i][/color] [color="#191970"][b]vehicle[/b][/color] [color="#000000"]player[/color] [color="#191970"][b]setDamage[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_damage[/color] [color="#8B3E2F"][b]-[/b][/color] [color="#FF0000"]0.1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_fuel[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]fuel[/b][/color] [color="#191970"][b]vehicle[/b][/color] [color="#000000"]player[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_fuel[/color] [color="#8B3E2F"][b]<[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// exit scope with action[/i][/color] [color="#191970"][b]vehicle[/b][/color] [color="#000000"]player[/color] [color="#191970"][b]setFuel[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_fuel[/color] [color="#8B3E2F"][b]+[/b][/color] [color="#FF0000"]0.1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// And more threads for ammo, color, and custom scripts[/i][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// slow down loop[/i][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter EDIT: _damage & _fuel need to be defined before their if statements.
  3. That means that _officer1 is not defined. If you have a unit in the editor named "officer1" then remove the underscore in the script. Else, define the variable before using it.
  4. // compile the function fil_fnc_suppressorCheck = compile preprocessFileLineNumbers "fil_scripts\suppressorCheck.sqf"; // add EH player addEventHandler["fired", {if !(this call fil_fnc_suppressorCheck) then {hint "Unsuppressed shot detected"}}]; or // place the code right in the EH player addEventHandler["fired",{ _weaponFired = _this select 1; _weaponItems = weaponsItems player; _suppressor = false; { if ((_weaponFired == _x select 0) && !((_x select 1) == "")) then { _suppressor = true; }; } forEach _weaponItems; if !(_suppressor) then {hint "Unsuppressed shot detected"}; }]; dont // will recompile on every shot... no need for that player addEventHandler["fired", {if !(this call compile preprocessFile "fil_scripts\suppressorCheck.sqf") then {hint "Unsuppressed shot detected"}}];
  5. The modules work by calling a function. Any of the options set in the editor module window is saved to the module via setVariable. I dont know any of the CSE module/functions but it would work something like this. [color="#FF8040"][color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isClass[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]configFile[/b][/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"CfgPatches"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"CSE_CONFIG_NAME"[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_grp"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_pos"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_logic"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_fnc"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_grp[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createGroup[/b][/color] [color="#000000"]west[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// group for logic/module[/i][/color] [color="#000000"]_pos[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// position for logic/module[/i][/color] [color="#1874CD"]_logic[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#1874CD"]_grp[/color] [color="#191970"][b]createUnit[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Logic"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]_pos[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"NONE"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// "Logic" or "Logic_F" - cant remember[/i][/color] [color="#1874CD"]_logic[/color] [color="#191970"][b]setVariable[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"CSE_FUCTION_SOMEVARIABLE"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// set variables[/i][/color] [color="#1874CD"]_logic[/color] [color="#191970"][b]setVariable[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"CSE_FUCTION_SOMEVARIABLE"[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]2[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_logic[/color] [color="#191970"][b]setVariable[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"CSE_FUCTION_SOMEVARIABLE"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]west[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_fnc[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_logic[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] CSE_fnc_SomeModuleFunction[color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// call module function[/i][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter
  6. The easiest way I know of is with BIS_fnc_spawnObjects. Or download that template and see how that guy did it.
  7. fight9

    GUI editor problem

    Come back later tonight... I'll post the defines I use when I get off work. ---------- Post added at 00:25 ---------- Previous post was at 22:32 ---------- Here is what I have to my GUI_GRID_x defines. Just put them with your other basic definitions. #define GUI_GRID_X (0) #define GUI_GRID_Y (0) #define GUI_GRID_W (0.025) #define GUI_GRID_H (0.04) #define GUI_GRID_WAbs (1) #define GUI_GRID_HAbs (1)
  8. fight9

    GUI editor problem

    You have to define the GUI_ variables at the top. I'm not at my computer to give the exact value but start with 0 and move from there
  9. What you have there is a local variable. Having the underscore at the beginning of "_CSAT_Group_01" means that it does not exist outside of the script its defined in. Try using "CSAT_Group_01" instead.
  10. You have to check for locality. If the unit is local, run the script... What is happening, is those init boxes are being run once again on the JIPs machine when they enter the game. if (local this) then { // run scripts. }; or if (local _this) then { // run scripts };
  11. The sites modules use a bunch of different scripts located in the modules_f.pbo. I dont feel like reading through all the scripts to figure out how it works though. This is the INIT eventHandler that runs on the blufor site module. Start there init = "if (isNil 'BIS_initSitesRunning') then {BIS_initSitesRunning = TRUE; ['[sITES] Modules config init'] call BIS_fnc_logFormat; if (isServer) then {execVM '\A3\modules_f\sites\init_core.sqf'} else {execVM '\A3\modules_f\sites\init_client.sqf'}}";
  12. Negative. That config is for addon only. There is currently no way of increasing capacity of cargo containers by scripting. Unless you script something else to it, like adding items via actions or something like that. SOmething not exactly pretty.
  13. No dice, unfortunately. I don't think I will be able too. That wiki page about it posted above only speaks about borders in regards to the horizontal listboxes (CT_XLISTBOX). I will either have to use the light gray color, have no border, or create a separate control behind it that allows me to change its color.
  14. I need to remember to refresh the page before I post. I read the post, go play in notepad, and come back 10 minutes later and post... only to find some one posted the same thing a few minutes prior. lol ---------- Post added at 04:55 ---------- Previous post was at 04:42 ---------- One note, however, with using distanceSqr. You need to to get the square root of it unless you square _spawnDistance also. _distance = sqrt (_pos1 distanceSqr _pos2);
  15. this should work [color="#FF8040"][color="#1874CD"]_spawnPos[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]getMarkerPos[/b][/color] [color="#7A7A7A"]"objective"[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// position array[/i][/color] [color="#1874CD"]_spawnDistance[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]150[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// distance in meters[/i][/color] [color="#1874CD"]_list[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]allUnits[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#191970"][b]allUnitsUAV[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// array of objects[/i][/color] [color="#191970"][b]waitUntil[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_x[/color] [color="#191970"][b]distance[/b][/color] [color="#1874CD"]_spawnPos[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]<[/b][/color] [color="#1874CD"]_spawnDistance[/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]count[/b][/color] [color="#1874CD"]_list[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]0[/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]hint[/b][/color] [color="#7A7A7A"]"within distance"[/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter EDIT: JShock beat me to it.... but his doesn't account for the distance to position
  16. There is no way to change the border color when using a different style - 5 for example?
  17. I may have been mistaken. I had this colorBorder[] = {0,0,0,1}; under my RscListBox but I'm not sure if it is doing anything.
  18. fight9

    MP Animation Player

    Glad you figured it out. The action menu is always a easy route to go. However, the action menu does kind of suck. If you want something else that is still easy to add to, try this.
  19. Can you not set the alpha to 0 on the border color class control config entry?
  20. You wont be able to do it through the configs like that.
  21. Oh, I misunderstood your question. Unless this is an addon, I dont think you will be able to. I found this, http://forums.bistudio.com/showthread.php?132476-include-statement-for-file-in-parent-folder
  22. You want a "line break". You'll want to use parseText. I cant remember if you need a Structured Text box or not... ie "RscStructuredText" This is something from ym own project... _title ctrlSetStructuredText parseText format [ "<t size='1.2'>%1</t><br />Fuel: %2<br />Turrets: %3", _vehicle, _fuel, _strTurrets ];
×