Another timer question
Moderator: Moderators
Try taking the space out of the name of the pk3 and if you plan to overwite stock game files then add something like user_ in front of the name or like some ppl do add some zz's . Your pk3 will have to be read after the game pk3's in order to overwite them so the name of the pk3 will have to come after p in the alphabet since they are read alphabetically .
-
SniperWolf
- Colour Sergeant
- Posts: 89
- Joined: Sat Dec 18, 2004 5:14 am
- Location: New York, USA
- Contact:
Yes I stand in the same spot that I activated it from.
Tested without any spaces in the name & added z's to the front of the name. Still no good.
I don't have my .urc file in the .pk3, would that make a difference?
I also read right over where I needed to but the MasterScript thing in my map script. So after trying that it still doesn't work.
Here is the top part of my map script. Is it In the right spot??/
I tried right after Main & after scorboardpic
Tested without any spaces in the name & added z's to the front of the name. Still no good.
I don't have my .urc file in the .pk3, would that make a difference?
I also read right over where I needed to but the MasterScript thing in my map script. So after trying that it still doesn't work.
Here is the top part of my map script. Is it In the right spot??/
I tried right after Main & after scorboardpic
Code: Select all
// Clan ?{T?F}? Boot Camp
// ARCHITECTURE: ?{T?F}??niperWolf
// SCRIPTING: ?{T?F}??niperWolf w/ Help From TWL Viper
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" " Clan ?{T?F}?"
setcvar "g_obj_alliedtext2" " Boot Camp "
setcvar "g_obj_alliedtext3" " By "
setcvar "g_obj_axistext1" " ?{T?F}??niperWolf"
setcvar "g_obj_axistext2" " Timer Scripts"
setcvar "g_obj_axistext3" " By <TWL> Viper"
setcvar "g_scoreboardpic" "none"
//***Buzzer Sound
local.master = spawn ScriptMaster
local.master aliascache m6l3c_alarm sound/mechanics/Mec_Alarm_05.wav soundparms 1.0 0.0 1.0 0.0 160 1200 auto loaded maps "m
dm moh obj train"
level waitTill prespawn
it gets confused in these posts this should all be one line -
im surprised the script worked at all - but try that.
Code: Select all
local.master aliascache m6l3c_alarm sound/mechanics/Mec_Alarm_05.wav soundparms 1.0 0.0 1.0 0.0 160 1200 auto loaded maps "m dm moh obj train" im surprised the script worked at all - but try that.
-
SniperWolf
- Colour Sergeant
- Posts: 89
- Joined: Sat Dec 18, 2004 5:14 am
- Location: New York, USA
- Contact:
one line
It's ok if the line wraps to the next because it is to long. But, what he means is there should be no carriage return in the string.
You have this:
local.master aliascache m6l3c_alarm sound/mechanics/Mec_Alarm_05.wav soundparms 1.0 0.0 1.0 0.0 160 1200 auto loaded maps "m
dm moh obj train"
And it should look like this:
local.master aliascache m6l3c_alarm sound/mechanics/Mec_Alarm_05.wav soundparms 1.0 0.0 1.0 0.0 160 1200 auto loaded maps "m dm moh obj train"
You have this:
local.master aliascache m6l3c_alarm sound/mechanics/Mec_Alarm_05.wav soundparms 1.0 0.0 1.0 0.0 160 1200 auto loaded maps "m
dm moh obj train"
And it should look like this:
local.master aliascache m6l3c_alarm sound/mechanics/Mec_Alarm_05.wav soundparms 1.0 0.0 1.0 0.0 160 1200 auto loaded maps "m dm moh obj train"
-
SniperWolf
- Colour Sergeant
- Posts: 89
- Joined: Sat Dec 18, 2004 5:14 am
- Location: New York, USA
- Contact:
I packed it all up & tested it on my Clans Private Server & the Buzzer works. Not really sure why I can't hear it when I test the map on my own PC. But as long as the buzzer works on our server thats go enough for me. Thanks Guys.
Is it possible to gather the Scores for a certain range?? I have it so it prints the point values of different parts of the targets on screen. Is there some kind of variable to get it to print with the time I get on the range??
Right now when I finish a range it prints:
"I finish the Rifle Range in 15.000 Seconds"
What I would like to do is to get it to print this:
"I finished the Rifle Range in 15.000 Seconds with a score of 30"
Is it at possible?
Is it possible to gather the Scores for a certain range?? I have it so it prints the point values of different parts of the targets on screen. Is there some kind of variable to get it to print with the time I get on the range??
Right now when I finish a range it prints:
"I finish the Rifle Range in 15.000 Seconds"
What I would like to do is to get it to print this:
"I finished the Rifle Range in 15.000 Seconds with a score of 30"
Is it at possible?
yes
Yes, it is possible. Just add the variable for the score -- much like the variable for the time was.
example:
println ("I finish the Rifle Range in " + local.time + " seconds with a score of " + level.RRscore)
example:
println ("I finish the Rifle Range in " + local.time + " seconds with a score of " + level.RRscore)
-
SniperWolf
- Colour Sergeant
- Posts: 89
- Joined: Sat Dec 18, 2004 5:14 am
- Location: New York, USA
- Contact:
tltrude,
One pass threw my Rifle Range has you shooting at 3 different targets to get a Score. Each target has 11 different areas that can be shot to get a scored ranging from 10 pts to 2 pts.
How would I pull the info from all 3 targets & have it add them together for a total score?
So if I went threw the range & hit 2 targets in the head & 1 in the chest that would add to 28 pts
I would need the script to do this:
target 1 part hit + target 2 part hit + target 3 part hit = Rifle Range score
Possible??
One pass threw my Rifle Range has you shooting at 3 different targets to get a Score. Each target has 11 different areas that can be shot to get a scored ranging from 10 pts to 2 pts.
How would I pull the info from all 3 targets & have it add them together for a total score?
So if I went threw the range & hit 2 targets in the head & 1 in the chest that would add to 28 pts
I would need the script to do this:
target 1 part hit + target 2 part hit + target 3 part hit = Rifle Range score
Possible??
adding
How does your script print the scores now? If it uses variable names, you can just add them together and give the result a new variable name.
local.hits1 + local.hits2 = level.total1
Or, you can just add them together in the time printing line if the variables are "level" -- useable in any thread.
iprintln ("I finish the Rifle Range in " + local.time + " seconds with a score of " + (level.hits1 + level.hits2))
local.hits1 + local.hits2 = level.total1
Or, you can just add them together in the time printing line if the variables are "level" -- useable in any thread.
iprintln ("I finish the Rifle Range in " + local.time + " seconds with a score of " + (level.hits1 + level.hits2))
-
SniperWolf
- Colour Sergeant
- Posts: 89
- Joined: Sat Dec 18, 2004 5:14 am
- Location: New York, USA
- Contact:
Right now I'm using a timer script that Viper made for me to print the line "I Finished The Rifle Range In xx.xxx Seconds" right of compass.
Here is that script if you need to look at it:
As for the Scores I use multiple trigger_multiples with setthreads to have it print this line right of compass, "I Scored X Points On The Left Target"
Here is that Script:
Hope this helps tltrude.
Here is that script if you need to look at it:
Code: Select all
//timer
//<TWL>Viper
main local.start local.stop local.name:
local.trigger = spawn trigger targetname ("start_" + local.name)
local.trigger.origin = ( local.start )
local.trigger setsize ( -50 -50 -50 ) ( 50 50 50 )
thread setup local.start local.stop local.name
end
setup local.start local.stop local.name:
$("start_" + local.name) waittill trigger
$("start_" + local.name) remove
thread main local.start local.stop local.name
self nottriggerable
local.player = parm.other
if(local.player.inuse)
{
self triggerable
end
}
else
{
local.player.inuse = 1
local.player thread doit local.stop local.name
}
self triggerable
end
doit local.stop local.name:
local.number = randomint 999999999
thread trigger_end local.number local.stop
local.result = self waitthread scan_player local.number local.name
if(local.result != left)
{
self.inuse = 0
self iprint ( "Clock Stopped" ) 1
$("end_" + local.number) remove
}
end
trigger_end local.number local.stop:
local.trigger = spawn trigger targetname ("end_" + local.number)
local.trigger.origin = ( local.stop )
local.trigger setsize ( -50 -50 -50 ) ( 50 50 50 )
local.trigger waittill trigger
end
scan_player local.number local.name:
local.result = ok
local.team = self.dmteam
local.count = 0.0
self iprint ( "Clock Started" ) 1
self stufftext ("say I'm Starting The " + local.name )
while(1)
{
if(self == NULL)
{
local.result = left
end local.result
}
else
{
if(self.dmteam != local.team || !isalive self)
{
end local.result
}
else
{
local.count += 0.1
self iprint ( local.count )
if( ("end_" + local.number) istouching self )
{
self stufftext ("say I Finished The " + local.name + " In " + local.count + " Seconds" )
end local.result
}
}
}
wait 0.1
}
endHere is that Script:
Code: Select all
//*** Rifle Range Targets
//*** Left Target
thread ltarget1_triggered
ltarget1_triggered:
local.player = parm.other
local.player stufftext "say I Scored 10 Points On The Left Target."
$ltarget1 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget1 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget2_triggered
ltarget2_triggered:
local.player = parm.other
local.player stufftext "say I Scored 10 Points On The Left Target."
$ltarget2 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget2 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget3_triggered
ltarget3_triggered:
local.player = parm.other
local.player stufftext "say I Scored 4 Points On The Left Target."
$ltarget3 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget3 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget4_triggered
ltarget4_triggered:
local.player = parm.other
local.player stufftext "say I Scored 8 Points On The Left Target."
$ltarget4 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget4 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget5_triggered
ltarget5_triggered:
local.player = parm.other
local.player stufftext "say I Scored 4 Points On The Left Target."
$ltarget5 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget5 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget6_triggered
ltarget6_triggered:
local.player = parm.other
local.player stufftext "say I Scored 4 Points On The Left Target."
$ltarget6 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget6 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget7_triggered
ltarget7_triggered:
local.player = parm.other
local.player stufftext "say I Scored 6 Points On The Left Target."
$ltarget7 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget7 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget8_triggered
ltarget8_triggered:
local.player = parm.other
local.player stufftext "say I Scored 4 Points On The Left Target."
$ltarget8 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget8 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget9_triggered
ltarget9_triggered:
local.player = parm.other
local.player stufftext "say I Scored 2 Points On The Left Target."
$ltarget9 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget9 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget10_triggered
ltarget10_triggered:
local.player = parm.other
local.player stufftext "say I Scored 2 Points On The Left Target."
$ltarget10 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget10 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
end
thread ltarget11_triggered
ltarget11_triggered:
local.player = parm.other
local.player stufftext "say I Scored 2 Points On The Left Target."
$ltarget11 hide
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) nottriggerable
wait 10
$ltarget11 show
for (local.i = 1; local.i <= 11; local.i++)
$("ltarget_trigger" + local.i) triggerable
endoic
I see you started another thread for this, so I'll let Viper do it. My way would of ment adding line to every target thread.
-
SniperWolf
- Colour Sergeant
- Posts: 89
- Joined: Sat Dec 18, 2004 5:14 am
- Location: New York, USA
- Contact:


