Page 2 of 2

Posted: Sat Mar 03, 2007 9:06 am
by bdbodger
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 .

Posted: Sat Mar 03, 2007 11:30 am
by ViPER
custom uber doesnt overwright anything.

the sound is local - are you standing near the trigger when the timer stops?

Posted: Sat Mar 03, 2007 12:36 pm
by SniperWolf
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

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

Posted: Sat Mar 03, 2007 7:02 pm
by ViPER
it gets confused in these posts this should all be one line -

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.

Posted: Sun Mar 04, 2007 12:35 am
by SniperWolf
OK, I tried everything, right down to changing the font size to 8 to get it to fit on 1 line. Still no go :evil: If you want Viper I can send you my map .pk3 to look at & test. If not I'll just forget about the buzzer :cry:

one line

Posted: Sun Mar 04, 2007 3:44 am
by tltrude
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"

Posted: Sun Mar 04, 2007 7:07 am
by SniperWolf
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?

yes

Posted: Sun Mar 04, 2007 8:48 am
by tltrude
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)

Posted: Sun Mar 04, 2007 9:38 am
by ViPER
ah server side should work - but some things - even println in somecases I have been unable to get to work on my own pc.

Posted: Sun Mar 04, 2007 1:37 pm
by SniperWolf
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??

adding

Posted: Wed Mar 07, 2007 3:00 pm
by tltrude
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))

Posted: Wed Mar 07, 2007 3:26 pm
by SniperWolf
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:

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
  }
end
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:

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

end
Hope this helps tltrude.

oic

Posted: Wed Mar 07, 2007 10:07 pm
by tltrude
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.

Posted: Wed Mar 07, 2007 10:42 pm
by ViPER
with Toms help either way is fine with me. :)

Tom knows what hes doing - Im just a good cut and paster.

Posted: Thu Mar 08, 2007 4:45 am
by SniperWolf
I started another post so it didn't get lost in this one. But a forum admin can combine them if they like.