Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Sign in to follow this  
rival_jf

Новый слот для предмета

Нужна помощь в понимании/исправлении ,что я делаю не так?

Дано:
Мод сибири , где КПК вставляется в слот ARMBAND и отображается на запястье игрока.


Добавил новый слот:
 

	class Man;
    class SurvivorBase: Man
    {
        attachments[]+=
        {
            "PDA"
        };
        class InventoryEquipment
        {
            playerSlots[]+=
            {
                "Slot_PDA"
            };
        };
    };
class CfgSlots
{
	class Slot_PDA
	{
		name = "PDA";
		displayName = "КПК";
		ghostIcon = "set:pda_icon image:icon_pda";
	};
};


В скриптах изменил аттачмент у КПК..

так же заменил слот аттачмента в конфиге у КПК на новый - PDA

 

	class ItemPDA: Clothing
	{
		scope=2;
		title="#pda_item_name";
		displayName="#pda_item_name";
		descriptionShort="#pda_item_desc";
		model="SyberiaScripts\data\pda\gear_pda_g.p3d";
		inventorySlot="PDA";
		itemInfo[]=
		{
			"Clothing",
			"Armband",
			"PDA"
		};
		rotationFlags=34;
		weight=210;
		heatIsolation=0.1;
		absorbency=0;
		repairableWithKits[]={5,2};
		repairCosts[]={30,25};
		itemSize[]={1,2};
		animClass="ItemPDA";
		oldpower=0;
		class ClothingTypes
		{
			male="SyberiaScripts\data\pda\gear_pda_m.p3d";
			female="SyberiaScripts\data\pda\gear_pda_m.p3d";
		};
		hiddenSelections[]=
		{
			"screen"
		};
		hiddenSelectionsTextures[]=
		{
			"SyberiaScripts\data\pda\ekraan_bc.paa",
			"SyberiaScripts\data\pda\ekraan_ok_co.paa"
		};
		attachments[]=
		{
			"BatteryD"
		};
		class EnergyManager
		{
			hasIcon=1;
			autoSwitchOff=1;
			energyUsagePerSecond=9.9999997e-05;
			plugType=1;
			attachmentAction=1;
			wetnessExposure=0.1;
		};

 

По итогу, КПК вставляется только в новый слот иконки на слоте работают (за кадром сделал), все отлично, но не отображается на запястье когда он в слоте.

Решается данная проблема добавлением 

 

class CfgNonAIVehicles
{
	class ProxyArmband;
	class ProxyArmband_DZ: ProxyArmband
	{
		inventorySlot[]=
		{
			"PDA"
		};
		model="\dz\Characters\Proxies\Armband_DZ.p3d";
	};
};

 

После, КПК в слоте PDA отображается на запястье у персонажа, но после последней манипуляцией повязки в слоте ARMBAND не отображаются на плече.

Что я сделал не так?

Пробовал в CfgNonAIVehicles через запятую добавить ARMBAND и PDA, но все равно работает только один из них. Также пробовал += но ничего не изменилось


Заранее спасибо!

 

Edited by rival_jf (see edit history)

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 2

возможно ты поменял ванильный класс class ProxyArmband_DZ: ProxyArmband. и сделал что inventorySlot[]= { "PDA" }; только пда. посмотри как в ванили идет  inventorySlot[]= и пропиши  inventorySlot[] += пда и слот повязок. Я в этом не сильно шарю, но может поможет.

Share this post


Link to post
Share on other sites



  • 1
9 часов назад, rival_jf сказал:

class CfgNonAIVehicles { class ProxyArmband; class ProxyArmband_DZ: ProxyArmband { inventorySlot[]+= { "Armband", "PDA" }; model="\dz\Characters\Proxies\Armband_DZ.p3d"; }; };


class CfgNonAIVehicles
{
	class ProxyArmband;
	class ProxyArmband_DZ: ProxyArmband
    {
        inventorySlot[]+=
        {
			"Armband",
            "PDA"
        };
		model="\dz\Characters\Proxies\Armband_DZ.p3d";
    };
};

Попробовал, шеврон показывается на руке, а КПК - нет

А к модели прокси не нужно указывать путь до пда ? у тебя идет inventorySlot[]+= { "Armband", "PDA" };  2 слота , а model="\dz\Characters\Proxies\Armband_DZ.p3d"; повязка. Может из за этого хз

Share this post


Link to post
Share on other sites
  • 1

Нашел решение - добавить прокси модели кпк в модель персонажа (bodyparts_above0.p3d) и в конфиге указать новый путь до модели персонажа с прокси:

class CfgVehicles
{
	class Man;
    class SurvivorBase: Man
    {
        attachments[]+=
        {
            "PDA"
        };
        class InventoryEquipment
        {
            playerSlots[]+=
            {
                "Slot_PDA"
            };
        };
    };
	class SurvivorMale_Base: SurvivorBase
	{
		model="SyberiaScripts\data\bodyparts_above0.p3d";
	};
	class SurvivorFemale_Base: SurvivorBase
	{
		model="SyberiaScripts\data\bodyparts_above0.p3d";
	};
};

class CfgNonAIVehicles
{
	class ProxyAttachment;
	class Proxygear_pda_m: ProxyAttachment
	{
		scope=2;
		inventorySlot="PDA";
	};
};

 

Edited by rival_jf (see edit history)

Share this post


Link to post
Share on other sites
  • 0
1 час назад, WiLDman сказал:

возможно ты поменял ванильный класс class ProxyArmband_DZ: ProxyArmband. и сделал что inventorySlot[]= { "PDA" }; только пда. посмотри как в ванили идет  inventorySlot[]= и пропиши  inventorySlot[] += пда и слот повязок. Я в этом не сильно шарю, но может поможет.

class CfgNonAIVehicles
{
	class ProxyArmband;
	class ProxyArmband_DZ: ProxyArmband
    {
        inventorySlot[]+=
        {
			"Armband",
            "PDA"
        };
		model="\dz\Characters\Proxies\Armband_DZ.p3d";
    };
};

Попробовал, шеврон показывается на руке, а КПК - нет

Edited by rival_jf (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.