Jump to content

opusfmspol

Member
  • Content Count

    711
  • Joined

  • Last visited

  • Medals

Everything posted by opusfmspol

  1. I would suggest checking your .rpt file. The "any" error is often seen with null, undefined or wrong data types. Usually they throw an error to the .rpt file when they occur. For example, if you inadvertently hit "O" as in "Oscar" instead of "0" as in zero, it would read an undefined data type (O being an undefined variable) and display "any". That would log to the .rpt file. The only other thing I can think of would be that somewhere another script is redefining your "money" setting to a null data type. --- Edit -- In your moneycheck.sqf, put this: diag_log money; diag_log format ["money: %1",money]; player sidechat format ["money: %1",money]; hint format ["You have: $%1",money]; when you call the script, a sidechat should appear telling you what the money variable returns. Likely to be same as the hint. The diag_log command will log the actual value and the format string into your .rpt file. If nil (undefined) an error is logged instead of the value.
  2. It's a little confusing, you want to keep some following waypoints, or not lose the "Transport Unload" waypoint? If you want to keep following waypoints, change the order of the waypoints. Make the one you want to delete the final waypoint. Once that is done, remove it. The others will remain. If you want to keep the "Transport Unload" waypoint, grab the Helipad and waypoints, drag them apart. Delete the one you want gone, and move them back together.
  3. is "money" defined inside of an "if (isServer) then" scope? Because then a client wouldn't have access to it without using publicVariable.
  4. I sent you a PM. I started to explain, but it got long and drawn out. I decided it was easier to show than to explain it. And it's easier to understand if you see how it's done. I just didn't feel that posting the entire function code out there would have been right since it belongs to BI, and people customizing it in their mission ought to know beforehand that it would fall under their Share-Alike license terms. http://www.bistudio.com/community/licenses/arma-public-license-share-alike
  5. Simple: ------ If you want different types of standard ammoboxes available from editor, you can change the variable containing them in the module init field: missionNamespace setVariable ["BIS_SSM_AmmoDrop_BOX_WEST",[[color="#A9A9A9"][i]"USVehicleBox[/i]","[i]USSpecialWeaponsBox[/i]","[i]USBasicWeaponsBox"[/i][/color]]]; missionNamespace setVariable ["BIS_SSM_AmmoDrop_BOX_EAST",[[color="#A9A9A9"][i]"RUVehicleBox[/i]","[i]RUSpecialWeaponsBox[/i]","[i]RUBasicWeaponsBox"[/i][/color]]]; missionNamespace setVariable ["BIS_SSM_AmmoDrop_BOX_GUER",[[color="#A9A9A9"][i]"SpecialWeaponsBox[/i]","[i]LocalBasicWeaponsBox"[/i][/color]"]]; Though I don't know if it would be limited to A2/OA content like the SOM is. Complex: ------- If you want ammoboxes containing specifically what you list, you can customize the SSM's server functions in the custom codes that run. But you'll likely spend some time tracking down errors that pop up and trying to resolve them to get it to work. BIS_SSM_fnc_AmmoDropWaypointReached is the function dealing with the ammoboxes when they hit the ground, so that would be the one to customize for preferred box content. The customized function would go in the custom code for the aircraft vehicle init. This is not a perfect example, it fails to cycle for Side and contents of each box, but it should give you the idea of how customizing the function works: in init.sqf: Mastered: -------- You can combine the two methods and get exactly what you want. One crate each is dropped of whatever is in BIS_SSM_AmmoDrop_BOX array. - If you only want one crate, list only one in the array. - If you want two of the same crate, list the same crate twice in the array. - The customized function will fill the crates with your preferred crate content. Hope that helps.
  6. First, use launch param -showScriptErrors, and don't use launch param -noLogs. That way the errors encountered will get logged to the .rpt file and flash on screen as they occur, giving you an idea of when its happening. Then run the script like this, using diag_log and format commands to dump the variable values into the .rpt log, but in a way that you can make sense of the results: After the script fails, exit and go to the .rpt file. Review the values that were dumped in and compare what they are versus what they should be. That should give you an idea where the failure occurs.
  7. Apologies to all for the multiple posts. I know it's frowned upon, but I hope these contributions are found to be something worthwhile being added to the thread. :rolleyes: A while back I posted how customized phase scripts in your mission file can be used by SOM, called by BIS_SOM_requestSecOpFunc: http://forums.bistudio.com/showthread.php?73329-Secondary-Ops-Manager-Module-Discussion&p=2784950&viewfull=1#post2784950 But the "Request SecOp" function is for calling a support or SecOp immediately. I found that customized phase scripts can also be used for SecOps stored in the pool, or for SOM supports available to the player in the action menu under 0-8. Again, you can swap out one script, a few scripts, or all of them if needed. The "Add Phase Code" Function: To use customized phase scripts for the pool SecOps or added support requests, a block of code gets added to the SOM after the secop is added to the pool or the support request is made available, using the BIS_SOM_addPhaseCodeFunc. It can be added using a trigger or a script. The code runs prior to the "phase" designated by the third element in its array. An example borrowed from Warfare which, prior to phase 6, calls a function to subtract player funds for using a support: The "Add Phase Code" function is great for running additional functions, getting and setting up variables, etc.; however it does have limited effect on the phase scripts that follow it. For example, it can be used to change a target position from one point to another by setting the Scope's "params", or it can spawn extra groups by calling BIS_fnc_spawnGroup; but it can't be used for changing the vehicles, aircraft or soldiers of the SecOp or support from one type to another when created. The customized phase scripts have to do that. The "Add Phase Code" function can be used to change the script path. Instead of running the phase script from the default SOM path, the path can be changed to run a phase script from the mission file. This can be done for each individual phase, or if using various phase scripts, to change the Scope's "scriptPath", which would affect the remaining phases for the current SecOp or support call. Running Customized Phase Scripts: 1) Create a subfolder in your mission file. This is for designating the file path. For my example, I'll create two subfolders, one titled "scripts", then another inside titled "supports". Now my mission folder reflects: "My_Laser_Strike_Mission\scripts\supports" 2) Create another subfolder inside the one you just created, for holding the customized phase script(s). This subfolder must have the same name as the SecOp or support being called, i.e.: For my example, I'll use the airstrike support for Warfare, "tactical_airstrikeWF". Now my mission folder reflects: "My_Laser_Strike_Mission\scripts\supports\tactical_airstrikeWF" 3) Copy the phase scripts you will use from the SOM's SecOps folder to your mission's subfolder. Make the custom changes. I want to change the aircraft, which can't be done using phase code alone. The aircraft is assigned in the "07_create_secop_assets.sqf", so that's the one I copy over. I change the available aircraft and bomb-type selections to an F-35 only (West) and SU-34 only (East), and save. Called from the mission folder, the script's path is: "scripts\supports\tactical_airstrikeWF\07_create_secop_assets.sqf" 4) Add the Secop or support request. This is done at mission start, or during the mission using a trigger or script. - For a SecOp, it can be added either to the SOM's pool in the editor init field, or during the mission using BIS_SOM_manageSecOpPoolFunc. - For a support, it can be added any time using BIS_SOM_addSupportRequestFunc. - Warfare without parameters adds the supports automatically if BIS_WF_OldSupportLevel = 1, but a player must have enough funds for it to show. - Warfare with parameters must also have the "Support" param: "Mission Default" selected for them to be added automatically. 5) Add the Phase Code that will change the script path. This is done after the SecOp or support has been added. It can be done by trigger or script. There are two approaches: a phase script individually, or the "scriptPath" for the entire scope. One script path individually: Script Path for an entire Scope: In my own mission I've used customized phase scripts with the Air Recon support, to extend the UAV's flight time and add a UAV logic, synchronized with the SOM's UAV, the player, and the base UAV terminal, so the UAV's camera is accessable from the Terminal. I've also used it to specify exactly which aircraft get used in the Tactical Airstrike and Transport supports. I continue to be amazed and feeling very appreciative to BIS and Joris-Jan van 't Land for how flexible the SOM actually is. - THANK YOU. And I'm a huge Warfare fan, I have to extend the same for Warfare, Mike Melvin and those who worked on it as well I'm a latecomer and wish I'd been in on the Arma series since OFP. THANK YOU so much again! And again, I hope this is found helpful to some in creating some great missions.
  8. I think you have to call the code from a script file, i.e.: this addAction [ "Tak co se děje?", "taskMine.sqf" ]; The parameters for addaction say you can use code, but it also says using code is "(since Take on Helicopters)", which is after OA. I tried and it won't work in OA. It also says: "or string with code", but I tried that too, and it doesn't work in OA. Using code in a string, it searches for a script file. Maybe code in a string is another option available since TKOH or A3, but the parameter description doesn't say so. A2/OA seems limited to calling a script file. https://community.bistudio.com/wiki/addAction
  9. systemChat is local in effect. A dedicated server has no real player to do chat, and the command needs to be run on the targeted client machine(s). https://community.bistudio.com/wiki/systemChat Maybe try: [b]_unit systemChat "You need to be a VIPilot to fly this aircraft. Check FAQ in the menu on the map, top left corner!";[/b] [i] // - or -[/i] [b]vehicle _unit systemChat "You need to be a VIPilot to fly this aircraft. Check FAQ in the menu on the map, top left corner!";[/b] [i]// Note: format command is not needed since you're not using dynamic values (%1,%2 etc.) or a Localize string that has dynamic values.[/i]
  10. vipOnly.sqf [color="#FF0000"]waitUntil {!isNull player};[/color] [color="#A9A9A9"]_vehicle = _this select 0;[/color] It could be that you're having a dedicated server run a "player" query. There is no real player on a dedicated server. Is the code being run from server or client? https://community.bistudio.com/wiki/hasInterface
  11. Can't say for others, but I had better frames and way less momentary frame locks which seemed to promote smoother movement. That was my perception. And so many fewer messages on screen (playing with -showScreenErrors). Thank you again Goliath, loving your work.
  12. Sorry, saw this part and thought you were talking about ACE rucksack contents. #ifdef __ACE__ d_custom_ruckbkw = __pGetVar(ACE_weapononback); d_custom_ruckmag = __pGetVar(ACE_RuckMagContents); d_custom_ruckwep = __pGetVar(ACE_RuckWepContents); #endif --- Edit -- Can only suggest: 1) check the return on _backpackmags and _backpackweps when defined. 2) compare the returns of _d_custom_layout and d_custom_layout after each is defined. 3) check the return on d_custom_layout before and after __pSetVar processes it. These will help identify where the breakdown is occurring.
  13. [deleted] admin can remove, wasn't proper. But Gamerz971hd is right, looks familiar. Credit should be given when and where credit is due.
  14. Rucksacks are an ACE feature. You would need to check ACE's capabilities with ruck contents.
  15. opusfmspol

    Hiding in dead bodies

    I'm really at a loss since there is no "detect movement" command I know of. Maybe an addaction "Play Dead" that disables animation, and an addAction "React" that enables animation; and using "canMove Player" to detect?
  16. correct. It's reading them as an object, group, number, or something else other than boolean "true" or "false", or if they are already defined as Boolean, something is not setting one or the other to "true". https://community.bistudio.com/wiki/Data_Types
  17. Your addaction works, which means your Symp1 && Symp2 don't. "if (...) then" is a boolean test - true/false. Whatever the condition result is must return "true" for the code to run. "&&" is a Boolean test - true/false. Values on both sides must return "true" for the condition to return true so the code will run. Your attempt fails because "Symp1" and "Symp2" are defined as something other than True or False. eh... scratch that, won't work on "false" (doh!) example: Symp1 = true; Symp2 = false; // Code will not run since both are not true. if (!alive _badDude) then {Symp2 = true}; // If _badDude is dead (!alive returns true) the code will run, because both Symp1 and Symp2 are true.
  18. opusfmspol

    Hiding in dead bodies

    "hideObject", "knowsAbout" and "reveal" is what comes to mind, but I think knowsAbout would be difficult to assess what kind of return to trigger from. I mean, if the enemy is standing over the hidden soldier, how much is knowsAbout going to return? https://community.bistudio.com/wiki/hideObject https://community.bistudio.com/wiki/hideObjectGlobal https://community.bistudio.com/wiki/knowsAbout https://community.bistudio.com/wiki/reveal
  19. opusfmspol

    Odd ARMA2/OA setup issue

    Do you mean you can't activate them because they don't show, or they show but you can't activate them?
  20. ALICE allows custom code to run when a civilian initializes. The code is stored in an array defined under "ALICE_civilianinit". https://community.bistudio.com/wiki/Ambient_Civilians#Set_variables_to_BIS_alice_mainscope_with_desired_values The example given is: [i][color="#808080"][bIS_alice_mainscope,"ALICE_civilianinit",[{_this addweapon "Mk_48"}]] call bis_fnc_variablespaceadd;[/color][/i] Don't use that example. I spent A LOT of time, and had one hell of a time, getting it to work. It's dependent on Functions and becomes a pain since Functions may not initialize by the time ALICE initializes. Not only that, my attempts at adding new variable space code using triggers didn't work as I drove town to town. The codes got added, but just didn't run. I suspect ALICE initializes everything at start and doesn't query the variable later. Use this example instead - place in the ALICE init field: BIS_alice_mainscope setVariable ["ALICE_civilianinit",[[b]{_this addweapon "Mk_48"}[/b]]]; The civilian men will have machine guns. It works and is a lot easier. You'll notice it uses an array to store the code. That's because in the array you can define more than one block of code to run when each civilian spawns. When they spawn they run each set of code in the array. Note: Be sure to separate code blocks with commas "," BIS_alice_mainscope setVariable ["ALICE_civilianinit",[[b]{_this addweapon "Mk_48"[/b][color="#FF0000"]},{[/color][b]hint "hello"}[/b]]]; I suggest only placing your code in the ALICE module's init field if it is simple and short, like the example above. For more complex code, put it at beginning of your init.sqf. Don't let it be delayed by any "waitUntil" or "sleep". Tested on Utes, clean map with player and ALICE module; I got this to work, putting it in init.sqf: - Replace the code with anything you want. - Get rid of the first set of code and comma if you want everything in a single block of code. - If you wish to add a third block of code, insert a comma and another block before the final line: ]]; Final note: You'll notice the first block of code uses _this and the second block of code uses _unit. Both are referencing the civilian being initialized. You can use either one to reference the civilian running the code. For the 30% random chance, insert this in the code: _random = random 100; if (_random < 30) then {....do this....};
  21. It would go in a script. For editor, give the truck a name and set it's status to locked. Place a trigger set to "anyone present". In the condition field: time > 500; In the activation field: MyTrucksName lock false; You could also have the trigger give a hint that the truck is now unlocked. MyTrucksName lock false; hint "Fuel Truck is now unlocked.";
  22. // _vehicle is the fuel truck _vehicle lock true; \\ locked waitUntil {time > 300}; \\ wait 5 minutes _vehicle lock false; \\ unlocked
  23. opusfmspol

    Survival Mission

    Warfare. Hesco barriers for base building, money for capturing/killing/accomplishing, and purchase of weapons, soldiers and vehicles.
  24. Not as easily as setting a timeout number, but I would think a delay could be created. The module allows custom code to run at certain points. An example, in module init: missionNamespace setVariable ["BIS_SSM_Airstrike_VEHICLEINIT",{_pilot sidechat "I'm on my way!"}]; When the Airstrike support is called, the pilot sidechats that he's on his way. The custom code uses the variables set in the underlying scope of the function they're called from. In BIS_SSM_fnc_SpawnAircraft function, _pilot references the pilot and _vehicle references the aircraft. Those are used in the code. The caller is _this select 1. These variables could be passed into a script. I would try using such code to have Group _pilot follow cycling waypoints on a switch, and create a trigger that would hit the switch. Or set a timeout condition code for the request:
  25. I don't know VBS or A3. The corpse params are all listed as A3. https://community.bistudio.com/wiki/description.ext#corpseManagerMode Bodies don't typically disappear on respawn in A2 or OA unless Garbage Collector (GC) is set up. Seems the Corpse Manager Mode is used to manage the corpse removals, is the option in VBS? --- Edit -- Because I was thinking if your param times worked, would the scripts still be needed?
×