Jump to content

albertfish

Member
  • Content Count

    65
  • Joined

  • Last visited

  • Medals

Everything posted by albertfish

  1. You need to include Zen_FrameworkLibrary.sqf. #include "path\to\Zen_FrameworkLibrary.sqf" Like that, but with the relative path to that file.
  2. Hey, I think I found an issue with your infantry spawn function. I am not exactly sure how you intended this to work, however, it is extremely unlikely to spawn the maximum number of units. In Zen_SpawnInfantry you do the following to determine the number of units to spawn. _c = [_cMin, _cMax] call Zen_FindInRange; I believe it should be so it rounds to the nearest whole number. This would increase the change of it generating the maximum number of units. _c = [_cMin, _cMax, true] call Zen_FindInRange; Correct me if I am wrong, I have just started using it.
  3. Menu Extension by: albertfish Description This mod introduces a couple new buttons into the in game menu. These buttons can be expanded to reveal several other buttons that can be added in by mission makers and mod makers. These buttons can be used to open GUI displays through the menus. This mod aims to make it easy to mod makers to add custom GUIs to the game menus. For mission makers and script makers, this can be a great alternative to having actions in the scroll wheel menu. Features Ability to add buttons to the Mod Settings and Mission Settings menus Accordion style expanding menus Able to scroll thorugh button if there more than 10 Installation Extract the contents into your Arma 3 install directory. Now you must add this to the startup paramerters for Arma. To do so, right click Arma 3 and go to properties. From there select launch options and enter the following: -mod=@af_MenuExtension; Download You can download the mod here. Usage For Mod Makers To add a button to the Mod Settings menu, you have to make an entry into the ModSettingsMenuEntries class. The format is as follows: class MenuExtension_Entries { class MenuExtensionExample { buttonText = "Example Button"; resource = "MEExampleDisplay"; function = "fnc_ShowExampleDisply"; }; }; Where MenuExtensionExample is a class name of your choosing. buttonText is the text that will appear on the button. resource is the classname for the GUI you would like to launch. function name of the custom function that will create the dialog. This can also be the name of a script you want to execute. This parameter is optional. To check if the mod is installed you can do: isClass(configFile >> "CfgPatches" >> "af_MenuExtension") For Mission Makers To add a button to the Mission Settings menu you simply have to make a call to af_fnc_AddMenuItem. For Example: ["Example Button", "MEExampleDisplay", "UIExample\show_gui.sqf;"] call af_fnc_AddMenuItem; The first parameter is the text that will appear on the button. The second parameter classname of the dialog that you are opening. The third parameter is the function or script that will be executed when the button is clicked. To delete a button from the Mission Settings menu you simply have to make a call to af_fnc_DeleteMenuItem. For Example: ["Example Button"] call af_fnc_DeleteMenuItem; The parameter is the text that is displayed on the button. Changelog 22/11/14 - Version 2.1 Added a function option that allows this mod to call a function to create the dialog No longer requires you to use closeDisplay 10/11/14 - Version 2.0 Updated to work with the latest version of Arma 3 Removed the pages when more than 10 buttons are added and replaced it with the ability to scroll Empty menus will no longer be displayed Now works in single player missions Removed the CBA dependency Changed function names to better follow the BIS convention 1/12/13 - Version 1.0 Initial Release Please let me know if you come across any issues with this mod.
  4. albertfish

    Menu Extension

    Hello, I just released version 2.1! This version adds the ability to supply a function that will be called when the button is pressed. This allows you to pass in a script that will create the dialog, instead of having my mod create the dialog for you. This should make it a lot easier to integrate this mod with other mods. You can download this version here.
  5. I am having the same issue. We tried for about an hour to join each others server with no success. Multiple people tried hosting, and forwarding ports. Nothing seemed to work. I tried a dedicated server and also tried creating one from the ingame menu. Seems every time we want to play we need to make a sacrifice to the gods before we can join each other. When GameSpy was around we did not have a single issue. Seems like something needs to be fixed.
  6. albertfish

    Map Wake Island

    Great island, very nicely put together! @Dav Have you seen their other island Imrali? It is definitly worth checking out as well.
  7. albertfish

    Menu Extension

    You could check to see if the mod is installed if (isClass(configFile >> "CfgPatches" >> "af_MenuExtension")) then { // Add stuff to menu } else { // Add stuff to support menu }; I have not checked, but the only conflict I can think of when running two instances is that the one that is loaded first will get overwritten, which shouldn't been an issue. Another option is to just include the .pbo with you .pbo files. That way people don't have to download another mod. I'll have to see if there are any issues when multiple instances are run.
  8. albertfish

    Menu Extension

    @kecharles28, Thank you! @Foxhound, thank for you updating. In the last update I removed CBA from the requirements, but it is listed as a requirement on Armaholic. Would you be able to remove that please :).
  9. albertfish

    Get road type?

    I think that is because the surfaceType gets the type of the ground. Road are separate entities and not actually part of the ground.
  10. albertfish

    Menu Extension

    Hello! I took a hiatus from Arma to deal with other priorities. As a result this mod was not updated to work with newer versions of Arma 3. However, I am back, and I wanted to get this mod updated and working again. Sorry for the delay. Changelog 10/11/14 - Version 2.0 Updated to work with the latest version of Arma 3 Removed the pages when more than 10 buttons are added and replaced it with the ability to scroll Empty menus will no longer be displayed Now works in single player missions Removed the CBA dependency Changed function names to better follow the BIS convention Please let me know if you come across any issues with this mod.
  11. albertfish

    Help my MP money script

    You can check if the unit is a person by using if (_unit isKindOf "Man") then { // Unit is a man } else { // Unit is a vehicle };
  12. You are parsing the text twice. Ret doing this _text1 = format ["<t size='0.85' align='left'>You killed: </t><t size='0.85' align='left'>%1</t><br/>", _textKilled]; _text2 = format ["<t size='0.85' align='left'>You gained $</t><t size='0.85' color='#ff0000' align='left'> %1</t><br/>",_amount]; _text3 = format ["<t size='0.85' align='left'>Cash Remaining $</t> <t size='0.85' color='#ff0000' align='left'>%1</t>",_money]; hint parseText (_text1 + _text2 + _text3);
  13. Where did you put the extension that you are trying to call? Also, have you tried writing to a file or something to see if the extension code is executing?
  14. albertfish

    Help my MP money script

    I see now that you said you made the hint function a separate script. Did you the compile the script? This function will need to be defined on all the clients, so put it in the client init. fnc_hint = { hint _this; }; If you saved it as a separate file, you will need to execute the file in the client's init code.
  15. albertfish

    Animal Animations

    animals_f.pbo and animals_f_beta.pbo. For example a3\anmials_f_beta\Dog\Data\anim\dogBark.rtm
  16. albertfish

    Help my MP money script

    The killed event handler seems to trigger for both vehicles with units inside of them and empty vehicles. However, it seems that you are not adding the eventhandlers to the vehicles themselves. The allUnits command will return a list of people, so this does not include vehicles. If you want to gain money only for destroying a vehicle with units inside of it, you can keep using allUnits but then get the vehicle before checking the type. //--- Determine money value of _unit based on unit class _unitType = typeOf vehicle _unit; Keep in mind that vehicle _unit will return the unit itself if the unit is not in a vehicle, but it will return the vehicle if it is in a vehicle. Note that if there are multiple people in one vehicle the event will be fired for each person. so, you may have to keep track of if you have already acquired money from a vehicle or not. If you want to gain points for unmanned vehicles, look into using the vehicles command, which will return a list of all vehicles.
  17. I believe you have to add icons or set the icon for the group first. That command will make the icons you set visible. Look at addGroupIcon and setGroupIcon. Here is a list of the icons that you should be able to add to a group.
  18. albertfish

    Help my MP money script

    You said you changed the scope of _unitValue from local to global. Was this because the money was not registering? If you want to keep the variable with a local scope you have to have the variable defined outside the if statement. For example: _unit = _this select 0; _killer = _this select 1; _handle = _unit getVariable [ "DNA_EH_Killed_Money", -1 ]; _unitValue = 0; <snip> for "_i" from 0 to (count _veh)-1 do { if _unitType = ((_veh select _i) select 1) then {_unitValue = (((_veh select _i) select 1)/2)}; // unitValue will be half the original price of the unit }; [_unitValue, "DNA_fnc_addMoney", _killer] call BIS_fnc_MP; If you define it before hand like that you should be able to access it. Also do you see any hints at all?
  19. albertfish

    Help my MP money script

    I just did a quick test and it seemed to work properly. What does your script look like now that you made the changes?
  20. albertfish

    Help my MP money script

    The syntax is slightly off. [format ["You earned: $%1", _unitValue], "DNA_fnc_hint", _killer] call BIS_fnc_MP; This will call the DNA_fnc_hint function on the client for which _killer is local. So, that should display for the killer only. The parameter that is passed in the the function, the first element in that array, is the text that you want to display.
  21. albertfish

    Help my MP money script

    This line: if _unitType = ((_veh select _i) select 1) then {_unitValue = (((_veh select _i) select 1)/2)}; // _unitValue will be half the original price of the unit looks like it should be: if _unitType = ((_veh select _i) select 1) then {_unitValue = (((_veh select _i) select 0)/2)}; // _unitValue will be half the original price of the unit Notice that you were selecing index 1, the vehicle classname, instead of the money amount in index 0, and then dividing by two. To display a hint to just the killer, try makeing a function: DNA_fnc_hint = { hint _this; }; And then call it with: [format ["You earned: $%1", _unitValue], "DNA_fnc_hint", _killer] call BIS_fnc_MP;
  22. Try removing the 'onMouseButtonDown' from test_dialog and then changing your hello2.sqf file to: _number = 12 + 1; _dialog = findDisplay 1200; _ctrl = _dialog displayCtrl 1000; _ctrl ctrlSetText format ["pos: %1", _number]; In you button you have the action executing the script file. So, when you press the button it should run the code instead of compiling a function like you had previously.
  23. _class = configFile >> "someclass"; for "_i" from 0 to count _class - 1 do { systemChat getText (_class select _i); }; That is an example of looping through class entries. that example assumes they are all text, but you can use isClass to determine if it is a subclass then pass that class through the function. There are also functions to test for text, arrays, etc. For example isText, isArray, isNumber, etc.
  24. But when you call BIS_fnc_addStackedEventHandler you do pass code into it, right? That code is executed in the function you are talking about. So the code you pass into BIS_fnc_addStackedEventHandler can cause an error in fn_executeStackedEventHandler.
×