© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
24 replies
BricksAreTasty

Help with Lists and index.

Im making a game for a project and my current code randomly generates coins in different locations, and im trying to make it so whenever my character collides with a coin, only that specific coin gets deleted. I have a method that almost works perfectly but there is an issue with one coin. This one coin will not follow the code and delete itself from my screen but it will add to the score as well as lower the List.Count by 1. I checked this coins index and found out that its index is always [23], which i can tell is important but i can't figure out how to solve it.
image.png
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Help with Lists/Combobox
C#CC# / help
4y ago
❔ playing with Lists and numbers
C#CC# / help
4y ago
Need help with question about lists
C#CC# / help
3y ago
✅ Need some help with lists please
C#CC# / help
3y ago