B
Bean Bunny
Guest
I'm making a capture the hill style game. I have the game working enough to where if one team member stands on the hill long enough, they can capture it, and another person on another team can reduce the timer and take it away.
Here's two things I would like to get working:
- If the same number of people from team 1 and team 2 are on the hill, it completely stops charging.
- If two people from team 1 and one person from team 2 are on the hill, the hill charges in favor of team 1, but at half the speed. (Or three people from one team and two people from the other team or whatever combination you can come up with from there if that makes sense.)
Every solution I can come up with, the hill object would have to know how many objects are currently colliding with it, and what team each object is on. Each player object currently has a variable that denotes its team, so that information does exist. Does that sound right? What can I do to make this work?
Here's two things I would like to get working:
- If the same number of people from team 1 and team 2 are on the hill, it completely stops charging.
- If two people from team 1 and one person from team 2 are on the hill, the hill charges in favor of team 1, but at half the speed. (Or three people from one team and two people from the other team or whatever combination you can come up with from there if that makes sense.)
Every solution I can come up with, the hill object would have to know how many objects are currently colliding with it, and what team each object is on. Each player object currently has a variable that denotes its team, so that information does exist. Does that sound right? What can I do to make this work?