How to create a Damage Over Time Handler - Unity

  Рет қаралды 12,149

Dapper Dino

Dapper Dino

Күн бұрын

Пікірлер: 16
@HoodStrats
@HoodStrats 6 жыл бұрын
My favorite part about your vidz is that they're not super rehearsed. We get to see you mess up and the thought process behind it all. Really helps with the learning tbh.
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 6 жыл бұрын
When I started making the videos that was my intention :) I think it's better than having a fast, perfect video because that's not what coding is actually like. If I get stuck for like 10+ mins then I'll stop and start the recording again haha.
@toot8208
@toot8208 Жыл бұрын
you're literally so cool, thank you for this
@bigbird180
@bigbird180 2 жыл бұрын
As always, a bloody brilliant video! cheers mate.
3 жыл бұрын
"Paint is the best tool to explain things" - GOD
@andreskushnir2356
@andreskushnir2356 6 жыл бұрын
Very informative and useful. Thank you!
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 6 жыл бұрын
No problem :) I'm glad you found it useful
@Husmanmusic
@Husmanmusic 3 жыл бұрын
Awesome Tutorial!
@jehreetv
@jehreetv 5 жыл бұрын
Question, why is the For Loop inside of the While Loop necessary? And does that For Loop finish before the While Loop finishes a single loop, or are they looping simultaneously? I would think that you could just decrement the burnTickTimers.Count in the While Loop without the For Loop.. super confused x.x
@DapperDinoCodingTutorials
@DapperDinoCodingTutorials 5 жыл бұрын
It's because if there are multiple burns on the target I only want to deal damage from one of them, not all 3. In about a month's time when my exams are over I will be remaking a lot of my older videos to be better/more efficient/more expandable and it's very likely that I will be covering this again.
@xxyv
@xxyv 3 жыл бұрын
whats your main on league
@DustinjBailey
@DustinjBailey 4 жыл бұрын
So how do you stack burns.?
@daredeflon662
@daredeflon662 3 жыл бұрын
You could create a script that handles only Damage Over Time effects and you could have a dictionary of Damage Over Time Effects. Basically you would start the DOT coroutine multiple times. The reason you would need a Dictionary is that you can keep track of every DOT in case you will have a spell like Dispel where you can remove some or all dots.
@jakubwozniak6405
@jakubwozniak6405 2 жыл бұрын
Instead starting coroutine only if burnTickTimers
@daredeflon662
@daredeflon662 Жыл бұрын
@Ghost Phoenix I strongly suggest looking into Dictionaries in the Unity documentary, It's a pretty simple yet resourceful tool which allows you to assign values to keys. Key and values can be virtually any type. For example you can have "string" keys for "int" values, or "int" keys for "bool" values or you name it. Basically you can make a dictionary which has "Coroutine" type keys and "IEnumerator" values. and you can assign coroutines to Keys to keep track of them. Whenever you want to remove a DOT ( an active coroutine ) you refer to its key. If you have any questions, feel free.
@jeremyelliott5279
@jeremyelliott5279 Жыл бұрын
I know this is 4 years into the future... but once my character "dies" and respawns the coroutine is still running until the timers are finished. What would i do if i wanted to stop the coroutines as soon as i respawn? Edit: if you want to stop the routines once your player dies, here is an example of what i did damageTickTimer.RemoveAll(i => i == 0 || healthScript.currentHealth
Making MULTIPLAYER Games has never been EASIER!
12:49
Code Monkey
Рет қаралды 83 М.
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 7 МЛН
PIZZA or CHICKEN // Left or Right Challenge
00:18
Hungry FAM
Рет қаралды 16 МЛН
Interface Damage
11:15
Jason Weimann (GameDev)
Рет қаралды 14 М.
How to make a HEALTH BAR in Unity!
21:06
Brackeys
Рет қаралды 1,1 МЛН
Game Architecture Tips - Unity
19:52
Dapper Dino
Рет қаралды 143 М.
How to Manage In-Game Time [Unity Tutorial]
16:11
Comp-3 Interactive
Рет қаралды 25 М.
How to Build A Save System in Unity
9:41
Game Dev Guide
Рет қаралды 172 М.
How to create Health Bar in Unity
6:31
PitiIT
Рет қаралды 4,9 М.
Game Architecture Tips - Practical Uses Of Scriptable Objects
14:45
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 7 МЛН