Jump to content

rileyrazor

Member
  • Content Count

    14
  • Joined

  • Last visited

  • Medals

Community Reputation

4 Neutral

About rileyrazor

  • Rank
    Private First Class
  1. rileyrazor

    Help Creating Custom Module

    This is my attributes class, If that's what you're asking. class Attributes: AttributesBase { // Arguments shared by specific module type (have to be mentioned in order to be present) class Units: Units { property = "blake_moduleAudio_Units"; }; // Module specific arguments class Origin: Edit { // Unique property, use "<moduleClass>_<attributeClass>" format to make sure the name is unique in the world property = "blake_moduleAudio_Origin"; displayName = "Object"; // Argument label tooltip = "Object or Unit the sound originates from. Must be variable."; // Tooltip description typeName = "STRING"; // Value type, can be "NUMBER", "STRING" or "BOOL" defaultValue = "player"; // Default attribute value. WARNING: This is an expression, and its returned value will be used (50 in this case) }; class Audio: Edit { displayName = "Audio File"; property = "blake_moduleAudio_Audio"; tooltip = "Name of the audio file to be played. Must be configured in description.ext."; // Default text filled in the input box // Because it is an expression, to return a String one must have a string within a string typeName = "STRING"; // Value type, can be "NUMBER", "STRING" or "BOOL" defaultValue = "audiofile"; }; class Distance: Edit { displayName = "Distance"; property = "blake_moduleAudio_Distance"; tooltip = "Distance the audio file can be heard from (Default 100)."; // Default text filled in the input box // Because it is an expression, to return a String one must have a string within a string typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL" defaultValue = "100"; }; class ModuleDescription: ModuleDescription{}; // Module description should be shown last }; EDIT: Sorry just realized what you were actually asking. I had the origin set to a variable I gave an object in game. Audio file was set to a sound already configured in the CfgSounds that worked by using the script outside the module. Distance was set to 100.
  2. rileyrazor

    Help Creating Custom Module

    22:24:38 Error in expression <t = _logic getVariable ["distance",100]; [_orig,[_audio, _dist, 1]] remoteEx> 22:24:38 Error position: < [_orig,[_audio, _dist, 1]] remoteEx> 22:24:38 Error Invalid number in expression 22:24:38 File blake\BlakesModulesMain\blake_blakesModules\functions\fn_moduleAudio.sqf..., line 8 22:24:38 Error in expression <t = _logic getVariable ["distance",100]; [_orig,[_audio, _dist, 1]] remoteEx> 22:24:38 Error position: < [_orig,[_audio, _dist, 1]] remoteEx> 22:24:38 Error Invalid number in expression 22:24:38 File blake\BlakesModulesMain\blake_blakesModules\functions\fn_moduleAudio.sqf..., line 8 22:24:52 A null object passed as a target to RemoteExec(Call) 'bis_fnc_objectvar' This is what I could find
  3. rileyrazor

    Help Creating Custom Module

    Thanks so much for your help! I certainly understand it more now. I am still getting one error, however. This is what I have inside the fn_moduleAudio.sqf: (I changed the default value of the audio class to "audiofile") _logic = param [0,objNull,[objNull]]; _units = param [1,[],[[]]]; _activated = param [2,true,[true]]; if (_activated) then { private _orig = _logic getVariable ["origin",player]; // the object must exist! your say3D command needs an existing object. defaultValue = "object"; has no sense here. private _audio = _logic getVariable ["audio","audiofile"]; // avoid too many "audio" name. Confusion is possible between the variable and the name of sound private _dist = _logic getVariable ["distance",100]; [_orig,[_audio, _dist, 1]] remoteExec ["say3d",0,true]; // from say3D [sound, maxDistance, pitch] should be OK as far as "audio" is a correct sound (should be defined in the cfgSounds) }; Whenever I activate the trigger to activate the module, I get an error telling me that there is an invalid number on line 8. Perhaps you might have an idea what is causing this.
  4. I am currently attempting to create a custom module, based off the tutorial by Bohemia on the wiki, but I'm afraid there's a section I just don't quite understand. My module seems to appear in game with all of the correct text boxes and etc., but I can't figure out how to get my line of code to run. I always get an error no matter how I put it. This is the code I am trying to run with the module. ["Origin",["Audio", "Distance", 1]] remoteExec ["say3d",0,true]; Here is my config.cpp class CfgPatches { class blake_blakesModules { units[] = {"blake_moduleAudio"}; requiredVersion = 1.0; requiredAddons[] = {"A3_Modules_F"}; }; }; class CfgFactionClasses { class NO_CATEGORY; class blake_modCat: NO_CATEGORY { displayName = "Blake's Modules"; }; }; class CfgVehicles { class Logic; class Module_F: Logic { class AttributesBase { class Default; class Edit; // Default edit box (i.e., text input field) class Combo; // Default combo box (i.e., drop-down menu) class Checkbox; // Default checkbox (returned value is Boolean) class CheckboxNumber; // Default checkbox (returned value is Number) class ModuleDescription; // Module description class Units; // Selection of units on which the module is applied }; // Description base classes, for more information see below class ModuleDescription { class AnyBrain; }; }; class blake_moduleAudio: Module_F { // Standard object definitions scope = 2; // Editor visibility; 2 will show it in the menu, 1 will hide it. displayName = "Global Audio"; // Name displayed in the menu category = "blake_modCat"; // Name of function triggered once conditions are met function = "blake_fnc_moduleAudio"; // Execution priority, modules with lower number are executed first. 0 is used when the attribute is undefined functionPriority = 1; // 0 for server only execution, 1 for global execution, 2 for persistent global execution isGlobal = 1; // 1 for module waiting until all synced triggers are activated isTriggerActivated = 1; // 1 if modules is to be disabled once it is activated (i.e., repeated trigger activation won't work) isDisposable = 0; // 1 to run init function in Eden Editor as well is3DEN = 0; // Menu displayed when the module is placed or double-clicked on by Zeus curatorInfoType = "RscDisplayAttributeAudioModule"; // Module attributes, uses https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Entity_Specific class Attributes: AttributesBase { // Arguments shared by specific module type (have to be mentioned in order to be present) class Units: Units { property = "blake_moduleAudio_Units"; }; // Module specific arguments class Origin: Edit { // Unique property, use "<moduleClass>_<attributeClass>" format to make sure the name is unique in the world property = "blake_moduleAudio_Origin"; displayName = "Object"; // Argument label tooltip = "Object or Unit the sound originates from. Must be variable."; // Tooltip description typeName = "STRING"; // Value type, can be "NUMBER", "STRING" or "BOOL" defaultValue = "object"; // Default attribute value. WARNING: This is an expression, and its returned value will be used (50 in this case) }; class Audio: Edit { displayName = "Audio File"; property = "blake_moduleAudio_Audio"; tooltip = "Name of the audio file to be played. Must be configured in description.ext."; // Default text filled in the input box // Because it is an expression, to return a String one must have a string within a string typeName = "STRING"; // Value type, can be "NUMBER", "STRING" or "BOOL" defaultValue = "audio"; }; class Distance: Edit { displayName = "Distance"; property = "blake_moduleAudio_Distance"; tooltip = "Distance the audio file can be heard from (Default 100)."; // Default text filled in the input box // Because it is an expression, to return a String one must have a string within a string typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL" defaultValue = "100"; }; class ModuleDescription: ModuleDescription{}; // Module description should be shown last }; // Module description. Must inherit from base class, otherwise pre-defined entities won't be available class ModuleDescription: ModuleDescription { description[] = { "This module allows you to easily play audio across all connected clients in a global environment.", "Sounds must be configured in description.ext." }; // Short description, will be formatted as structured text sync[] = {"LocationArea_F"}; // Array of synced entities (can contain base classes) class LocationArea_F { position = 0; // Position is taken into effect optional = 0; // Synced entity is optional duplicate = 0; // Multiple entities of this type can be synced synced[] = {"Anything"}; // Pre-define entities like "AnyBrain" can be used. See the list below }; }; }; }; class CfgFunctions { class blake { tag = "blake"; class blake_modCat { file = "\blake\BlakesModulesMain\blake_blakesModules\functions"; class moduleAudio {}; }; }; }; I don't understand the actual script section of the tutorial well enough to know how to implement it into my module. I've been reading through all the wiki pages I could find on the things that are in here, but can't seem to wrap my head around it. Maybe I'm out of my depth here. Here's the example provided by Bohemia of the section I don't understand. ( I've gotten the module to call the script with success, just not run the desired code). // Argument 0 is module logic. _logic = param [0,objNull,[objNull]]; // Argument 1 is list of affected units (affected by value selected in the 'class Units' argument)) _units = param [1,[],[[]]]; // True when the module was activated, false when it is deactivated (i.e., synced triggers are no longer active) _activated = param [2,true,[true]]; // Module specific behavior. Function can extract arguments from logic and use them. if (_activated) then { // Attribute values are saved in module's object space under their class names _bombYield = _logic getVariable ["Yield",-1]; // (as per the previous example, but you can define your own.) hint format ["Bomb yield is: %1", _bombYield ]; // will display the bomb yield, once the game is started }; // Module function is executed by spawn command, so returned value is not necessary, but it is good practice. true Any help would be greatly appreciated, and please let me know if I can provide any other information. EDIT: Realized I may have put this in the wrong category, mods can move if needed.
  5. I have some objects in TB that will randomly duplicate and move somewhere else after loading up my project. I can delete these items, but they always reappear after I save and open again. They also appear in game. I am using CUP buildings and EM buildings, but the objects that have issues are almost only the A3 items. I get no other errors with template libraries, etc. Any help would be appreciated, let me know if I can provide any more information. EDIT: There are also a few objects outside of the map boundaries that I cannot delete, and I can only see them in game and TB, not in bulldozer
  6. You are a miracle worker! Thank you for your help.
  7. Ive been working on a map in TB for the past four days, and I've had issues with duplicate template libraries. I fixed all of the duplicates and was no longer getting any errors, but still couldn't save without TB crashing. Now I can't even open the file. I've tried just about everything I can think of to resolve it, so if anyone else has any ideas I could try, please send them my way. Let me know if I can provide anything else that could help. I can attach the map file if needed, although I am using CUP - Core and EM_Buildings. Thanks, Riley
  8. rileyrazor

    Roads Cutting Off At Each Cell

    Increasing the texture layer size fixed it. Many thanks.
  9. I am having an issue in the terrain builder where my roads won't connect over cell boundaries. Ive attached screenshots below of the issue and my mapframe settings. Let me know If I can provide anything else that might help. Mapframe settings: https://gyazo.com/ff6a47ad8cd3a722fb51f831ec4e5217 Issue: https://gyazo.com/38895623d61ea2b3217c245afc1d3d5c
  10. Hello all. Recently I've gotten this error in my two most recent missions, and can't seem to find the issue. [bis_fnc_getrespawnmarkers] base respawn for UNKNOWN is not supported I promise my respawn is set up correctly, same as I've done many times before. I've tried merging the mission files into new missions with the same error still occuring. I can't find anything online that is any help. I really would like to not have to rebuild the entire missions. I can attach my mission files in a reply if they would be of any help. I do use quite a few mods though. Thanks in advance, Riley
  11. Thank you for all your help! Here is the final code that worked if anyone else coming across this thread needs it. private _bluGuy = bluGuy; missionNamespace setVariable["BluGroup", group _bluGuy, true]; private _civGuy = civGuy; missionNamespace setVariable["CivGroup", group _civGuy, true]; if (hasInterface) then { ["weapon", { params ["_player", "_weapon"]; if (primaryWeapon _player == "" && handgunWeapon _player == "") then { hint parseText "<t size='2.0'>You do not have a weapon.</t>"; [player] joinSilent CivGroup; } else { hint parseText "<t size='2.0'>You have a weapon.</t>"; [player] joinSilent BluGroup; }; }] call CBA_fnc_addPlayerEventHandler; };
  12. Thank you for the help. I'm fairly new to scripting, so I can understand each line, but I'm still figuring out how to implement it into my code. Kind of like understanding individual words, but not sentences. I'll get back to you when I've got everything together. EDIT: I now understand more about why the variables need to be global variables. I have one blufor unit named _BluGuy and the group variable is set to _BluGroup. My civilian is named _CivGuy and the group variable is set to _CivGroup. How do I go about setting those as variables in the mission space so the script can access it? Sorry I've you've already answered how and I missed it.
  13. I've pasted this directly into my initPlayerLocal.sqf but when I drop all weapons out of my players inventory, my player is still blufor and gets shot at by enemies. I'm getting no errors but the code doesn't seem to work for some reason.
  14. Hello all. I am somewhat new to scripting and I have attempted to write a section of code that will change the player's side to civilian if they do not have a weapon in the weapon slots. Weapons in bags are okay. The hint pops up fine but the side of my player never changes. Any help would be appreciated. This code is in my initPlayerLocal.sqf if (hasInterface) then { ["weapon", { params ["_player", "_weapon"]; if (primaryWeapon _player == "" && handgunWeapon _player == "") then { hint parseText "<t size='2.0'>You do not have a weapon.</t>"; if (playerSide isEualTo west) then {[player] joinSilent _CivGroup} else {};} else { hint parseText "<t size='2.0'>You have a weapon.</t>"; if (playerSide isEualTo civilian) then {[player] joinSilent _BluGroup} else {};} }] call CBA_fnc_addPlayerEventHandler; };
×