Killstreaks
#21
Posted 05 April 2012 - 12:40 AM
#22
Posted 05 April 2012 - 02:43 AM
#23
Posted 07 April 2012 - 04:35 PM
I thought you were making Battlefield?
i am that was a typo i was thinkin about call of duty blackops but im still makin my battlefield game.
#24
Posted 30 December 2012 - 12:30 AM
where is the killedby variable and what do iput in it?What GreenMeteorTeam meant was to create a variable on the player object so that it will remember the last player who hit them. For example:
George fires a bullet at Jasmine
GreenMeteorTeam created a variable on the bullet object containing the ID of the player who fired it.
Then, when the bullet hits Jasmine, there is going to be some event that reduces her health, probably a collision event on the bullet object.
In that event, add this code:other.killedby = owner;This will create a variable on Jasmine's player object to remember that George was the last one who shot her.
If Jasmine dies, the game can then give George credit for the kill. This is the system I'm currently using in my game.
joshy1336 put forward an idea to create a global variable array to remember how many kills each player got without dying. If you're using a variable array for the score you can just create another one alongside that, and increment that whenever a player gets a kill, and reset it to zero if they die.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











