MOH Central

Medal of Honor Series Forum => MOHAA Series: General => Topic started by: jasongor on October 14, 2005, 11:54:00 AM

Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 11:54:00 AM
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
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 14, 2005, 12:11:23 PM
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.
Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 12:27:52 PM
but then can u please give me some ideas on the video scripting i should put on the mod?

   

   thanks
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 14, 2005, 12:40:29 PM
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
   
   
Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 12:50:47 PM
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?
Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 01:17:06 PM
I know wht you mean Elgan...

   

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

   

   thanks
Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 01:41:38 PM
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
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 14, 2005, 01:47:47 PM
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.
Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 01:53:46 PM
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 :)
Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 02:17:20 PM
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]
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 14, 2005, 02:45:09 PM
yeah that should do

   

   u nee dto add the line to radio.scr also
Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 03:18:46 PM
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?
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 14, 2005, 06:41:09 PM
ok

   

   does it even run now?
Title: Question about Countdown mod
Post by: jasongor on October 14, 2005, 09:15:19 PM
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

   

   (right click and save as)

   

   Thanks again Elgan
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 15, 2005, 10:12:48 AM
after download the  file seems to be corrupt and wont open:
Title: Question about Countdown mod
Post by: jasongor on October 15, 2005, 12:29:30 PM
Sorry for that,

   

   i fixed the link...thanks

   

   

   http://users.bigpond.net.au/jasongor/countdown.zip
Title: Question about Countdown mod
Post by: jasongor on October 17, 2005, 09:01:07 AM
any luck for me so far? :)
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 17, 2005, 09:29:03 AM
in radio.scr

   

   change this line

   

   

   waitexec HTP/camera.scr::custom_cam
   
   

   

   to this

   

   

   waitexec HTR/camera.scr::custom_cam
   
   
Title: Question about Countdown mod
Post by: jasongor on October 17, 2005, 11:37:37 AM
The camera do work this time, thanks Elgan

   

   BUT

   

   the camera thing didn't show where the radio is...it only freezes all the player and have a first person view

   

   I have uploaded the amended version here for ur persual ---> http://users.bigpond.net.au/jasongor/countdown2.zip
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 17, 2005, 06:17:46 PM
try this code

   

   

   

   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
      cuecamera $camera
   //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
   

   

   i added the line

   

      cuecamera $camera

   

   that should go in camera.scr over the last code u added
Title: Question about Countdown mod
Post by: jasongor on October 17, 2005, 09:39:03 PM
Thanks Elgan, the camera thing do work now

   

   and i want to make it a little more perfect and share to all u guys...

   

   1) How can i make it work if someone who steal the bomb will instantly automatic call out "Cover me" (i.e. V21) (so that other player will know who steal it) OR just show "Cover me" so that it can boardcast to all players.....

   

   2) If someone who carrying the bomb will constantly (or every 10 seconds)show where the player is in red print on the left hand corner of the screen....

   

   Sorry for bothering again, Elgan....
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 17, 2005, 10:12:52 PM
2 is already in therte for stock maps.

   

   for 1.

   

   

   find out the say cmd and in the radio.scr add a stufftext for that cmd.

   

   add the line unde rhere

   

   

   
   use:
   
   local.player = parm.other
   local.player playsound m3l2_radio_pickup
   //add line here
   

   

   

   local.player stufftext "say *23"

   

   that would say whatever the say for 2 3 is. i dont know cover me so u will have to find it out. u do this by pressing v. Then whatever u press next is the first nu,ber, then the next number u press will be the next number.

   

   so

   

   v-2-3 would become code

   

   local.player stufftext "say *23"
Title: Question about Countdown mod
Post by: jasongor on October 18, 2005, 08:39:05 AM
oh..thanks!!

   I have done it!!!

   

   Thanks Elgan for ur help!!  Really appreciate that!!!

   I will upload the final version as soon as i finished testing in my server!!
Title: Question about Countdown mod
Post by: jasongor on October 18, 2005, 09:06:38 AM
Elgan...after serveral testing..i found an error..

   

   When the radio stops at 00:00 (which finished the countdown), the other player which didn't hold the radio blows up (which is correct...) BUT the game didn't end...it stills countinue......which means it didn't start another round.....

   

   I have uploaded the amended version here for ur persual ---> http://users.bigpond.net.au/jasongor/zzz_countdow3n.zip

   

   I have make sure that all the settings is correct...i.e...

   

   countdown 1

   ---------

   

   

   countdown_time 03:00

   --------------

   

   

   countdown_light 1

   ---------------

   

   

   countdown_rounds 3

   ---------------

   

   

   countdown_locate 15

   ----------------

   

   

   countdown_idle 300

   ----------------

   

   Moreover, the red print on the left hand side seems doesn't work too....
Title: Question about Countdown mod
Post by: jasongor on October 19, 2005, 08:26:26 AM
Elgan..r u busy? Or no one can help me.. :(
Title: Question about Countdown mod
Post by: Elgan {sfx} on October 20, 2005, 08:30:52 AM
im not here all the time.ok

   

   take camera.scr

   

   

   open it up and take the thread u added 'custom_cam' and copy it all the wya to end and then move it under main.

   

   

   so it looks like this

   

   

   
   
   
   
   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
   cuecamera $camera
   //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
   

   

   this is because custom_cam is maybe running instead of main.