|
Hello, this is a basic question, but if I want to have a trigger (button, collision, etc.) to activate another script, how would I do that? How would I limit the amount of time the script would be activate? An example would be: The player hits a button and a "constant force" script is activated for 5 seconds (to simulate nitrous oxide in a car). Thanks.
(comments are locked)
|
|
Would it be something like this you are looking for? While a NOS type boost was one of the things I had in mind, I meant triggering a completely separate script that is in the scene. Also, I am new to unity, so I dont even know what to do with your script (how would I make it work)?
Nov 05 '10 at 04:26 AM
Tyler 2
You would use gameObject.AddComponent(TheNameOfTheScript); But if you are that new to unity, I would suggest poking around in the http://unity3d.com/support/documentation/ScriptReference/
Nov 05 '10 at 04:33 AM
Atnas1010
(comments are locked)
|
