Hello everyone!
So I took it upon my self to create a lock and key script for the three doors on the level. I searched fir hours and found nothing! Every script I tried was either broken or in java script( I suck at converting form java script to c#). So I gave up for a few hours and it hit me! why not use a boolean then put a IF statement inside of a IF statement with a tag name for the key? It made sense to me! I played around with my idea for a few hours and it still wouldn't work. Then once again I asked Mike to look at my script. He told me the "logic is there and it's written correctly... I don't know why it isn't working". Then he saw that i wrote my boolean wrong. when i was declaring my boolean I typed bool checkIfTriggered = false instead of bool checkIfTriggered = true. One little thing had me feeling crazy for hours. After making the change to my script it worked just fine.
Here's the script.
No comments:
Post a Comment