Help coding a few scenarios...

Hey all, I’d like to script a couple of scenarios and aren’t sure exactly how to start. They are the following:

when you pick up an exploding crate upgrade, you only get 8 exploding crates. Any crates shot after your ammo is out shouldn’t explode.

Creating a door that when the player passes it, the door closes behind him.

When the player obtains an upgrade, the door opens again as the player approaches it, even if his ammo is zero

Creating a second door that can only be opened once the player has an exploding crate upgrade

Any help on these matters would be GREATLY appreciated! Thank you so much

About the door.
Use Trigger to detect the player. Make sure to detect the player’s collider tag
OnTriggerExit, close the door.

Sounds like you need a lesson in conditional statements to control the flow of data (ie) if - else - ect

If the conditions are met or true, then complete the action else complete some other action.

Best help I can offer. http://forum.unity3d.com/threads/114813-List-of-Tutorials-and-Resources

Anyone else have any ideas? Anything? Im a super noob and have no clue what to do. I am taking a class but the teacher goes WAAAAYY too fast and I get behind so fast and it would take a while for me to get caught up… plz any help with the above questions would help so much.

Nobody will give you ready to use code. Start by following some tutorials on your own and show some effort. People in here will help you solve problems but nobody is going to make a game for you. Show some initiative.

If it’s any comfort, i doubt anyone has ever learned programming simply by taking a class, so you shouldn’t feel bad about not keeping up with your teacher. Programming is kinda like learning an instrument: The theoretical stuff will only get you so far. You really have to grind to learn it properly.

Luckily, all of the tasks you describe should be fairly easy once you have a good grasp of variables and conditional branching. Start out with some tutorials, keep trying and you’ll solve it soon enough.

Thanks chjacobsen, good to see there are atleast some nice people on these forums. Unlike some ppl…

I beg to differ. If you look past your ego, you’ll realize that my two replies are a lot more helpful for you than chjacobsen’s reply. He’s just pampering you. I gave you direction on how to get started (tutorial links and advice on how the community of these forums react). If that’s not “nice” by your standards, I’d rather be helpful to new guys than nice.

Lose the attitude or you’ll drive people who CAN help you away like that.

I stand by my comments. You talk too much, plz dont answer any future posts I may have because I don’t need or want help from the likes of you.

Nobody is going to answer your future questions if you keep this up. Trust me. Code beggars are shunned upon in these forums, you’ll figure it out eventually.