W
Wintermute()
Guest
Hi again you helpful folks out there in game dev land!
So, my next little head scratcher in my multiplayer game. I have a game condition happening like this at present:
Player destroys AI. AI drops a moving pickup object. Moving pickup object is able to be picked up by any player. Pickup adds points to the player that picked it up. The pickup can also be destroyed by AI or other players. Pickups come from spawning AI enemies.
All well and good so far. what I want to add to this is:
-When (any) player gains the pickup, it adds a graphic (same sprite) of the pickup under their name on screen to represent the number of pickups they have gained so far.
-Code to track how many pickups each player has gained. So when the first player gains (x) pickups, I can have a level win state.
I am thinking I need to kick off both the drawing of the pickup image + the counting of pickups when the collision of player+pickup occurs ? But exactly how to achieve that I am struggling with, beyond detecting the collision and adding points, destroying the pickup instance.
Any help much appreciated... thank you!
So, my next little head scratcher in my multiplayer game. I have a game condition happening like this at present:
Player destroys AI. AI drops a moving pickup object. Moving pickup object is able to be picked up by any player. Pickup adds points to the player that picked it up. The pickup can also be destroyed by AI or other players. Pickups come from spawning AI enemies.
All well and good so far. what I want to add to this is:
-When (any) player gains the pickup, it adds a graphic (same sprite) of the pickup under their name on screen to represent the number of pickups they have gained so far.
-Code to track how many pickups each player has gained. So when the first player gains (x) pickups, I can have a level win state.
I am thinking I need to kick off both the drawing of the pickup image + the counting of pickups when the collision of player+pickup occurs ? But exactly how to achieve that I am struggling with, beyond detecting the collision and adding points, destroying the pickup instance.
Any help much appreciated... thank you!