Changing List for Collection Game
Hi, I am currently making a game in which you travel across an island search for certain items. When you find one, you click it and collect it (I already have a working script for this). I want to have a list where all the items you need to find are written and when you collect an item, it is removed from the list. Can anybody help me? Thanks :D
P.S. my comment doesn't help you in anyway but i wanted to say game sounds cool and if i could hear more about it? I'm currently developing my own first game currently to but no where near as advanced sounding as yours
Hi! It's my first proper game and i am such a noob... I have no Idea how to do this....
Anyway, It is an island game and you have to find an collect materials to get off the island.
tell me once you finish the basic game and ill have to download it i could be one of your testers
Answer by hexagonius · Sep 14, 2015 at 07:40 PM
have a gameobject in the scene (player or separate) with a script and a
public List<GameObject>
, which should show up in the inspector. assign all collectibles to it. whenever the player collects an item you can call Remove on that list with the gameobject as the parameter. Count tells you the current amount of items.