tornadotwins guid

Hi
I have follow the tornadotwins guid and im finaly done :smile:
but its still 3 thing that thay dont fix:S

one, the ball is a trigger so its move true all objects and if I make it to no trigger the script dosent work, what do I need to change?

two, there is no way to finish the game. how do i make so its say that I have compleat the game when the last enemy is dead or go to a new level?

tree,when I got killed when I have my last life there need to say game over and than come to start menu

what script do I need to poast so I cant get help whiv tris problem?
I have this:
Movearound
turrencontroll
turrentcollider
healthcontroll
textcontroll(for start menu buttons)
killmeovertime(for balls)

//txzzo

It shouldn’t be a trigger and you need to use OnControllerColliderHit to detect the collision.

Just make your own finish. Use you imagination.

When your last life gets deducted, show a GUIText.

yeah but how I retutn to the menu after that??

//txzzo

In the videos I’ve introduced
Application.LoadLevel (sceneNameOrNumber);

You can use that to switch back to the main menu when all turrets are destroyed… or when you die.

Cheers!

-TornadoTwins

huh??
how can that one know how when its shod change level?

error for my movearound script when I did add OnControllerColliderHit on boath the cannon and the “worm”

OnControllerColliderHit couldn't be called because the expected parameter ControllerColliderHit doesn't match Collider.
UnityEngine.CharacterController:SimpleMove(Vector3)
UnityEngine.CharacterController:SimpleMove(Vector3)
movearound:Update() (at Assets\minnamake\script\movearound.js:75)

[..\..\Runtime\Mono\MonoBehaviour.cpp line 1383]

my script on my turrent any worm is

For worm:

//Moving around
var speed = 3.0;
var rotateSpeed = 3.0;

//Shooting
var bullitPrefab:Transform;

//Dying
static var dead = false;

//Geting hit
var tumbleSpeed = 800;
var decreaseTime = 0.01;
var decayTime = 0.01;
static var gotHit = false;
private var backup = [tumbleSpeed, decreaseTime, decayTime];

function LateUpdate()
{
if (dead)
{
transform.position = Vector3(-1.2,1.1,-40);
gameObject.Find("Main Camera").transform.position = Vector3(0,4,-10);
dead = false;
}

if (gotHit)
{
if(tumbleSpeed < 1)
{
//we're not hit anymore... reset  get back in the game!
tumbleSpeed = backup[0];
decreaseTime = backup[1];
decayTime = backup[2];
gotHit = false;
}
else
{
//we're hit! Spin our charavter around
transform.Rotate(0,tumbleSpeed * Time.deltaTime,0, Space.World);
tumbleSpeed = tumbleSpeed-decreaseTime;
decreaseTime += decayTime;
}
}
}


//function ControllerColliderHit(hit : ControllerColliderHit) 
function ControllerColliderHit ( hit : Collider )
{
if(hit.gameObject.tag == "fallout")
{
dead = true;
//substract life here
HealthControll.LIVES -= 1;
}

if(hit.gameObject.tag == "fiendeball" )
{
gotHit = true;
HealthControll.HITS +=1;
Destroy(hit.gameObject);
}
}

function Update ()
{

var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);

var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis ("Vertical");

controller.SimpleMove(forward * curSpeed);

//shooting!
if(Input.GetButtonDown("Jump"))
{
var bullit = Instantiate(bullitPrefab,
transform.Find("spawnpoint").transform.position,Quaternion.identity);
bullit.tag = "wormball";
bullit.rigidbody.AddForce(transform.forward * 5000);
}
}


@script RequireComponent(CharacterController)

for turrent:

var explosion : Transform;


//function OnControllerColliderHit(hit : ControllerColliderHit) 
function OnControllerColliderHit ( hit : Collider )
{
if(hit.gameObject.tag == "wormball")
{
Destroy(hit.gameObject);
var exp = Instantiate(explosion, gameObject.transform.position, Quaternion.identity); 

Destroy(gameObject);
}
}

my error is still the same

no error now but it still dosent work…

anny one know??