Serious Sam: Siberian Mayhem

Serious Sam: Siberian Mayhem

Nedostatek hodnocení
Scripted Viewmodel Ammo Belt/See through magazine Handler
   
Ocenit
Přidat do oblíbených
Oblíbeno
Odebrat z oblíbených
Content: Weapons
Type: Additions
Other: Graphics
Velikost souboru
Přidáno
Aktualizováno
29.365 KB
28. dub. v 14.27
29. dub. v 3.34
Poznámky ke změnám (2) – zobrazit

Klikněte na „Odebírat“ pro stažení položky
Scripted Viewmodel Ammo Belt/See through magazine Handler

Popis
This workshop item is only a script and is intended to help mod creators.

Description: This workshop item adds a script for the gradual disappearance of bullets while shooting, you may have already seen its work in the PKM weapon. Weapon Resource from Bazar.

Tutorial:

1. Preparing the Bullets in Mesh

- In the original model, the bullets are combined into one single mesh and use one shared material.
- To make individual disappearance work, you need to separate the mesh into multiple elements, such as `patron_1`, `patron_2`, etc.
- After splitting, you can assign individual shader modifiers to each bullet while still using the same material (e.g., `Bullet11.mtr`).
- Also, make sure that "Alpha Test" is enabled in the material — this is required for the bullets to become visually invisible when their alpha is reduced.

- NOTE: You don't need to create separate `.mtr` files for each bullet — just one shared material is enough. Each bullet will have unique behavior through modifier values.

2. Configure Shader Modifiers in the material

- In the Shader Modifiers section, add the following:  
1. Constant:      
- Destination: fBullet11Disappearance      
- Value: Float    
- FloatValue: 0  

2. Gradient modifier (HDR RGBA):    
- Destination: ColorModifier  
- Input: fBullet11Disappearance      
- Configure the gradient:        
- 0 — bullet is visible;        
- 1 — bullet disappears (alpha transparency).

-NOTE: The second image shows necessary values ​​for correct work.

Repeat this step as many times as you need changing the number in fBulletXDisappearance.

fBullet1Disappearance is the last bullet in line to disappear, and from fBullet2Disappearance to fBullet50Disappearance will be the first, depending on how much you use fBulletXDisappearance.

3. Add events to the animation
-In firing animation, add the following:  
- Frame 0 → Global script event: Event (Fired) 

-In FireEvents/FireEvent animation, add the following:
- Frame 0 → Global script event: Event (Fired)   
- Frame 1 → Global script event: Event (Fired)   
- Frame 2 → Global script event: Event (Fired) 

-In Reload animation, add the following:
- Frame where you want the bullets to appear → Global script event: Event (Reload) 

-In Activate animation, add the following:
- Frame 0 → Global script event: Event (Activate) 

Do the same thing for SingleArm animations and you are done.

If some how 50 disappearing bullets isn't enough for you you can edit this script and add more just don't forget to resave it.