Introduction
This is a guide on how to use my First Unholster script for your weapons in Ravenfield!
Requirements
Everything you need to make a Ravenfield weapon (Unity, Tools Pack with Ravenscript support)
My First Unholster Unity Assets Package right here[drive.google.com]
An audio editing program, such as Audacity (I'll explain why this is particularly important later)
Six free-range eggs
What Is A First Unholster?
Basically, a different animation that plays when you first unholster the weapon than when you unholster it every other time.
Many weapons in Ravenfield have beautiful unholster animations involving bolt pulls, shotgun pumps, slide pulls, and other round-chambering goodness, but sometimes it doesn't make sense to have it play every time you pull out the weapon.
Or maybe you just want to make an impact when somebody equips your weapon for the first time! There's plenty of reasons to have a First Unholster animation, and this script/guide facilitates that for your weapon!
Step One: Importing The Unity Package
Follow this link to the Unity Assets Package containing everything you'll need: https://drive.google.com/file/d/1x-TbTpqT29v034fqSDsCoIL8UE-TaG9N/view?usp=sharing
Ignore all the folder stuff - I guess Google Drive can actually open Unity Package files as a directory, but you'll need the whole thing.
Once you've downloaded it, open up the Ravenfield Tools Pack, hit Assets/Import Package/Custom Package, and navigate to the pack you downloaded.
When prompted, click OK, and it will import the necessary elements into your Assets library.
Step Two: Housekeeping Things
So! You've got a weapon that you want a First Unholster on.
(for this example, I will be using my HK11)
You'll need two things on your weapon for it to work:
1.) An animation state on your weapon's Animator VERBATIM named "First Unholster", without the quotes. The name needs to be exact, otherwise the script will not pick it up. Also, be sure to create a transition from it to your Hip state.
2.) An audio source object in your weapon's hierarchy. This audio is what will play when your First Unholster animation plays, in the same manner as the Reload Audio works in vanilla.
Step Three: Copying The Component
Alright, let's get the scripted behavior component onto your weapon!
In your Assets Library, in Assets/Prefabs/Published Scripts, there is now a prefab called FirstUnholsterScriptPrefab. Select it.
In the Inspector, you will see this Scripted Behavior Component.
Right click on the title Scripted Behavior (Script), and hit Copy Component
Now select your weapon in the scene, right click on Transform in the Inspector, and hit Paste Component as New.
Step Four: Plugging Your Weapon In
Now that the component is on your weapon, all that's left to do is drag your first unholster's Audio Source into the scripts target named "firstUnholsterAudioSource".
Now, this next part is kind of important.
The length of your First Unholster's audio clip will determine how long the unholster actually is.
If you feel your audio is causing your unholster to take too long, try:
1.) Trimming down the Audio Source's audio to be shorter
2.) Make the Audio Source's audio silent (not empty), and use the vanilla Sound Bank on your weapon animations to play your sounds.
That's It!
Test your gun out - if all goes well, your First Unholster animation should play when you first pull the gun out... and no other time.
This animation will reset either when you die or use another mod to select another gun, such as the Gun Game mutator or the Loadout Change mutator.
Please let me know if you hit any problems in this guide, I'd be glad to help!
Source: https://steamcommunity.com/sharedfiles/filedetails/?id=2196723488
More Ravenfield guilds
- All Guilds
- - Ravenfield
- RAVENFIELD THE SERIES: SEASON 2
- WHAT TO DO AFTER QUIT RAVENFIELD
- Railgun
- Ravenfield?
- Beginner's Guide to Map Design
- Ravenfield - Landing Gear Troubleshoot
- Ravenfield - Secret Weapon Locations
- Ravenfield - Helicopter Guide