Domestic Violence and Abuse
thanks for the videos!
great video as always
What is the difference between using interface for calling damage, compared to just using SendMessage and/or BroadcastMessage and such?
Ohhh I definitely need a tutorial about shaders, especially that cell shader you used in your Borderlans clone Minilands. Nice video btw. 🙂
thanks! Great Series! When is the next video coming out? 😀
hi Sebastian, how I can write pathfinding in spherical world,The reason I want enemies on the spherical world to get away from objects and the search for a better way
Great. Thanks Sebastian
Hi, you make so awesome tutorial! I am wondering why the UpdatePath method could be still running altough the gameobject was destroyed!?
Thanks Sebastian! Really enjoying this series.
this is just what i needed to learn for my project. Are you gonna be covering the part where the enemy shatters into small pieces when they die in this tutorial as well?
Hi. been hooked on your tutorial series. Very entertaining and informative to watch. A little nitpick though with this one 🙂 Its better to use an obj pool for projectiles rather then instantiating them every time you shoot (plus the fly off the level for an eternity thingie). And last, which I guess is just an oversight but the enemy doesn't have a rigidbody which will cause performance issues when it has to update its collision every frame. Really looking forward to future videos. Take care!
Why make Player & Entity inherit from LivingEntity ? As you've shown, it obliges you to override Start() and call the base Start() manually. Why not just make LivingEntity a component and compose Player & Entity with it ?
Hey would you be able to fix my Rig character i will promote your channel if you get it fixed 🙂
I am getting an error in the projectile script
Assets/Scripts/Projectile.cs(32,55): error CS0309: The type `IDamageable' must be convertible to `UnityEngine.Component' in order to use it as parameter `T' in the generic type or method `UnityEngine.Component.GetComponent<T>()'
+Anshu Jalan i had the same problem but i just changed the IDamageable with LivingEntity and it has the same effect (does not bring errors) idk does it affect the game later but for now it works for me 😀
thanks man, this is really addictive
why don't u just use ontriggerenter/oncollisionenter instead of raycasting
+Putheaith Thao Check out Learning C# Programming with Unity 3D over at Amazon. It's a great book for beginners. http://www.amazon.com/Learning-C-Programming-Unity-3D/dp/1466586524
I'm having a problem when adding the layer to the enemy…. he disappears off the scene window. when I select him in the project tab he pops up but looks like a mesh and no green material, and then when something else is clicked on he again disappears. it doesn't have any affect with anything , just annoyed that I cant see him properly. any suggestions on what I'm doing wrong. thanks for any repliesI'm using Unity 5.2.1f1
Hey Sebastian! Great video as always, I'm an avid watcher, but I'm having an issue. A little bit before the 830 mark, you demonstrate how the enemy will disappear if they lose health, but in my program, nothing happens, the bullets pass right through and they don't die. I have everything coded exactly as you do, have the same version as you do, I just don't know what's happening. Any ideas?
Thanks great tutorial as always! Is there any reason why you never use Awake function for getting GameObject's components or some initialization. I'm pretty new to Unity so it's maybe a newbee question. I understand that Start is the right place to be sure that all objects have been instantiated and obvious in lot of your scripts, but is there an overload or bad practices to use Awake and Start together? Thx.
please help, in LivingEntity.cs , it keeps saying Inexpected Symbol 'GameObject' , ive tried to fix but it wont fix!ive also checked your code aswell!
is it normal if my player is not loosing health
I cannot die, like i can kill enemies but they cant kill me
Hey guys, this is pretty urgent because I can't continue with this problem. Whenever I try to run the thing (i've done everything up to 8 minutes) i get the error Assets/Scripts/Projectile.cs(36,30): error CS1061: Type `iDamageable' does not contain a definition for `TakeHit' and no extension method `TakeHit' of type `iDamageable' could be found (are you missing a using directive or an assembly reference?)and, not only that, I also don't have the option to set the enemy or the players health (like sebastian does at 8:16 )
IDamageable could not be found?
These tutorials are some of the best I've seen, Sebastian uses many OOP concepts for the ones learning ie. the use of interfaces and the protected modifier, Thanks Sebastian!
:S … Issue:Assets/Scripts/LivingEntity.cs(4,42): error CS1721: `LivingEntity': Classes cannot have multiple base classes (`IDamageable' and `UnityEngine.MonoBehaviour')
Your coding style is very elegant, I have trouble thinking in OOP that smoothly. Nice work
"…and if we're not already dead, okay; then we can die." -Sebastian Lague, 2015
I have got an erro :`IDamageable' must be convertible to `UnityEngine.Component' in order to use it as parameter `T' in the generic type or method `UnityEngine.Component.GetComponent<T>()'
I learned your tutorial with Unity4.6,
Anyone with this error? 🙁
Classes cannot have multiple base classes (`UnityEngine.MonoBehaviour' and `IDamageable')
heehhehe Dont wory if you dont familiar with interface , you will be shortly 😀 Man that was funny 😀
why you use Gameobject.Destroy(gameObject) instead of Destroy(gameobject). Also still somehow bullets miss my enemy :'( times to times not all times but somehow. Not like randomly miss on same angle it miss 100%
For anyone wondering if public startingHealth is necessary, if you just want to let it show up in the inspector, you can actually use[SerializeField]protected float health;
my enemy just won't die
Bug FREEZE CRASH + Solution:So I had a freeze bug that cropped up about 1/3 times I played the game. I traced the problem back to the Enemy script's while loop. I found that putting the two tested conditions (target != null && !dead) into the same conditional statement removed the bug. I've played 10 times crash free. Hope that helps anyone with the same freeze crash I had.
Also, Sebastian you're great!
Assets/Scripts/Projectile.cs(39,30): error CS1503: Argument `#1' cannot convert `IDamageable' expression to type `float' (im using unity version 5.3.4p6, pls help, thx)
my enemey not die why~~~~~~~~~~~~~????????????
it says the symbol '66' does not exist. pls help!
why insert to !dead in while loop syntax?.. i think insert '!dead' code in while condition syntax
Greate!!! thank you , I learned a lot from you.
Hi Sebastian, thanks for the great tutorial! I've had a problem though and wonder if you might know what's causing the problem. When I run the game, for some reason the player can't shoot the gun until the enemy is either very close or on him. Shoot then works. I've gone through all the code and checked it's all right and seems fine so must be some kind of setting in Unity. Any ideas?
When you do IDamageable damageableObject = hit.collider.GetComponent<IDamageable>();Does that return the enemy script when the enemy is hit or the IDamageable script attached to the enemy?
Thanks for the great tutorial. One thing I don't understand: IDamageable damageableObject = hit.collider.GetComponent<IDamageable> (); damageableObject.TakeHit (damage, hit); // why would you GetComponent<IDamageable> to access TakeHit() ? Can't we just GetComponent<LivingEntity> ? LivingEntity class also has TakeHit().
PLZ HELP ASAP! I CAN'T CONTINUE WITHOUT THESE ERRORS BEING SOLVED!! thanksliving entity does not implement interface member Idamagable.takehit (float, Unity engine. vector3, unity engine. vector 3
living entity does not implement interface member Idamagable.takedamage (float)
projectile cs(33,20) no overload method 'take hit' takes '1' arguments
Thank you, so much. you are doing very wonderful things.
In Unity 5.6 It wont highlight the RacastHit in the TakeHit method, why?
is this like a custom component so anyobject that has this can take damage or am i not seen something ?
Thank you !!!!!
Would it be better to just use unity events instead of IDamageable Interface for handling Enemy hits?
In the IDamageable script, Monodevelop doesn't acknowledge "RaycastHit" as existing – how do I fix this?
the object does not destroy please help
why my enemy not die?
Hello all and thanks for the tut and helpers too. is someone find how to solve the error message "Assets/Scripts/IDamageable.cs(5,10): error CS0531: `IDamageable.TakeHit(float, RaycastHit)': interface members cannot have a definition"
could one use delegates without an interface here for a damage system?
also, look back on this, would you favor composition over inheritance for the health system? Any time i've tried to use inheritance it tends to get out of control real fast, what do you think?
I was trying to avoid using Unity 5 for this project because it's harder on my laptop than Unity 4.
The line "IDamageable damageableObject = hit.collider.GetComponent<IDamageable>();" Doesn't work in 4 but does in 5. Why?
I watched "Inheritance" and "Overriding" on Unity3D's website to gain an HUGE understanding of what's going on here. I see the pattern going on here now. At first I was lost and scatterbrained; merely typing and following along. After watching those two videos I have some kind of guidance now.
These are the only tutorials I watch at 1x
my player doesn't follow the enemy in direction instantly. it's a bit slow do you know why? and how can i increase that
how do I get my player to kill the enemy. P.S the bullet are going through my enemy
I did everything like in the video but my enemy wont die. He only stopps moving after i shoot itplz help
What is the benefit of using 'private' or 'protected' instead of 'public'?
You are Amazing
Why you have to use virtual and override to call base.OverridenMethod() ? Is it fine if without virtual and override keyword just simply call base.Start() in this case? I can see there isn't a compile error.
"if we die, we are indeed dead" – Sebastian Lague, 2015
why creating interface IDamageable although we use LivingEntity class ?
5:47 isn't this a great time to use house Greyjoy's words "What is dead may never die" ?
Why do you need TakeHit method of IDamageable? there is same method in LivingEntity. Why cant we use GetComponent<LivingEntity>? instead of interface?
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.