- Home /
Error BCE0019
Well i'm very new to this and i want to make a bouncy platform that my player can jump on. I have looked the script up and i wrote everything in, but when i go out of it and try to play my game a error comes up and says: BCE0019: "Movement" is not a member of "UnityEngine.Component"
Here is my script:
var BounceAmount : float; //How high should we bounce?
function OnTriggerEnter(other : Collider){ //Bouncy trigger
if(other.tag == "Player"){ //Is this the player?
var P = GameObject.FindGameObjectWithTag("Player"); //Grab the player object
//Access CharacterMotor Script
//Set vertical speed of movement to bounce amount.
P.GetComponent ("CharacterMotor").movement.velocity.y = BounceAmount;
}
}
I don't know what to do so please help me.
Comment
Answer by robertbu · Mar 15, 2014 at 03:32 PM
Remove the quotation marks from your GetComponent call:
P.GetComponent (CharacterMotor).movement.velocity.y = BounceAmount;
Your answer
Follow this Question
Related Questions
Rigidbody help 0 Answers
Can't reactivate object 1 Answer
Player using turret problem 1 Answer
Invalid SceneHandle 0 Answers
How to add OnClick listener in script to see it in inspector? 1 Answer