Home   Help Search Login Register  

Author Topic: Scoring  (Read 1514 times)

0 Members and 1 Guest are viewing this topic.

TH

  • Guest
Scoring
« on: 13 Jul 2004, 19:35:08 »
How would i make it so when a object im using enters a area that a team gets 15 points... or, how do i make it so when the object enters the area it gives the team one point not on the scoreboard... in text.... then at the end show who wins :-\

DBR_ONIX

  • Guest
Re:Scoring
« Reply #1 on: 13 Jul 2004, 21:04:06 »
Erm, not sure exactly, but it's something like
Code: [Select]
this addrating +15- Ben

TH

  • Guest
Re:Scoring
« Reply #2 on: 13 Jul 2004, 21:22:59 »
id like to do it with the text thing... like in battlefield 1985 but with 1 point each time the object enters the area

DBR_ONIX

  • Guest
Re:Scoring
« Reply #3 on: 14 Jul 2004, 11:15:22 »
Ah, right..
You need a few scripts, I think
The INIT.sqs script :
Code: [Select]
score=0
Then in the scored.sqs
Code: [Select]
score=score+15

And then, when ever you want to display the score :
Code: [Select]
HINT FORMAT ["Score is %1",score]

That should work okay..
Oh, if you want the player to start of with a big score, you can put (In either a script, INIT field, trigger, any where, score=1000, or what ever you want)
And if you want the player to lose points..
Code: [Select]
score=score-15
How are you moving the objects about? Uh, what is the object..?
::)
But a trigger, with a modified condition field should work
- Ben
Code: [Select]

DBR_ONIX

  • Guest
Re:Scoring
« Reply #4 on: 14 Jul 2004, 11:18:02 »
Oh, just noticed this was multiplayer ::)
You need score1 and score2
And both scripts for each..
THen you can do this :
Checkscore.sqs
Code: [Select]
?(score1>score2): HINT "Team 1 win!"
?(score2>score1): HINT "Team 2 win!"
Or you culd replace the HINT with a go to, and use titletext (You could just put it on the end, where the hint is, acctualy)

Gd luck :)
- Ben

TH

  • Guest
Re:Scoring
« Reply #5 on: 14 Jul 2004, 20:24:15 »
alright... im completely confused now...i have 2 teams, i want it so whenever the ball sets off my trigger i have that it gives the team 1 point... but not on the scoreboard jsut in the script. then show it at the end.

init
Code: [Select]
score1=0
          score2=0

score.sqs
Code: [Select]
score=score+1
so what do i put in the triggers when they score? or what did i do wrong.. :-\
« Last Edit: 14 Jul 2004, 20:34:29 by Trigger Happy »

TH

  • Guest
Re:Scoring
« Reply #6 on: 14 Jul 2004, 20:36:51 »
everything works fine.. i can get the ball in the trigger and it sets it off... but i jsut need to know how to get the score to work