So what i want to do is, once the character touch the button, the tile changes, so my code is here
this is for the Button:
function OnCollisionEnter (myCollision : Collision) {
if(myCollision.gameObject.name == “ButtonRed”){
SendMessage (“tileRedChanges”);
}
}
this is for the Tile:
**if ( something happened… lol… i don’t’ know what to write here and somewhere else to receive the message)
{
transform.localScale = Vector3(3,1,58.70655);
transform.position.x = -42.27357;
transform.position.y = 5.5;
transform.position.z = 134.2756;
}**
just wondering how can i write a receiver of the message it sent from the button?
(why the first part of script look like this…)