otherObject.GetComponent(NameOfScript).enabled = false;
Or a much more complex method of having a wall completely destroy itself the moment the key is picked up and the monster running from behind it. The monster will be held by a collision box that when the wall is destroyed it too is destroyed and so the monster is released. This means that while the player is moving around the area so too will the monster be. When it is released in this method, it will already be close to the player and jumping on their face!
UPDATE 25.04.13
Below is a picture detailing what I said above a few weeks back
The monster is stood on the right behind the green cube outline, when the player picks up the key which is situated at the Directional light the wall will disappear along with this collision, the player has that green space' worth of time before the monster will be eating player for breakfast.
Hope this update helped make this all make a little more sense!

No comments:
Post a Comment