Hi, the project im working on i’ve done edutainment version of dinorun where you play as a dinosaur and eat letters based on the word that you were given at the start. The child remembers the letters and jumps over the wrong letters and runs through the right ones.
Nevermind solved. this does the trick nicely
#pragma strict
public var guiTexturePrefab : GUITexture;
private var instance: GUITexture;
public var guiTexturePrefab2 : GUITexture;
public var guiTexturePrefab3 : GUITexture;
public var guiTexturePrefab4 : GUITexture;
function OnTriggerEnter (PlayerCollider : Collider)
{
if(PlayerCollider.gameObject.tag == “a”) {
instance= Instantiate(guiTexturePrefab,Vector3(.5, .5, 0), Quaternion.identity);
}
if(PlayerCollider.gameObject.tag == “b”) {
instance= Instantiate(guiTexturePrefab2,Vector3(.5, .5, 0), Quaternion.identity);
}
if(PlayerCollider.gameObject.tag == “c”) {
instance= Instantiate(guiTexturePrefab3,Vector3(.5, .5, 0), Quaternion.identity);
}
if(PlayerCollider.gameObject.tag == “d”) {
instance= Instantiate(guiTexturePrefab4,Vector3(.5, .5, 0), Quaternion.identity);
}
}