Hallo good people I'm new to Unity and Java but I'm trying hard :P I want my platform (MovingPlatform1) with attached script named "PlatformMoverY" to be trigged - collision with the trigger should change var "isMoving" to true. Script "PlatformMoverY" works perfectly, I manualy switch "isMoving" to true or false and it's OK. Here is script for the trigger, I don't know what's wrong
var movingPlatform : GameObject;
function Start(){
movingPlatform = GameObject.Find("MovingPlatform1");
}
function OnTriggerEnter (other : Collider) {
var PlatformMoverY : ScriptName = gameObject.GetComponent(ScriptName);
if(other.gameObject.CompareTag("Player")){
PlatformMoverY.isMoving = true;
}
}
I'm siting on it an hour and I got" BCE0018: The name 'ScriptName' does not denote a valid type ('not found'). Did you mean 'UnityEditor.ScriptableWizard'?" Help please :)))