|
Translation: I'm not a really good programmer and I'm trying to make my character 'die' when he falls on lava. How would I go forth doing this? Original Message: i am making a game where if the character touches the lava he dies...now i am horrible...HORRIBLE with scripting for right now so i really need help with how to do this...PLEASE HELP!!!
(comments are locked)
|
|
// A grenade // - instantiates a explosion prefab when hitting a surface // - then destroys itself
http://unity3d.com/support/documentation/ScriptReference/Collider.OnCollisionEnter.html http://unity3d.com/support/documentation/ScriptReference/Object.Destroy.html
(comments are locked)
|
|
If you have the code in place for your character dieing, you only got to call that function. So basically you would create something like: And then for the touching itself, you would need a collider, but I haven't worked with those yet. (The basics should be in the link Robert posted.)
(comments are locked)
|

Batman, I think you're just too old for it, buddy.
[Flame Post]
Geez, when I read that title I thought someone was gonna get killed!!!!!!!!!!!!!!!!!!!!!!
smh......^^^^^^
What I'm saying is, I remember when you were really good at using your batputer. It's time to move on to cursing the kids on the Wayne Manor lawn, old-timer.