Тёмный

Weighted Chance for ANY Event | Unity Tutorial 

Sasquatch B Studios
Подписаться 40 тыс.
Просмотров 3,3 тыс.
50% 1

Show your Support & Get Exclusive Benefits on Patreon (Including Access to this project's Source Files + Code) - / sasquatchbgames
Join our Discord Community! - / discord
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:
veilofmaia.com/tutorial-asset...
---
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: assetstore.unity.com?aid=1100lwgBQ
---
Link to the chest, coins, and health potion:
opengameart.org/content/jrpg-...
opengameart.org/content/coins...
opengameart.org/content/basic...
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/19...
Wishlist Samurado!
store.steampowered.com/app/23...
Don't forget to Subscribe for NEW game dev videos every Monday & Thursday!
Follow us on Twitter for regular updates!
/ sasquatchbgames
#unitytutorial #unity2d #unity3d

Игры

Опубликовано:

 

2 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@sasquatchbgames
@sasquatchbgames 9 месяцев назад
Something that could be added is a check that at least one of the events has a probability greater than 0. The first event will always fire if the values are all 0
@iiropeltonen
@iiropeltonen 9 месяцев назад
Quick Unity Tip. The SPACE attribute takes an int parameter so you don't need several ✌️
@RiosheGames
@RiosheGames 9 месяцев назад
Very helpful and easy to extend, Thank you for sharing!
@Ironroc
@Ironroc 9 месяцев назад
Hey good timing, I was just about to try and figure this out for breaking crates in my game. Thanks!
@TheKr0ckeR
@TheKr0ckeR 9 месяцев назад
We might also use Random.value in that case since it gives a random value between 0-1. Thanks for the great tutorial.
@markguyton2868
@markguyton2868 9 месяцев назад
I don't know if I'm smart enough to figure out how to translate this from unity to godot, but it is a good tutorial nonetheless.
@MoAtreides
@MoAtreides 8 месяцев назад
You are, just don’t give up
@angelrubiov
@angelrubiov 9 месяцев назад
Timestamp for the actual weighted chance code?
@Coco-gg5vp
@Coco-gg5vp 9 месяцев назад
first
Далее
🔴Ютуб закрывают... Пока?
00:39
Просмотров 1,2 млн
Be CAREFUL with Scriptable Objects!
8:27
Просмотров 78 тыс.
Everything about RANDOMNESS in Godot
11:34
Просмотров 9 тыс.
ADHD and Game Dev
16:06
Просмотров 793
How to Code (almost) Any Feature
9:48
Просмотров 670 тыс.
How I Would Start Gamedev (if I had to start over)
9:02
How to Manage In-Game Time [Unity Tutorial]
16:11
Просмотров 24 тыс.
How I Made a 3D Platformer in 2D Game Engine
21:23
Просмотров 456 тыс.