← Home SEEBIE90 DOCS
Download PDF
The KRISS Vector mod is published under the Backblast Studios licenseExample code on this site is free to useBug reports: Backblast Studios DiscordLicense

KRISS Vector

Independent selector levers New

The vanilla weapon has one selector with the safety as one of its positions. The Vector has two parts that move separately.

In plain wordsA safety and a fire selector that are two real parts: two bones, two clips, and a small state that remembers the fire mode while the weapon is safe.

Two bones

Each lever is a bone of the weapon skeleton, with the pivot at its screw. The fire mode lever follows the weapon fire mode, the safety lever follows safe and fire. Each has its own clip: the fire mode clip has positions for single, burst and auto, the safety clip has two.

In the vanilla graph the safe position replaces the fire mode: while safe, the current mode reads as “safe” and the front lever would jump. The weapon should keep showing the mode it was in.

Script remembers the last real fire mode→Spare float variable on the character graph→Weapon graph: safety lever uses the safe state→Fire mode lever uses the remembered value
Example code – free to useMyGun_Mode.c
protected void UpdateMode(BaseWeaponComponent weapon)
{
	EWeaponFiremodeType type = weapon.GetCurrentFireModeType();
	if (type != EWeaponFiremodeType.Safety)	// keep the last real mode while safe
	{
		m_fMode = 0;				// single
		if (type == EWeaponFiremodeType.Burst)
			m_fMode = 0.5;
		else if (type == EWeaponFiremodeType.Auto)
			m_fMode = 1;
	}

	m_Anim.SetSharedVariableFloat(m_ModeVar, m_fMode, true);
}

Checks