- Home /
How to script a response to an instantiation?
Say I had an object which will be instantiated. How would I get another script to respond to this event?
To put it into context - I have an automatic gun and I want the gun to recoil on each bullet. How would I do this?
it's possible you're simply looking for the "Start()" function which you can use in the script attached to the new thing. in there, you could enact the other, err, realities in your $$anonymous$$d. Hope it helps!
Answer by Bunny83 · Sep 20, 2012 at 10:53 PM
You usually do this just right after you instantiate the bullet. The instantiation of a second object has not really something to do with the gun itself.
Your answer
![](https://koobas.hobune.stream/wayback/20220613081303im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Camera Recoil,Please help me. 2 Answers
Troubles With A Shoot Script 1 Answer
Bullet Hole not inline with sight?(Center of Screen) 1 Answer
My bullets wont work when i shoot them 0 Answers
Problem doing a script. 2 Answers