- Home /
How to add a seconds when you destroy the object ?
please help me !! can you give me a code A complete code to how to program that compute adding when you destroy the object. example once you destroy the object, 10 seconds will add in your time. i hope someone could help me .. Godbless .
This isnt charity. This is not a "Ask and give" website and it is not supposed to be used for others to write your code. It will not help you learn if we do the hard part for you.
Well, I think that's a bit harsh. I think we can help if we have a bit more info. There are a number of ways to do what you want. Do you want to destroy an object, then wait 10 seconds before doing something else? Or do you want to add 10 seconds to some other timer for another purpose? We'll need to know more about what you're trying to accomplish.
Answer by creative72 · Feb 06, 2011 at 05:46 AM
if i understand what you are wanting to achieve(adding 10 to a timing script) you have to send data from the script to where ever your timing script is exp:
in the script under the function where the object is being destroyed you would place
SendMessage ("the name of a function", amount of time);
in the time script
function "the name of the function"(time:float)`{
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613102948im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to destroy in an amount of time 1 Answer
Destroying object using his name and raycast 2 Answers
destroy object on collision 1 Answer
using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers
Cycle Textures Over Time 2 Answers