Which of these should I edit so that the soldiers in custom profile carry a knife, but not the other weapons?

image
In the map we are making, the weapons are picked up in the melee slot, but since they are unarmed it looks weird and when picking something up it doesn’t do the weapon change animation and you have to select it manually by pressing 4 or the mouse wheel,

so for the convenience of the players I want to give them a knife so when they pick up the weapon it will change automatically

If someone asks: why there?

Because in the mode you can only carry one weapon, and there is a sword, the swords did not work in slot 1 or 2 so it was put there

weapons are picked up in the melee slot, but since they are unarmed
it doesn’t do the weapon change animation

Darkflow never made an animation when you’re unarmed. You can force melee weapons to be equipable to primary slot.

Edit weapon with entities.blk and add the following:

  "item__weapSlots:array"{
    slot:t="primary" 
    slot:t="secondary" //delete this line, if you want the item to be equipable to primary only.
  }

Or copy this. This should make every melee weapon to equip to the main two slots only:

item_melee{
  _override:b=yes
  _use:t="item"
  _use:t="gun_anim_vars"
  item__ui_priority:i=1
  item__lootType:t="melee"
  gun__propsId:i=-1
  dropTm:m=[[0.0, 0.0, -1.0] [1.0, 0.0, 0.0] [0.0, -1.0, 0.0] [0.0, 0.03, 0.0]]
  melee_weapon__propsId:i=-1

  "animchar__actOnDemand:tag"{
  }

  "item__weapSlots:array"{
    slot:t="primary" 
    slot:t="secondary" //delete this line, if you want the item to be equipable to primary only
  }

  "disallowUseInHoldGunMode:tag"{
  }
}

AFAIK by default, weapons are made to be equipable to primary and secondary slot.

1 Like

I gave him a player profile that should only contain the knife in melee slot when player spawns. But it doesn’t give the knife
We are working together on the same map
Can you help check whats wrong?
player_profile.txt (24.4 KB)

Works for me:

:man_shrugging:

In the squad selector, it will always say unarmed, but that’s irrelevant, you do spawn with knife.

2 Likes