Home   Help Search Login Register  

Author Topic: Counting Kills  (Read 810 times)

0 Members and 1 Guest are viewing this topic.

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Counting Kills
« on: 13 Jul 2005, 19:25:55 »
Im not a new to Global variables, i just cant work out how to do this, how say if a west soldier kills a resistance soldier that players score, presuming that it is multiplayer goes up by 50,

can someone help please :D
"If I remain lost and die on a cross, atleast I wasn't born in a manger"

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Counting Kills
« Reply #1 on: 13 Jul 2005, 22:19:53 »
well, you could add a killed event handler to each enemy - that would return the killer. then it's just a case of using the 'addrating' command to bump up the points of whomever did the killing...

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Re:Counting Kills
« Reply #2 on: 14 Jul 2005, 00:11:53 »
but say i have two players, say one player kills 2 enemys, and the other kills 1 enemy, i then want a hint to appear saying Player1's score is 100 , Player2's score is 50, do you understand?

so that when the players kill an enemy and enemy the global variable lets call it score goes up by 50 everytime one enemy is killed.
"If I remain lost and die on a cross, atleast I wasn't born in a manger"

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Counting Kills
« Reply #3 on: 14 Jul 2005, 01:17:26 »
name each of them (say, p1 and p2)
then do what bedges said to addrating, then:

hint format ["%1: %2 /n%3: %4",(name p1),(rating p1),(name p2),(rating p2)]

that should do it

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Counting Kills
« Reply #4 on: 14 Jul 2005, 08:15:00 »
Take a little care with rating.  Normal loons score 200.  West officers 500 and east officers 1,000.  I have had results from killing armour that are difficult to repeat, that may be due to the some of the crew surviving sometimes, but I don't think so.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:Counting Kills
« Reply #5 on: 14 Jul 2005, 18:02:49 »
Considering we are talking about MP,what is the difference between:

AddScore---------AddRating
Score--------------Rating

 ???
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)