A noob asks another question...

Started by masterG, September 24, 2006, 06:39:27 AM

Previous topic - Next topic

masterG

Hey guys, a few questions for the experts:

   1. How do i script an mg42 into a mapscript

   2. How do i spawn say, a usable jeep in a map

   3. How do i set up teleport points on a map

   4. How do i spawn a stationary bot to guard a building and shoot on sight?

   5. How do i fix this script to allow people to go into and out of the range area?

   

   main:

   removeclass actor

   removeclass health

   //removeclass item

   //removeclass turretweapon

   

   setcvar "g_obj_alliedtext1" "BootCamp"

   setcvar "g_obj_alliedtext2" "IP: 72.232.214.22:12203"

   setcvar "g_obj_alliedtext3" ""

   setcvar "g_obj_axistext1" ""

   setcvar "g_obj_axistext2" "SSWikingClan.com"

   setcvar "g_obj_axistext3" "WikingVictories server"

   setcvar "g_scoreboardpic" ""

   setcvar "g_gametype" "1"

   setcvar "timelimit" "10"

   

   

   

   //FFA spawns

   local.deathmatch = spawn info_player_deathmatch origin "-2713.72 -275.91 -288.10" angle 43.95

   local.deathmatch = spawn info_player_deathmatch origin "-1481.37 -859.53 -309.88" angle -162.73

   local.deathmatch = spawn info_player_deathmatch origin "-1429.38 -1446.47 -308.46" angle -170.28

   local.deathmatch = spawn info_player_deathmatch origin "562.45 -3685.04 -387.88" angle 178.95

   local.deathmatch = spawn info_player_deathmatch origin "675.41 -3582.84 -387.88" angle 86.40

   local.deathmatch = spawn info_player_deathmatch origin "2015.39 -2943.66 -387.88" angle 20.52

   

   local.deathmatch = spawn info_player_deathmatch origin "3418.90 -2594.81 -387.88" angle -43.72

   local.deathmatch = spawn info_player_deathmatch origin "4375.48 -2950.76 -339.95" angle 103.81

   local.deathmatch = spawn info_player_deathmatch origin "5280.56 -2950.92 -387.88" angle 90.10

   local.deathmatch = spawn info_player_deathmatch origin "5564.25 -2919.66 -387.88" angle -0.05

   local.deathmatch = spawn info_player_deathmatch origin "5167.81 -1716.17 -339.95" angle -88.12

   local.deathmatch = spawn info_player_deathmatch origin "3759.99 2163.11 -339.95" angle -85.86

   local.deathmatch = spawn info_player_deathmatch origin "4302.35 -2371.82 -300.00 " angle -65.75

   

   thread global/exploder.scr::main

   

   level waittill prespawn

   

   level.script = "maps/training.scr"

   

   

   

      //*** Precache Dm Stuff

      exec global/DMprecache.scr

      exec ubersound/ubersound.scr

      exec global/ambient.scr training

      exec global/door_locked.scr::lock

      

   

   //*** INITIALIZE EXPLODING BUILDINGS

   

   thread global/exploder.scr::main

   

   

   

   level waittill spawn

   

   end

   

   Thanks for all your help guys.

Cobra {sfx}

Hi again m8y ...

   

   1. Download the M5L1B pk3 from the Mod Files section, i added a firing MG42 to that, it will show you how to spawn one

   

   2. If you look also in the Mod Files section youll find a drivable vehicle script adapted by Kev from Scorpio Midgets code

   

   3. Theres some teleport code here in the forums ( search button :P )

   

   4. You cant spawn bots in Mohaa that are active - it crashes the server, you can disable their AI but that means they stand around like dummies, maybe adapt the code from Ric-hards script in other thread for what you need

   

   5. hmmm hold on ...

   

   // Place after level waittill spawn eg ..

   

   

   level waittill spawn
   
   $door_2 unlock
   $door_3 unlock
   $door_4a unlock
   $door_5a unlock
   $door_6a unlock
   $door_7a unlock
   $door_8a unlock
   $exit_door unlock // better test this one is safe to have unlocked ... yah its safe :)
   $clip_2 delete
   end
   

   

   

   Its always worth looking through the original SP scripts to see if theres any good information or usable things you might want to keep, i usually copy the BSP from PAK5.PK3 to my desktop and convert it to a .MAP with MohBSPtoMohMAP and use MohRadiant to look through the map for usable extras/targetnames etc

   

   Youll probs need to spawn a crate or something for them to get to the original map start area as it has a wooden fence that you cant seem to get back over

   

   There are triggers in the map you may need to disable/remove (some testing ingame for ya :P)

   

   I cant see any clips blocking the player in Radiant from getting through the gap to the Range - ill keep looking to see if there is something there that can be removed (after ive had a good sleep :P)

   

   have fun
Sleep? What is that?

masterG

thanks that's great info. How do i spawn a crate by the way......

Cobra {sfx}

Same as you spawn a tank or an MG42 etc, look in PAk0.pk3 at the models, and change the dir/tik name to the one you want in your script.

   

   Maybe time to read thru the scripting tips?
Sleep? What is that?

masterG


masterG

can't get kevin's drivables to download from your mod section, think it's  a broken link...

masterG

hey why does the sky start fritzing on some converted maps? any way to stop that?

Cobra {sfx}

No idea what fritzing means m8y but you should use the original scripts settings for farplane etc if you have problems
Sleep? What is that?

masterG

can't get kevin's drivables to download from your mod section, think it's a broken link...

Cobra {sfx}

Try pming him - offsite linking is out of my control

   

   ps ... the Jeep has no wheel animations in AA so it just kinda slides around
Sleep? What is that?