Jump to content

npmproductions13

Member
  • Content Count

    103
  • Joined

  • Last visited

  • Medals

Posts posted by npmproductions13


  1. Thanks again 7erra! I actually didn't know that globals targeted with missionNamespace setVariable was the same as global_var = x so thanks for giving me that insight.

     

    I've tried every example found at https://community.bistudio.com/wiki/BIS_fnc_garage with no joy.

    I also found an old thread that has or had a similar problem and I tried using the code found there by Larrow to no avail either.

     

    That can be found here: 

     

     

    I have updated my code but still the entire list filled with every vehicle is visible. Not quite sure what I'm doing wrong here.

    Spoiler
    
    _garageObject = param[0];
    _garageObject addaction [ "<t color='#FF0000'>Edit Vehicle</t>",{
    
    //make center where the current players vehicle is. (Check to make sure player in vehicle will be added later).
    _center = vehicle player;
    
    BIS_fnc_garage_data = [
    	//CARS
    	[
    		//model
    		"\a3\soft_f\offroad_01\offroad_01_unarmed_f",
    		//config paths of classes that use above model
    		[
    			( configfile >> "CfgVehicles" >> "C_Offroad_01_F" )
    		],
    		gettext (configfile >> "CfgVehicles" >> "O_MRAP_02_gmg_F" >> "model"),
    		[
    			( configfile >> "CfgVehicles" >> "O_MRAP_02_gmg_F" )
    		]
    	],
    	[],
    	[],
    	[],
    	[],
    	[]
    ];
    
    ["Open", [false, _center]] call BIS_fnc_garage;
    
    h = [] spawn {
    	waitUntil { isNull ( uinamespace getvariable ["BIS_fnc_arsenal_cam",objnull] ) };
    	BIS_fnc_garage_data = nil;
        hint "Should be nil now";
    };
    
    }, [], 1, true, true, "", "!( isNull vehicle player ) "];

     

     


  2. Thanks for the comment 7erra. I've actually spotted that error and corrected these after making my initial post but have the same result.

     

    My most recent code is

    Spoiler
    
    _garageObject = param[0];
    _garageObject addaction [ "<t color='#FF0000'>Edit Vehicle</t>",{
    
    BIS_fnc_garage_center = vehicle player;
    
    //hint "Opened?";
    //sleep 5;
    
    BIS_fnc_garage_data = [
    	//CARS
    	[
    		//model
    		"\a3\soft_f\offroad_01\offroad_01_unarmed_f",
    		//config paths of classes that use above model
    		[
    			( configfile >> "CfgVehicles" >> "C_Offroad_01_F" )
    		],
    		gettext (configfile >> "CfgVehicles" >> "O_MRAP_02_gmg_F" >> "model"),
    		[
    			( configfile >> "CfgVehicles" >> "O_MRAP_02_gmg_F" )
    		]
    	],
    	[],
    	[],
    	[],
    	[],
    	[]
    ];
    
    		
    uinamespace setvariable ["bis_fnc_garage_defaultClass", typeOf vehicle player ];
    missionnamespace setvariable ["bis_fnc_garage_data", BIS_fnc_garage_data];
    
    ["Open", false] call BIS_fnc_garage;
    
    h = [] spawn {
    	waitUntil { isNull ( uinamespace getvariable ["BIS_fnc_arsenal_cam",objnull] ) };
    	BIS_fnc_garage_data = nil;
        hint "Should be nil now";
    };
    
    }, [], 1, true, true, "", "!( isNull vehicle player ) "];

     

     

    Any other ideas as to why this isn't working?


  3. I cannot seem to get the custom/filtered list working for the BIS_fnc_garage function.

    The documentation for the function does not seem to work when I add the BIS_fnc_garage_data which takes an array of whitelisted vehicles.

     

    Official Docs: https://community.bistudio.com/wiki/BIS_fnc_garage

     

    Here is my code:

    Spoiler

     

    
    _garageObject = param[0];
    _garageObject addaction [ "<t color='#FF0000'>Edit Vehicle</t>",{
    
    BIS_fnc_garage_center = vehicle player;
    
    uinamespace setvariable ["bis_fnc_garage_defaultClass", typeOf vehicle player ];
    
    ["Open",true] call BIS_fnc_garage; 
    
    BIS_fnc_garage_data = [
    	[
    		"\a3\soft_f\offroad_01\offroad_01_unarmed_f",
    		[
    			gettext (configfile >> "cfgvehicles" >> "O_MRAP_02_gmg_F" >> "model")
    		],
    		"\a3\soft_f\mrap_02\mrap_02_gmg_f",
    		[
                [ ( configFile >> 'cfgVehicles' >> 'O_MRAP_02_gmg_F' ) ]
    		]
    	]
    ];
    
    h = [] spawn {
    	waitUntil { isNull ( uinamespace getvariable ["BIS_fnc_arsenal_cam",objnull] ) };
    	BIS_fnc_garage_data = nil;
        hint "Should be nil now";
    };
    
    }, [], 1, true, true, "", "!( isNull cursortarget ) "];

     

    I put this together with an example from Larow and the documentation if memory serves me right. Any help with getting this working would be appreciated. 👍


  4. This was the first animation class I've added I still need to work on the magazine_reload etc.

    Here's my model.cfg so far.

    class Rotation;
    
    class CfgSkeletons
    {
        class Skeleton
        {
            isDiscrete=0;
            skeletonInherit="";
            skeletonBones[]=
    		{
    			"ammo_box", "", 
    			"barrel", "", 
    			"camo1", "", 
    			"camo2", "",
    			"camo3", ""
    		};
        };
    };
    class CfgModels
    {
    	class Default;
        class IA_minigun: Default
        {
            htMin=0;
            htMax=0;
            afMax=0;
            mfMax=0;
            mFact=0;
            tBody=0;
            skeletonName="Skeleton";
            sectionsInherit="";
            sections[]={"ammo_box", "barrel", "camo1", "camo2", "camo3"};
            class Animations
            {
    			class barrel
                {
                    type="rotationZ";
    				source="ammoRandom";
    				sourceAddress="loop";
    				selection="barrel";
    				axis="barrel_axis";
    				centerFirstVertex=1;
    				memory = true;
    				minValue=0;
    				maxValue=0.5;
    				angle0="rad 0";
    				angle1="rad 180";
                };
            };
        };
    };

     


  5. Like my title suggests I'm making a weapon for the first time and I want the barrel of my minigun to turn in place when firing. Currently it turns but deforms beyond recognition when rotating but returns to normal when the rotation reaches 0 again.
    This is the animations class of my model.cfg. I can't see anything wrong with this.

    class Animations
            {
    			class barrel
                {
                    type="rotationZ";
    				source="ammoRandom";
    				sourceAddress="loop";
    				selection="barrel";
    				axis="barrel_axis";
    				centerFirstVertex=1;
    				memory = true;
    				minValue=0;
    				maxValue=0.5;
    				angle0="rad 0";
    				angle1="rad 180";
                };

    mvrhqhP.gif


  6. Hi all I have an issue with my textures once Buldozer launches. My layers.cfg is perfectly fine and to my knowledge my textures have been converted to PAA from TGA via TexView so I don' think they're the cause.

    Any input or feedback on this issue would be great as I don't have a clue what could cause this.

    I personally think its the Sampler section of my mapframe as seen below, can you guys tell me if these values are correct or incorrect please.

    c4CDwEU.png

     

    This is the issue I see in Buldozer so any help is appreciated.

    pwrHlpE.png


  7. I'm still getting the issue of both sides ships appearing inside each other. I can't get one to delete itself while the other stays etc.. In EDEN iv'e made the layer invisible and want to make 1 and only one appear by script and it seems both layers unhide themselves regardless of the scripts controlling them.

     

    I'm even just trying to debug this in the debug console but nothing works like before.


  8. Hi there can anyone assist me with using layers to hide a selection of entities using boolean logic or variables for example.

    Right now I want to make a ship appear depending on the faction selected in the parameter screen. The wiki describes its many uses for the 3DEN layers like remove,add and set, it also describes the syntax but I'm finding it hard to get working correctly.

    Another thing I don't understand is, are the entities "linked" to the value -1 or is it "linked" to the "Enemy Base" String?

    vD4mpTI.png

     


  9. I get errors with the above code

     

    Should the end of that have a semi colon ?

    36 minutes ago, wozzsta said:

     

    _rankformoney = "COLONEL"

     

     

     

     

    Quote

    hint format[New Currency %1, GoldCurrency];

     

     

    Should this be

    hint format["New Currecny %1",GoldCurrency];

     

    Quote

    if(_killed isKindof "man") && (_rankformoney = rank _killed)then{

    Should this be ?

    if((_killed isKindof "man") && (_rankformoney = rank _killed))then{};

     


  10. 8 minutes ago, wozzsta said:

     

    Rather than using the targets init, which means you have to add that code to every unit u want a reward for, i would add an event handler to you initServer.sqf

     

    
    addMissionEventHandler ["EntityKilled", {
    
    	params ["_killed", "_killer", "_killerID"];
    	
    	if ((isPlayer _killer) && (alive _killer)) then {
    			GoldCurrency = GoldCurrency + 500;
    			hint format[New Currency %1, GoldCurrency]
    		};
    		
    	}];

     

    I get an error when i put that into my initServer.sqf. It says the _killed generic error in expression.


  11. Damn that was some great information there Grumpy. Id consider myself excellent with Java but somewhat ok with C#.

    Anyways I came up with this, can you tell me if it's wrong in some ways or all .

    Init.sqf

    GoldCurrency = 500;//Set the start amount of gold to 500

    Targets Init Field

    this addEventHandler ["killed", {_this execVM "onDeath.sqf"}];

    onDeath.sqf

    GoldCurrency = GoldCurrency + 500;
    hint format["New Currency %1",GoldCurrency];

    This works so now when the target is killed my currency updates but just curious is there more efficient ways of doing this i'm open to your critisim

     

    Many thanks

    -Irish

×