How do I do last hit in a multiplayer platform

Get help using Construct 2

Post » Mon Oct 05, 2015 2:31 am

i'm making a multiplayer game in a keyboard i'm having a hard time on how to make last hit or the kill i want to separate the kills and scores from each player
B
4
Posts: 11
Reputation: 222

Post » Mon Oct 05, 2015 11:31 am

So what is it you are trying to achieve ? killing a player ? or tracking kill scores ?
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Mon Oct 05, 2015 9:54 pm

tracking kill scores by each player
B
4
Posts: 11
Reputation: 222

Post » Tue Oct 06, 2015 10:43 am

I would make it depend on who determines who got killed (host or peer)

If the host, it could simply keep track of all the players their kill scores by storing the kills in the peer object.

If the peer, I would store it in my peer object too, and inform all other players via the host what my kill score is.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Wed Oct 07, 2015 12:43 am

i'm making an offline game
B
4
Posts: 11
Reputation: 222

Post » Mon Nov 16, 2015 3:25 pm

Hi bro, here goes a ideia..
1) Declare a ID variable to identify each player.
2) Make a Function to calculate the damage on the enemy and send the ID variable to the function
3) In the function, use this logic IF THE ENEMY HP WAS > 0 AND ITS <=0 NOW this player ( ID ) got the kill

dont use ALL the premade functions at the C2, the program is made to help you in 95% off the cases but you still need to work on that 5%.

Sorry my bad english, im Brazilian.
B
3
Posts: 7
Reputation: 189


Return to How do I....?

Who is online

Users browsing this forum: charliesan763, JaredX and 10 guests