Jump to content

Midnighters

Member
  • Content Count

    894
  • Joined

  • Last visited

  • Medals

Posts posted by Midnighters


  1.  

    This should have been posted here.

    Anyway...looks like you need to drop the "@" from @MS_Sounds

    Try this.  :)

    class CfgPatches
    { 
              name = "MS Sound";
              author = "Midnight";
              url = "themedicstation.net";
              requiredVersion = 1.66;
              requiredAddons[]={};
              units[]={};
              weapons[]={};
    };
    
    
    class cfgSounds
    { 
          sounds[]={};
          class MS_Alarm
          {
              name = "MS-Alarm";
     sound[]={"MS_Sounds\sounds\alarm.ogg",0.8,1,30};
     titles[] = {0,""};
           };
    };
    

    Oh thanks! Much appreciated, I'll make sure to post there next time :) 


  2. when I pack my config.cpp as such:

    class CfgPatches
    { 
              name = "MS Sound";
              author = "Midnight";
              url = "themedicstation.net";
              requiredVersion = 1.66;
              requiredAddons[]={};
              units[]={};
              weapons[]={};
    };
    
    
    class cfgSounds
    { 
          sounds[]={};
          class MS_Alarm
          {
              name = "MS-Alarm";
     sound[]={"@MS_Sounds\sounds\alarm.ogg",0.8,1,30};
     titles[] = {0,""};
           };
    };

    My addon paths go like this:

    MS_Sounds\sounds\alarm.ogg

    And MS_Sounds would be the pbo name I put into the regular addons folder.

    am I doing anything wrong with the directory?

    I go to pack this, everything is fine and no errors. With both MakePBO and addon builder (double checking)

    And the sound doesn't play, the class comes up in the config viewer and in the sounds.

    But no sound as to what I can hear?

    thanks in advance. 

     

     


  3. Why mid mouse is pain?  I`m bind  mid mouse to confirm action since 2014..

     

    and lil offtop

     I always want to seperate setting keys for zoom...Something like ctrl +wheel up = scope zoom in

    You always have the special keys section.

    When editing your controls, it's off to the right.

    You'll be able to do the CTRL + Mouse Wheel Up kind of actions


  4. Not that hard. Indent things properly and it will look cleaner, making it easier to work with:

    { 
    	_x addEventHandler['Hit',{
    		params [_car];
    		if (!_car getVariable ["alarm",false]) then {
    			_car setVariable ["alarm",true];
    			playSound3D ['AlarmCar',_car];
    			_car spawn {
    				sleep 10;
    				_this setVariable ["alarm", nil];
    			};
    		};
    		
    	}];
    } count (entities [["car"], [], false, true]);
    

    This will reset the alarm after 10 seconds, allowing it to be triggered again.

    Oh sweet, this definitely looks a lot cleaner I suppose.

    allows for more possibilities, thanks for pointing this out to me.

    also, above. playSound3D requires a full directory to the sound. 

    will this be taxing on performance? 


  5. Just randomly stumbled upon this thread. 

     

    I believe the code in addEventHandler is a separate scope. Therefore _x in there will be undefined as well. (although, using a string as command may work as theend3r showed, not sure.)

    As shown on https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Hit- the hit EH passes 4 arguments via an array: unit, causedBy, damage and instigator.

     

    It states that unit is the object the event handler is assigned to. (the vehicle)

    so the code within the eventhandler should be: 

    playSound3D ["A3\Sounds_F\sfx\alarmCar",(_this select 0)];

    "A3\Sounds_F\sfx\alarmCar" explained:

     

    (_this select 0) explained: 

    • _this refers to the array of arguments that the 'Hit' EH passes.
    • 'select 0' selects the first argument from that array, which is the unit. Also, it's select 0 and not select 1 because indexes are 0 based (0 = first, 1 = second).

     

    Idk if this explanation was over the top but hope it's useful :)

     

    Kind regards,

    Sanchez

    Hi, 

    yes I was thinking the same thing. I'm still really confused as to what works and what doesn't. No errors.

    I believe I tried (_this select 0) as like you said the "Hit" event handler has 4 arguments you can pass through it, I'm going to double check.

    Tricky stuff. 

    I was also told that PlaySound3D is the best for static objects? 


  6. Yes. The syntax is {code} forEach array, so it should be

    _Handler = {_x addEventHandler["Hit",{playSound3D["AlarmCar",_x]}]} forEach (entities [["car"], [], false, true]);
    

    You should also remove the EH so it doesn't play over and over again with car removeAllEventHandlers "Hit"; but this is not trivial as you can't use _x in that case as it won't be parsed. You'd need to

    { call compile format ["%1 addEventHandler['Hit',{playSound3D['AlarmCar',%1]; %1 removeAllEventHandlers 'Hit'}];", _x] } forEach (entities [["car"], [], false, true]);
    

    Edit: You can also use count instead of forEach as it has the same results in this case and is slightly faster.

    Alrighty, noted.

    Thanks for the help, much appreciated!


  7. Hi guys,

     

    I just updated our server and now when it launches it states:

    Bad version 72 in p3d file á3\data_f\cl_basic.p3d'

     

    How to fix?

    I got the same thing, it stopped for me after replacing the profiling build server exe with the regular arma3server exe

    dunno if that actually did anything, but it at least stopped temporarily.

    Highly doubt this is an error on your end, its been a problem for everyone since 1.66


  8. I'm using High command module with my custom scripts so that every time user clicks on map to move group I create the waypoints my self.. this could be where the problem lies in.

     

    thx

    Okay, that makes sense. These waypoints may not be so random then? 

    Maybe you want to assign the High Command action to something other than just a single click?

    Last I knew of,  the command "onSingleMapClick" had a option to use ALT + LMB instead of just LMB.


  9. I don't understand why this post is still going.

    I gave you your answer in post #4 of this thread, in the linked thread you will find two options.

    One disables the load and save buttons completely, post #3.

    The other keeps the buttons enabled but any loadout that is loaded is checked against the VA white listed items and removes any items from the player that are not allowed, post #8.

    You make no mention of trying the examples from my link, if you are having problems with them let me know and ill try to help you as i know they work.

    This is not what this option does, and its a bool not a number.

    It means that the items added will be only locally for that VA. Rather than globally for all client VAs.

    Okay, thanks. 


  10. Thats what i just did, before making this post:) But this solution is not very right...

    you are going to need to disable global weapons, items, etc.

    if you've already got everything for your arsenal in terms of weapons, items, backpacks, etc.

    I recommend you try doing something like this:

    [(_this select 0),"",0] call BIS_fnc_addVirtualWeaponCargo;

    The "0" at the end will dis allow the loading of weapons outside of what you have there.

    This is how I've always done it, but there may be better options with the same results. 

    Same syntax with 

    bis_fnc_addVirtualItemCargo,

    bis_fnc_addVirtualBackpackCargo,

    and bis_fnc_addVirtualMagazineCargo.

    This shouldn't tamper with what you already have in there as long as there is nothing added to that string.

     

    Here is the function description (bis_fnc_addVirtualWeaponCargo) 

    /*
    
    	Description:
    	Add virtual weapons to an object (e.g., ammo box).
    	Virtual items can be selected in the Arsenal.
    
    	Parameter(s):
    		0: OBJECT - objct to which weapons will be added
    		1: STRING or ARRAY of STRINGs - weapon class(es) to be added
    		2 (Optional): BOOL - true to add weapons globally (default: false)
    		3 (Optional): BOOL - true to add Arsenal action (default: true)
    
    	Returns:
    	ARRAY of ARRAYs - all virtual items within the object's space in format [<items>,<weapons>,<magazines>,<backpacks>]
    */
    
×