Lerpz Tutorial

I’m wondering if there is something broken in the Lerpz tutorial or if it’s something that I’m doing wrong. If you beat the Cooper robot guard he is supposed to fall over and die with an explosion. Mine Doesn’t do that because the prefab for the dead robot does not exist by that name. See code below.

	// Instantiate replacement dead character model
	var deadModel = Instantiate(deadModelPrefab, transform.position, transform.rotation);
	CopyTransformsRecurse(transform, deadModel);

It’s looking for “deadModelPrefab” but the only prefab I can see in the project directory is one called “CooperDead.” When I try to replace the name of the instance in the code above I get an error saying unknown identifier ‘CooperDead’?

Hello,

You don’t change the name of the variable in your code. If you take a look in the Unity inspector for whatever object your ‘deadModelPrefab’ is defined in, you should see a slot for the Dead Model Prefab. Drag the ‘CooperDead’ prefab into this slot and you should be good to go.

-Lincoln Green

Ah! Thanks for the help FlamingHairball. That is what I was doing wrong. Do you know what type this is supposed to be?

var fuelPrefab : DroppableMover;