Monday, December 15, 2014

CSG 129: Destroy Script

Hello everyone.

I ran in to a little problem with my pick up script. we realized that if you picked up an item and left a scene, then returned  to the previous scene the item would reappear. The inventory would still show that you already picked up the item. So you could pick up the same item infinitely. That's a pretty big problem! So I talked to josh about it and h told me i could create a script that checks to see if the item had been picked up and if so destroy it. I wrote a script with a boolean  that checked to see if the item was in the inventory array and if so destroy it. it was a pretty simple script. check it out.

No comments:

Post a Comment