|
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
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 :)))
(comments are locked)
|
|
Why did you try ScriptName if you don't have a script called that? I'm assuming you copied and pasted from a general example. You should have read a basic tutorial on JavaScript before attempting this, to find out what it means when you put something after the colon after a variable declaration. Also, JavaScript is not Java. Thanks but I got "BCE0022: Cannot convert 'boolean' to 'String'." What < > (triangle brackets, less-than, more-than) means here? I haven't found them in Unity Scripting Reference. I still read tutorials :)
Jan 15 '11 at 11:38 PM
kecaj
That error didn't come from my code. The Generic form of GetComponent isn't documented for JavaScript yet, but that's the syntax for it. I don't know if you're ready to understand generics yet, but long story short, that's a better way to use fetch a component. Put "#pragma strict" at the top of your scripts, and that will alert you if you're not using GetComponent well.
Jan 15 '11 at 11:51 PM
Jessy
My fault: "true" instead of true :) thanks
Jan 16 '11 at 12:13 AM
kecaj
(comments are locked)
|

Is "ScriptName" not supposed to be "The name of the script?" :)