|
whats wrong with my script ...i want the enemy to take 100 damage then the GUI pops up then when you press the button the enemy gets destroyed left with a dead replacement..like a ragdoll
(comments are locked)
|
|
If this script is on the enemy, you are destroying the enemy before you are finishing your code. Once you destroy it, it can no longer execute the code. Also, you are calling function OnGUI, but OnGUI is always called anyway. In the future, please try not to ask "whats wrong with my script" but instead, tell us what you intend to do(as you did) and tell is what it is actually doing. Let me know if that worked for you. no the script is attached to the player.....
Jun 17 '11 at 11:34 AM
cocopuffs
then you add the enemy from the hieriach to the
Jun 17 '11 at 11:36 AM
cocopuffs
(comments are locked)
|
|
sorry forgot to mention this is a math game so when the cube/enemy takes 100 damage a GUI pops up with a multiple choice math question...and if you answer right the enemy gets destroyed and replaced with a dead replacement like a ragdoll:) ....and if you answer wrong nothing happens yet..everything works but i cant get the cube to show the question only when it takes 100 damadge:(
(comments are locked)
|
