Weighted Chance for ANY Event | Unity Tutorial @sasquatchbgames
Weighted Chance for ANY Event | Unity Tutorial  @sasquatchbgames
Uploaded November 2023 | Updated November 2026, 3 hours ago
Show your Support & Get Exclusive Benefits on Patreon (Including Access to this project's Source Files + Code) - patreon.com/sasquatchbgames
Join our Discord Community! - discord.com/invite/aHjTSBz3jH

This is a really quick Unity tutorial where I'll show you how to fire random events based on weights you set in the inspector!
You can use it for loot drops, but honestly it could be used for just about anything since it's based on firing a random event.

I hope you enjoy!

Link to Download our FREE 2D Asset Pack:
assetpack.sasquatchbstudios.com
---
In need of some Unity Assets? Using our affiliate link is a great way to support us. It's free, and we get a small cut that helps keep us up and running: https://assetstore.unity.com?aid=1100lwgBQ
---

Link to the chest, coins, and health potion:
opengameart.org/content/jrpg-chests-16-32-64-and-128px-squared
opengameart.org/content/coins-set-01
opengameart.org/content/basic-potion-set

Contents of This Video: ------------------------------------------

00:00 - Introduction
00:57 - Setting up our random events with weights
03:46 - Setting up the code for the coins
05:28 - Setting up the code for spawning enemies
06:06 - Setting up the code for spawning a health potion

Who We Are-------------------------------------

If you're new to our channel, we're Brandon & Nikki from Sasquatch B Studios. We sold our house to start our game studio, and work full time on building our business and making our game, Veil of Maia.

Wishlist our Games:
Wishlist Veil of Maia! - store.steampowered.com/app/1948230/Veil_of_Maia
Wishlist Samurado!
store.steampowered.com/app/2343270/Samurado

Don't forget to Subscribe for NEW game dev videos every Monday & Thursday!

Follow us on Twitter for regular updates!
twitter.com/SasquatchBGames

#unitytutorial #unity2d #unity3d
Weighted Chance for ANY Event | Unity Tutorial20,000 Wishlists Later – The Story of SlimekeepWhy being a LAZY dev can actually be GREATWatch This BEFORE making Your First Indie Game!Save TIME and keep Inspector CLEAN with these11 Things You (Probably) Didnt Know You Could Do in UnityDay of INDIE GAME DEV - Day in the Life DEVLOGSo...Claude Just Cloned Hollow Knight in Under an HourFIRE Effect (for 2D and 3D) made in Unity ShadergraphGame Dev Life | Finding BalanceHow Game Designers LIE to PlayersThe BETTER way to test things using EDITOR SCRIPTING (Unity Tutorial)
Sasquatch B Studios |

Weighted Chance for ANY Event | Unity Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER