Page 1 of 1
Portable MG42 in Destroyed Village
Posted: Sat Feb 01, 2003 6:43 am
by Eviscero
How would i add a portable MG42 to a map such as destroyed village?
I know i have to use a script and instruct it to call the model & tik and also provide coordinates; However, i have no idea how to get started.
Help me out!!
Thanks
-Evis
www.after-hourz.com
Posted: Mon Feb 03, 2003 4:54 pm
by jv_map
Generally, find the right coords in the map by typing 'coord' in the console.
Write down both the coords and angles.
Then open up the script file of the map and add the following line below level waittill spawn:
spawn <model name> origin <coords> angles <angles>
Don't have Spearhead so don't know the model name. Both <coords> and <angles> should be vectors.
Posted: Mon Feb 03, 2003 7:52 pm
by Desert Eagle
Do as JV states above about finding angles and coord. After that open copy the mohdm2.scr file. You do not want to edit the orginal. You will want to create a pk3 keeping the directory tree intact.
after the line
exec global/DMprecache.scr you will want to place this:
cache models/weapons/mg42carryable.tik
this will stop console from erroring because of an item not already cached.
after the line
level waittill spawn
local.mg = spawn script_model
local.mg"models/weapons/mg42carryable.tik"
local.mg = ( 132 1255 240 )
local.mg = ( 0 90 0 )
local.mg solid
A note on spawning models, the bigger the model, the bigger the problems with players fps dropping.
I have done alot of modding until getting into mapping. You can download an example of mods here:
http://www.ravensraiders.net/Raovmapmix.ZIP
Just unzip, open the pk3 files copy out the scr files and read them with notebad.
Posted: Tue Feb 04, 2003 1:39 am
by mohaa_rox
The cache stuff should be in the yourmapname_precache.scr
Mg 42 Carryable
Posted: Tue Feb 04, 2003 6:05 am
by Eviscero
Ok guys
well i tried per your advice and still no love.
i copied the MOHDM2.scr from the spearhead Pk3 file and kept the dir structure using pakscape " maps/dm/
I also get sound issues when i mess with the scr
the ambient sounds in mohdm2 dont play
I used the following coord and info
---------------------------------------
//*** Precache Dm Stuff
exec global/DMprecache.scr
cache models/weapons/mg42carryable.tik
exec global/door_locked.scr::lock
level.script = maps/dm/mohdm2.scr
exec global/ambient.scr mohdm2
local.mg = spawn script_model
local.mg = "models/weapons/mg42carryable.tik" ******
local.mg = ( -696.29 -415.02 88.13 )
local.mg = ( 41.43 88.43 0.00 )
local.mg solid
level waittill spaw
$world farclipoverride -1
end
---------------------------
The line with **** is something of an unknown to me.
As per Desert Eagle's post the line looks like this:
local.mg"models/weapons/mg42carryable.tik"
But the rest of that section is :
local.mg = XXX
Is there a typo somewhere? Is that the correct syntax?
Is there anything else im missing?
Posted: Tue Feb 04, 2003 7:36 am
by jv_map
Syntax error:
---------------------------------------
//*** Precache Dm Stuff
exec global/DMprecache.scr
cache models/weapons/mg42carryable.tik
exec global/door_locked.scr::lock
level.script = "maps/dm/mohdm2.scr"
exec global/ambient.scr mohdm2
local.mg = spawn script_model
local.mg.model = "models/weapons/mg42carryable.tik" //******
local.mg.origin = ( -696.29 -415.02 88.13 )
local.mg.angles = ( 41.43 88.43 0.00 )
local.mg solid
level waittill spawn
$world farclipoverride -1
end
---------------------------
no love
Posted: Tue Feb 04, 2003 6:10 pm
by Eviscero
No good...
Posted: Tue Feb 04, 2003 7:09 pm
by jv_map
Forgot something:
---------------------------------------
//*** Precache Dm Stuff
exec global/DMprecache.scr
cache models/weapons/mg42carryable.tik
level waittill spawn
exec global/door_locked.scr::lock
level.script = "maps/dm/mohdm2.scr"
exec global/ambient.scr mohdm2
local.mg = spawn script_model
local.mg.model = "models/weapons/mg42carryable.tik" //******
local.mg.origin = ( -696.29 -415.02 88.13 )
local.mg.angles = ( 41.43 88.43 0.00 )
local.mg solid
$world farclipoverride -1
end
---------------------------
level waittill spawn
Posted: Tue Feb 04, 2003 9:42 pm
by Eviscero
That might have something to do with it.
lol
I'll try it now
Nope
Posted: Tue Feb 04, 2003 9:56 pm
by Eviscero
Not a damn thing is spawning.
Is my dir structure correct? maps/dm/mohdm2.scr
The scr. is the only file i have in my PK3