Home   Help Search Login Register  

Author Topic: Returning a number every time a player is killed.  (Read 1166 times)

0 Members and 1 Guest are viewing this topic.

Olle Stolpe

  • Guest
Returning a number every time a player is killed.
« on: 26 Feb 2005, 11:39:02 »
Hey guys.

I'm trying to make a dynamic mission (similar to LoJack).
I want to put a number in a variable every time a player is killed and then
have different messages at the end according to the amount of deaths.

Like this:

IF <a player is killed> THEN deathvar = deathvar + 1

at the end:

IF deathvar = 0 THEN TYPE "Excellent"
IF deathvar < 3 THEN TYPE "Not so bad"
IF deathvar > 3 THEN TYPE "Bad"

Excuse my quasisyntax, but I think you get the idea..
The mission is MP and has 4 slots (names of player Units is p1,p2,p3,p4)
HELP PLEASE!!!!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Returning a number every time a player is killed.
« Reply #1 on: 26 Feb 2005, 13:00:31 »
hmmm, well i was about to answer this when i noticed the bit about MultiPlayer - surely the multiplayer scripting board is the place for this?

in single player at least, a killed eventhandler would be used to advance the value in the variable set, but as i say, i'm not familiar with multiplayer so i dunno if eventhandlers work the same.

Olle Stolpe

  • Guest
Re:Returning a number every time a player is killed.
« Reply #2 on: 26 Feb 2005, 13:05:08 »
What is a killed eventhandler?
And, yeah, this should probably go in the MP section.
I know I need to use a public variable for this.
« Last Edit: 26 Feb 2005, 13:05:42 by Olle Stolpe »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Returning a number every time a player is killed.
« Reply #3 on: 26 Feb 2005, 13:33:42 »
click here.

tutorial by igor drukov, it's the bee's knees.

do bees have knees?

(bedges looks up 'bees' on google...)

EDIT - "...although bees have legs with joints like any insect their knee joint has nothing like a knee cap therefore bees do not have knees as such." - from http://www.skylon.co.uk/pdbka/beekeeping.html#knees

every day a school day, even saturday ;)
« Last Edit: 26 Feb 2005, 13:44:25 by bedges »