Home   Help Search Login Register  

Author Topic: Help  (Read 553 times)

0 Members and 1 Guest are viewing this topic.

Offline OFPWiZard

  • Members
  • *
Help
« on: 18 Apr 2003, 00:17:33 »
Hey

I have a problem
I have a sniper range in a mission i am making for a Training Area
I want the person that shots the target down be able to get a point each time he hits it.

Heres some info:
o1 = Officer Leader
t1 = Trainer (Person that will be shooting the targets "20")
te1 - te20 = All the targets

I have a script for o1 to start the tragets, this will make the targets pop up for 4 seconds so that t1 can shot them.  
this begings like this:

#start
~2
o1 sidechat "Targets armed in 5, get ready trainer!"
~1
o1 sidechat "You have 80 seconds to destroy 20 targets!"
~4
te1 setDammage 0
~4
te1 setDammage 1
~1
te2 setDammage 0
~4
... goes on till te20

i want it when t1 snipes one of the targets he will get a point and a hintCadet will pop up and say:

hintCadet "Targets Hits: 1/20"

After all the targets are hit, well the ones that t1 hit it will say:

hintCadet "Targets Hits: #/20"

o1 sideChat "You have hit # targets, you have passed the Sniper Marksmanship Test, congratulation."

If it is past 18 targets he will say that if not:

o1 sideChat "You have hit # targets, you have failed the Sniper Marksmanship Test."

If he hit all it would say:

o1 sideChat "You have hit all 20 targets, you have passed the Sniper Marksmanship Test, congratulation."


If you don't understand it i will give more information...

Retake:
i want targets to pop up for 4 seonds to have a person (t1) be able to hit them.  if he doesn't get it down within that 4 seconds, it will go down and wouldn't give him a point unless he shot it.  every time he shots and destroys a targets a hintCadet will show how many he has it already,  and give the time ledt (Total 90 Seconds, or 1 minute and 30 seconds):
Targets Hit: #/20
Time Left: 00:00
After the 90 seconds, it will give the total numbers of targets hit and say if he passed the test or not, over 18 he past, under 18 he doesn't

Bye

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Help
« Reply #1 on: 18 Apr 2003, 01:48:32 »
u will need 2 hange ur script 2 b somin like dat (actualy its gonna b 3scripts ;D)

u cant make targets pop up  :-\ but u can setpos em ;D

Code: [Select]
~2
o1 sidechat "Targets armed in 5, get ready trainer!"
~1
o1 sidechat "You have 80 seconds to destroy 20 targets!"
~4
te1 setpos GL1
[] exec "timescript.sqs"
[] exec "4sec.sqs"
@ (not alive te1) or t==4
? not alive te1 : points=points+1; hintCadet format ["Targets Hits: %1/20",points]
te1 setdammage 1
~1
te2 setpos GL2
[] exec "4sec.sqs"
@ (not alive te2) or t==4
? not alive te2 : points=points+1; hintCadet format ["Targets Hits: %1/20",points]
te2 setdammage 2
~1
te3 setpos GL3
[] exec "4sec.sqs"
@ (not alive te3) or t==4
? not alive te3 : points=points+1; hintCadet format ["Targets Hits: %1/20",points]
te2 setdammage 3
... til te20

now script named timescript.sqs

Code: [Select]
ti = 0
#loop
~1
ti = ti+1
? ti == 80 : goto "ender"
goto "loop"

#ender
hintcadet format ["Targets Hits: %1/20",points]
? points == 20 : o1 sideChat "You have hit all 20 targets, you have passed the Sniper Marksmanship Test, congratulation."; exit
? points >= 18 : o1 sidechat format ["You have hit %1 targets, you have passed the Sniper Marksmanship Test, congratulation.",points]; exit
o1 sideChat format["You have hit # targets, you have failed the Sniper Marksmanship Test.",points]
exit

nd script called

4sec.sqs

Code: [Select]
t=0
#loop
~1
t=t+1
? t==4 : exit
goto "Loop"

:cheers:

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline OFPWiZard

  • Members
  • *
Re:Help
« Reply #2 on: 18 Apr 2003, 02:02:35 »
Ok i will try