I made a gameobject,renamed it added the script. to my player01_SpawnPoint
then on my Player01_Controls
var spawnPoint : Transform;
function Spawn () {
// reset the character's speed
movement.verticalSpeed = 0.0;
movement.speed = 0.0;
// reset the character's position to the spawnPoint
transform.position = spawnPoint.position;
}
In the Inspector tab, under the script, the area to select the spawnpoint for my player dosnt show up ?
can some one point out what im doing wronge or what im missing ?
??? dos any one help around here ?
dont know about java script but in c#
you declare them as
public gameobject spawnPoint;
in java ‘var’ is set to default public…
i dont know C# ive been learning java, im surpriased no one can help me with some thing soo simple.
You can try to declare the var as public,
public var spawnPoint: Transform;
Or refreshing the script in the editor?
What’s dos public do? Cause on the 2d charater in the tut dosnt use it and theirs shows up. I’m so confused
It simply explicitly declares the var as public even though javascript does that itself, sometimes it helps to nudge it along the correct path.
nop public dosnt do any thing. some things missing and i have no clue
Try using gameObject instead of transform.