Jump to content

fight9

Member
  • Content Count

    382
  • Joined

  • Last visited

  • Medals

Everything posted by fight9

  1. I'm pretty sure you will have to include it into every file. I think CBA uses a similar system. "../" was used to move up a to parent folder correct?
  2. "Error Type Number, expected Bool" That error message might be the key. pushBack returns a number... try giving it something to return to. _index = _newMagArray pushback [_magType, _shotsLeft, 1]; You shouldn't need it but try it anyway.
  3. fight9

    UAV Intro

    0 = [1,0,false,true] call BIS_fnc_cinemaBorder; BIS_fnc_cinemaBorder
  4. fight9

    MP Animation Player

    KK's tutorial is in multiple parts. Click the link to part 2... or http://killzonekid.com/tag/gui/ and heres another link to the first one: http://www.armaholic.com/page.php?id=18363
  5. fight9

    Problem with spawn command

    I noticed that too but forgot to post it. Also, what are these inventory items?They cant be soldier inventory stuff because typeOf & damage wouldnt work on them. Are they cfgVehicle objects?
  6. fight9

    MP Animation Player

    I would start with a good GUI tutorial if you don't already know how to make one. Dialog Tutorial For Noobs [by A Noob] or Killzone Kid's GUI Tutorial After that you need scripting commands to play animations. There are a few: switchMove playAction playMove playGesture
  7. Make sure you have the correct file name and path. ---------- Post added at 23:31 ---------- Previous post was at 22:37 ---------- I just noticed something. It might just be a copy and paste error but you are missing the open block comment at the top of the script. make the very first line of the script this /* the end result should look like this /* ( USE for # ) 1 = Yellow Navigation Light --- "Land_NavigLight" 2 = White Edge Light --- "Land_runway_edgelight" 2.1= Red Edge Light --- "Land_Flush_Light_red_F" 2.2 = Green Edge Light --- "Land_Flush_Light_green_F" 2.3 = Blue Edge Light --- "Land_runway_edgelight_blue_F" 2.4 = Yellow Edge Light --- "Land_Flush_Light_yellow_F" 3 = 3 Nav Lights --- "Land_NavigLight_3_F" NOTES: ->(r,g,b,y) or (.1,.2,.3,.4) <- USE A "SPHERE 25mm" AS YOUR OBJECT THIS WILL BE MORE CONVIENENT Then other objects but its not required. */ //Object arrays _Light = _this select 0; _LightType = _this select 1; _LightDir = direction _Light; _lightPos = getPos _Light; //Deletes said object deleteVehicle _Light; //This creates the lights if (_LightType == 1) then { _Light = createVehicle ["Land_NavigLight", _lightPos, [], 0, "CAN_COLLIDE"]; }; if (_LightType == 2) then { _Light = createVehicle ["Land_runway_edgelight", _lightPos, [], 0, "CAN_COLLIDE"]; }; if (_LightType == 2.1) then { _Light = createVehicle ["Land_Flush_Light_red_F", _lightPos, [], 0, "CAN_COLLIDE"]; }; if (_LightType == 2.2) then { _Light = createVehicle ["Land_Flush_Light_green_F", _lightPos, [], 0, "CAN_COLLIDE"]; }; if (_LightType == 2.3) then { _Light = createVehicle ["Land_runway_edgelight_blue_F", _lightPos, [], 0, "CAN_COLLIDE"]; }; if (_LightType == 2.4) then { _Light = createVehicle ["Land_Flush_Light_yellow_F", _lightPos, [], 0, "CAN_COLLIDE"]; }; if (_LightType == 3) then { _Light = createVehicle ["Land_NavigLight_3_F", _lightPos, [], 0, "CAN_COLLIDE"]; }; //Sets light params from object _Light setDir _LightDir; _Light setPos _lightPos;
  8. hideObject is a local command, so as long as the AI is owned by a different machine than the player, you could hide it from the player and not the AI.
  9. Well, if you are using windows XP then you can use clipboard.exe from the run menu. Not in win7/8 however. You can also paste via menu bar in your notepad program. Edit at the top >> Paste
  10. Just place an object down, something like a "SPHERE 25mm" and place this in its init. null = [this,#] execVM "runwayLights.sqf"; then replace the "#" with a number:
  11. Try right clicking with your mouse and selecting paste.
  12. The composition like the one in the example is returned from the function (according to the biki). That means you need to manual save it someway. I would suggest copyToClipboard. Info is automatically saved to clipboard. This works perfect. [getPos player, 50] call BIS_fnc_objectsGrabber; Afterwards, open your .sqf file and hit CTRL+V to paste the information. Then make the proper edits from Grumpy's post. EDIT: The function saves the info to the clipboard automatically. The instructions you originally posted worked perfectly. You just have to follow them.
  13. fight9

    Scripting help

    getDamage is not a command. Use damage. EDIT: It looks like getDammage (misspelled) is what you are mixing it up with. Both getDammage and damage have the same effect.
  14. I think the error in the code you posted came from your use of BIS_fnc_selectRandom. You were putting an array inside of another array, causing there to be only one choice - the whole array. Also, you were passing the whole array to createVehicle. _cartype = [_ALLCARS] call BIS_fnc_selectRandom; _veh = createVehicle [_ALLCARS, _spawnPos, [], 0, "NONE"]; should be _cartype = [b][color="#B22222"]_ALLCARS[/color][/b] call BIS_fnc_selectRandom; _veh = createVehicle [[b][color="#B22222"]_cartype[/color][/b], _spawnPos, [], 0, "NONE"]; since _ALLCARS is already an array and _cartype is the randomly selected one returned from the function.
  15. You can use isClass to check for specific class names. You could build an array of classnames, check if they are available, and then pick one randomly to spawn. [color="#FF8040"][color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_possible"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_available"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_random"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_spawn"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// array of possible classnames[/i][/color] [color="#1874CD"]_possible[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"bat_mobile"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"wiener_mobile"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"pimp_mobile"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"DAR_M1151"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"B_G_Offroad_01_F"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// create array of available[/i][/color] [color="#1874CD"]_available[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [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"]"CfgVehicles"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_available[/color] [color="#191970"][b]pushBack[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#1874CD"]_possible[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// randomly select one available[/i][/color] [color="#1874CD"]_random[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#1874CD"]_available[/color] [color="#191970"][b]select[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]floor[/b][/color] [color="#191970"][b]random[/b][/color] [color="#191970"][b]count[/b][/color] [color="#1874CD"]_available[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// spawn random[/i][/color] [color="#1874CD"]_spawn[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createVehicle[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_random[/color][color="#8B3E2F"][b],[/b][/color][color="#191970"][b]position[/b][/color] [color="#000000"]player[/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] Made with KK's SQF to BBCode Converter
  16. That was the problem. The unit name that thisList returns on the server doesn't work with the group command (group needed for the join command).
  17. You are probably right. I just know I got an error the other day when I tried to send nothing through a spawn.
  18. Depending on where he runs the script, you might get an error if you don't pass at least an empty array.
  19. I don't know the answer to this one. Hopefully some one else can shed some light on. One solution I can think of is setting the statements locally for each client, where player is defined, and then deleting the trigger afterwards.
  20. Yeah, I was just looking at that. Join is a global command and your syntax looks correct. I'm not sure. Try the joinAs command to see if we can troubleshoot the problem with Join. Try figuring out what thisList select 0 returns on the dedicated. Maybe its not the player unit you are trying to use in group. Not sure what else it could be though... What do you have for setTriggerActivation?
  21. You can only set trigger statements locally. You can have the same trigger testing something different on every client. Per the wiki, the effects of setTriggerStatements are LOCAL, meaning those statements are only set locally. EDIT: To further prove my point, all of the trigger commands are listed under CfgRemoteExecCommands for use with BIS_fnc_MP.
  22. Triggers are global objects but the settings of it are local. You want to create the trigger on the Server ONLY. But then create the statement for it on the client. OR, set the statements on the server, but run the code from it on the client via BIS_fnc_MP.
  23. fight9

    Player on dedicated server

    The first line will exit the script if it is not the server. However, player is not defined on a dedicated server. That's not going to work.
  24. fight9

    Detach sling load command

    You should add that info to the wiki.
×