OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Olle Stolpe 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!!!!
-
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.
-
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.
-
click here (http://www.ofpec.com/editors/resource_view.php?id=543).
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 ;)