|
Post by gnemnij on Sept 25, 2018 8:12:15 GMT
I am trying to create an particle object (blood) on hit. I thought the Open Event button could give me some luck but I was so confused about that part and looking at the code doesnt solve me the problem (I am newbie to coding).
Could anyone provide an example for me about how to use that function or give me one example of what I am trying to achieve?
Thanks!
|
|
|
Post by Invector on Sept 25, 2018 11:31:32 GMT
Use the HitDamage Particle component ;)
|
|
|
Post by gnemnij on Sept 25, 2018 11:38:48 GMT
Use the HitDamage Particle component ;) Thanks I found it. But still, I would really like to see a simple guide on how to use the event functions in this template make more things possible.
|
|
|
Post by Invector on Sept 25, 2018 16:27:21 GMT
Well with Events you can access pretty much any public method of a component, like collider, rigidbody, custom scripts... We explain a little bit about in this video:
|
|
|
Post by darknubis365 on Oct 27, 2018 5:43:22 GMT
So basically this can be use for something like chopping a tree for a quest or harvesting. And i second on the video about using events more so about things like bool is enabled and such.Most of the stuff seems kind of straight forward but some list in events i look at with the O.o face like which way do i go as a newbie haha
|
|
|
Post by shadex on Oct 27, 2018 8:50:17 GMT
Use the HitDamage Particle component ;) Thanks I found it. But still, I would really like to see a simple guide on how to use the event functions in this template make more things possible. The easiest way to use events is in the component, hit the + sign, drag a gameobject with a script that has a function you want to use during that event. So like on vAxe there is an OnHit() event. If you have a script that has a function that shakes the screen, and set it to the OnHit() event, it will shake the screen every time you hit. You can also subscribe to them in code, but this is usually what people want to know.
|
|