Serious Sam: Siberian Mayhem

Serious Sam: Siberian Mayhem

十分な評価がありません
Scripted Viewmodel Ammo Belt/See through magazine Handler
   
アワード
お気に入り
お気に入り
お気に入りから削除
Content: Weapons
Type: Additions
Other: Graphics
ファイルサイズ
投稿日
更新日
29.365 KB
4月28日 14時27分
4月29日 3時34分
2 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Scripted Viewmodel Ammo Belt/See through magazine Handler

解説
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.