Question about Countdown mod

Started by jasongor, October 14, 2005, 11:54:00 AM

Previous topic - Next topic

jasongor

Hi

   

   I got a question regarding to the countdown mod 1.5.

   I downloaded it and it run alright..but i didn't show where the radio is (the red print on left hand side)

   

   I played in some server and everytime the radio drops, everyone will freeze and a short video will show where the bomb is...it also happens when start of the map.

   

   How can i make the video things happen?

   

   Thanks

Elgan {sfx}

the video thing is not stock so if u dont know scripting, I think the best thing to do is find the server and e-mail them asking if u may have the mod.

jasongor

but then can u please give me some ideas on the video scripting i should put on the mod?

   

   thanks

Elgan {sfx}

well if u have a look in the HTR/camera.scr you will see the section for end camera scene when a team has won.

   

   You could do the following:

   

   1. In radio.scr add a line to exec a new thread we will make in a minute to orbit the radio for 5 seconds.

   

   

   main local.origin:
   
      spawn level.radio_model "targetname" "countdown_radio" "classname" "scriptmodel"
      //local.radio model "items/explosive.tik" //"items/walkietalkie.tik"
      local.radio = $countdown_radio
      local.radio.origin = local.origin
      local.radio.angles = ( 0 0 0 )
      local.radio solid
      local.radio droptofloor
      local.radio light 1 0 0 50
   [b]
   // THE RADIO HAS SPAWNED ABOVE.
   
   // So we can exec our script. add
   
          waitexec HTr/camera.scr::custom_cam
   // waitexec, this will wait until the camera has finished
   // this line will exec the thread custom_cam in camera.scr
   [/b]
      local.hit_box = spawn trigger_multiple "spawnflags" 128 "targetname" "radio_box"
      local.hit_box setsize ( -20 -20 -20 ) ( 20 20 20 )
      local.hit_box setthread shot
      local.hit_box.origin = local.radio.origin
   
      local.use_box = spawn trigger_use  "targetname" "radio_use"
      local.use_box setsize ( -35 -35 -35 ) ( 35 35 35 )
      local.use_box setthread use
      local.use_box.origin = local.radio.origin
   
      local.radio.use = local.use_box
      local.radio.shot = local.hit_box
   
      local.use_box glue local.radio
      local.hit_box  glue local.radio
   

   

   

   ok so above we added a line to exec a custom script. Now lets make the custom script. The script will make all the players view a camera the looks at the radio.

   

   

   2. Open HTR/camera.scr and create a new thread named "custom_cam". In their use the code in the threads above to make your own code to veiw a cam.

   

   

   custom_cam:
   
      spawn Camera targetname "camera" origin self.origin
      $camera follow_distance 190
      $camera orbit_height 70
      $camera speed 1.4
   
      drawhud 0
   
      letterbox 1
   
      //freeze player
      freezeplayer $player
   
   
      // orbit the radio
      $camera orbit $countdown_radio
   
      //some effects
      fadein 5.0 0.0 0.0 0.0 1.0
      // watch for 5 seconds
   
      wait 5
   
   
      clearletterbox
      cueplayer
   
      releaseplayer  $player
      $camera delete
   
   end
   
   

jasongor

so where should i put the

   

   custom_cam:

   

   spawn Camera targetname "camera" origin self.origin

   $camera follow_distance 190

   $camera orbit_height 70

   $camera speed 1.4

   

   drawhud 0

   

   letterbox 1

   

   //freeze player

   freezeplayer $player

   

   

   // orbit the radio

   $camera orbit $countdown_radio

   

   //some effects

   fadein 5.0 0.0 0.0 0.0 1.0

   // watch for 5 seconds

   

   wait 5

   

   

   clearletterbox

   cueplayer

   

   releaseplayer  $player

   $camera delete

   

   end

   

   

   code?

   

   inside the countdown.txt?

jasongor

I know wht you mean Elgan...

   

   any good pk3 editor program that i can use to edit the thing??

   

   thanks

jasongor

ok, everythings working fine but i am still not sure about this

   

   Open HTR/camera.scr and create a new thread named "custom_cam". In their use the code in the threads above to make your own code to veiw a cam.

   

   do u mean the custom_cam.scr will store in

   

   HTRcamera.scrcustom_cam.scr

   

   OR

   

   HTRcustom_cam.scr

   

   

   BUT for the first approarch..the pk3 editor will crash

   and for the second approarch..the file won't work..simply a TDM gametype...

   

   Thanks again Elgan

Elgan {sfx}

edit the radio.scr with the line i showed u.

   

   then open camera.scr and paste this in

   

   

   custom_cam:
   
   spawn Camera targetname "camera" origin $countdown_radio.origin
   $camera follow_distance 190
   $camera orbit_height 70
   $camera speed 1.4
   
   drawhud 0
   
   letterbox 1
   
   //freeze player
   freezeplayer $player
   
   
   // orbit the radio
   $camera orbit $countdown_radio
   
   //some effects
   fadein 5.0 0.0 0.0 0.0 1.0
   // watch for 5 seconds
   
   wait 5
   
   
   clearletterbox
   cueplayer
   
   releaseplayer  $player
   $camera delete
   
   end
   

   

   then done, a thread is like a function /section in a script. not a new script.

jasongor

u want me to overwrite the whole camera.scr or add above/below the orginal camera.scr script?

   

   Sorry Elgan, i am very fresh to pk3 editing...and thank you for ur help so far :)

jasongor

so, the new camera.scr will look like this??

   

   [sky]custom_cam:

   

   spawn Camera targetname "camera" origin $countdown_radio.origin

   $camera follow_distance 190

   $camera orbit_height 70

   $camera speed 1.4

   

   drawhud 0

   

   letterbox 1

   

   //freeze player

   freezeplayer $player

   

   

   // orbit the radio

   $camera orbit $countdown_radio

   

   //some effects

   fadein 5.0 0.0 0.0 0.0 1.0

   // watch for 5 seconds

   

   wait 5

   

   

   clearletterbox

   cueplayer

   

   releaseplayer  $player

   $camera delete

   

   end

   

   

   main local.dmteam:

   

      level.round_times = getcvar "countdown_times"

      level.round_times = int level .round_times

      level.round_times++

      setcvar "countdown_times" level.round_times

   

      spawn Camera targetname "camera" origin self.origin

      $camera follow_distance 190

      $camera orbit_height 70

      $camera speed 1.4

   

      drawhud 0

   

      letterbox 1

      self waitexec global/get_weapon.scr

      local.player = spawn animate

      local.player.model = self.brushmodel

      local.player hide

      local.player notsolid

      local.player.origin = self.origin

      local.player.angles = self.angles

      local.player show

   

   

      //$player noclip   

      self respawn

      $player hide

      

      freezeplayer $player

   

   

      if(self.weapon != "models/weapons/unarmed.tik")

      {

         local.player anim unarmed_run_into_wall               

      }

      else

      {

         local.player anim unarmed_stand_idle                         

      }

   

      local.gun = spawn animate

      local.gun.model = self.weapon

      local.gun.origin = local.player.origin

   

      local.gun attach local.player  "tag_weapon_right"

      local.player attachmodel "items/walkietalkie.tik" "Bip01 Pelvis" 0.8 "fake_pelvis_radio" 1 -1 -1 -1 -1 ( 1.5 -4 -10.0 )

      $fake_pelvis_radio.angles = ( 0 90 90 )

   

   

      $camera orbit local.player

   

      fadein 5.0 0.0 0.0 0.0 1.0

   

      wait 1

      

      local.gt = getcvar "g_gametype"

   

      setcvar "g_gametype" "4"

   

      teamwin local.dmteam

   

      setcvar "g_gametype" local.gt

      

      wait 2

   

      cuecamera $camera

   

      wait 4

   

      clearletterbox

      cueplayer

   

      $fake_pelvis_radio delete

      local.player delete

   

      releaseplayer  $player

      

   

   end

   

   custom_cam:

   

   spawn Camera targetname "camera" origin $countdown_radio.origin

   $camera follow_distance 190

   $camera orbit_height 70

   $camera speed 1.4

   

   drawhud 0

   

   letterbox 1

   

   //freeze player

   freezeplayer $player

   

   

   // orbit the radio

   $camera orbit $countdown_radio

   

   //some effects

   fadein 5.0 0.0 0.0 0.0 1.0

   // watch for 5 seconds

   

   wait 5

   

   

   clearletterbox

   cueplayer

   

   releaseplayer  $player

   $camera delete

   

   end

   

   [/sky]

   

   

   and the new radio.scr will look like this?

   

   [sky]main local.origin:

   

      spawn level.radio_model "targetname" "countdown_radio" "classname" "scriptmodel"

      //local.radio model "items/explosive.tik" //"items/walkietalkie.tik"

      local.radio = $countdown_radio

      local.radio.origin = local.origin

      local.radio.angles = ( 0 0 0 )

      local.radio solid

      local.radio droptofloor

      local.radio light 1 0 0 50

   

   waitexec HTP/camera.scr::custom_cam

   

      local.hit_box = spawn trigger_multiple "spawnflags" 128 "targetname" "radio_box"

      local.hit_box setsize ( -20 -20 -20 ) ( 20 20 20 )

      local.hit_box setthread shot

      local.hit_box.origin = local.radio.origin

   

      local.use_box = spawn trigger_use  "targetname" "radio_use"

      local.use_box setsize ( -35 -35 -35 ) ( 35 35 35 )

      local.use_box setthread use

      local.use_box.origin = local.radio.origin

   

      local.radio.use = local.use_box

      local.radio.shot = local.hit_box

   

      local.use_box glue local.radio

      local.hit_box  glue local.radio

   

      local.max_idle = getcvar "countdown_idle"

   

      if(local.max_idle == "")

      {

         local.max_idle = 300

         setcvar "countdown_idle" "300"

      }

      else

      {

         local.max_idle = int local.max_idle

      }

   

      if(local.max_idle == 0)

      {

         local.max_idle = -1

      }

   

      local.idle = 0

      while($countdown_radio)

      {

         wait 1

         local.idle ++

         if(local.idle == 60)

         {

   

            thread flash

         }

   

         if(local.idle == local.max_idle && ($countdown_radio))

         {

            $countdown_radio.shot delete

            $countdown_radio.use delete

            $countdown_radio delete

            waitframe

            local.origin = waitexec HTR/setup.scr::getorigin

            exec HTR/radio.scr local.origin

            end

         }

      }

   

   end

   

   flash:   

      local.state =1

   

      while($countdown_radio)

      {

         wait 1

         if($countdown_radio != NIL && $countdown_radio != NULL)

         {

            if(local.state ==1)

            {

               local.state = 0

               $countdown_radio light 1 0 0 100

            }

            else

            {

               local.state = 1

               $countdown_radio light 0 0 1 100

            }

         }

      }

   end

   

   shot:

      local.player = parm.other

      $countdown_radio physics_on

      $countdown_radio.velocity =  ( 0 0 150 ) + local.player.forwardvector * 500

   end

   

   use:

   

      local.player = parm.other

      local.player playsound m3l2_radio_pickup

      

      local.player.target = local.player

   

      local.team = local.player.dmteam

      local.team  = waitexec global/strings.scr::to_upper local.team  0

      iprintlnbold (local.team  + " have the radio!")

   

      $countdown_radio.shot delete

      $countdown_radio.use delete

      $countdown_radio delete

   

      local.player attachmodel level.radio_model "Bip01 Pelvis" 0.8 "pelvis_radio" 1 -1 -1 -1 -1 ( 1.5 -4 -10.0 )

      $pelvis_radio.angles = ( 0 90 90 )

   

      local.light = getcvar "countdown_light"

   

      if(local.light != "0")

      {

         local.player light 1 0 0 100

      }

   

      local.player exec HTR/player_radio.scr

   end[/sky]

Elgan {sfx}

yeah that should do

   

   u nee dto add the line to radio.scr also

jasongor

i did add both the things u told me....

   

   it still doesn't work.....

   

   u want me to upload the file so that u can check it for me?

Elgan {sfx}

ok

   

   does it even run now?

jasongor

it runs. but it didn't show the camera things....

   

   the link is here....

   

   http://www.geocities.jp/www_hkmz_com/zzz_testing_countdown.zip">http://www.geocities.jp/www_hkmz_com/zzz_testing_countdown.zip

   

   (right click and save as)

   

   Thanks again Elgan

Elgan {sfx}

after download the  file seems to be corrupt and wont open: