Home   Help Search Login Register  

Author Topic: Team deathmatch scoring  (Read 1742 times)

0 Members and 1 Guest are viewing this topic.

SFG

  • Guest
Team deathmatch scoring
« on: 18 Apr 2003, 20:26:41 »
Hi, I have 2 teams, i'd like when west shoots east, west gets a point via titletext. They keep adding up to a certain score, and then that side wins. IT MUST work for 1.46. Thanks

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Re:Team deathmatch scoring
« Reply #1 on: 20 Apr 2003, 22:15:25 »
hmm, was gonna say eventhandlers.. but then it doesn't support 1.46..
i would do it for like "if west player dies" then add one score to east. Of course this would be all kinds of death, friendly fire, crashing with cars..
Cura Posterior

SFG

  • Guest
Re:Team deathmatch scoring
« Reply #2 on: 20 Apr 2003, 22:16:08 »
Thats fine.. do you have the code?

Offline granQ

  • Contributing Member
  • **
    • Anrop.se
Re:Team deathmatch scoring
« Reply #3 on: 20 Apr 2003, 22:19:39 »
i have some code i did.. but it was back in my beginners time..
i did a script for each soldier like:
w1.sqs
w2.sqs

(west1 and west2) and it looked like this:

Code: [Select]
#start
?(not(alive e1)) : goto "killed";
~0.1
goto "start";

#killed
PublicVariable "Westlife"
Westlife = westlife + 1
PublicVariable "Westlife"
~30
goto "start"

just a lot of typing and stuff ;)
Cura Posterior

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Team deathmatch scoring
« Reply #4 on: 21 Apr 2003, 00:43:03 »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Tactician

  • Guest
Re:Team deathmatch scoring
« Reply #5 on: 22 Apr 2003, 13:01:02 »
init.sqs snippet:
Code: [Select]
WestScore = 0
EastScore = 0
(side player) exec "deathcount.sqs"
[] exec "showscore.sqs"

deathcount.sqs:
Code: [Select]
_pside = _this
#start
@!alive player
?(_pside == WEST): EastScore = EastScore + 1; publicVariable "EastScore"
?(_pside == EAST): WestScore = WestScore + 1; publicVariable "WestScore"
@alive player
goto "start"

showscore.sqs:
Code: [Select]
#start
~.1
_wscore = WestScore
_escore = EastScore
@WestScore != _wscore OR EastScore != _escore
titleText [format["West: %1  East: %2",WestScore,EastScore],"PLAIN DOWN"]
goto "start"

Properties of this system:
- Death is tracked by the player locally
- New score is reported by player to all clients on death
- Every time score is added, titleText shows new score
- AI will not count towards score
- No server intervention required

Disclaimer:
- I haven't tried any of the above code myself
- Simultaneous death of two or more players on same side could possibly stack publicVariables for unpredictable results (i.e. multi-crew vehicle death)

Tactician

  • Guest
Re:Team deathmatch scoring
« Reply #6 on: 22 Apr 2003, 21:42:14 »
Umm.. I meant the above snippet for the "Death counter" topic but got confused.  Is a score-on-death system acceptable for your needs?