- Home /
Question is off-topic or not relevant
How to trigger a Script from an Object.
Hi all,
I'm wanting to trigger the Motion Blur script by walking into an object in my game. It is set on two levels and the idea is the game starts without motion blur and when you bump into this said object it will trigger the script and turn motion blur on, so from that point the motion blur is activated.
I am very new to Unity and all things script based so I would appreciate a straight forward script that I can apply to my scene.
Hope you understand what I mean,
Thanks in advance!
It's not very good form to ask others to write scripts for you. Also, this question has been answered plenty of times (how to call a script when the player, or any game object, collides with another game object).
Essentially, you'll need rigidbodies, colliders, an OnCollisionEnter method, a reference to your $$anonymous$$otion Blur script, and a timer after which to disable it.
Rather than, say, googling for similar questions and learning how to do it yourself? Did you think you were the first to ask this?
UA is not a script writing service, and your question includes multiple technical issues. @iwaldrop lists some places to start your research. There are tens of thousands of scripts on this site dealing with collisions and actions. Try out some scripts. If you get stuck with a specific script or specific technical issue, open a new question.
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
I want my trigger sound only to play once! 0 Answers
My health decreases to fast. 1 Answer