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
Portable MG42 in Destroyed Village
Moderator: Moderators
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.
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.
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
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.
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.
Desert-Eagle
....The Eagle Has Landed...
....The Eagle Has Landed...
Mg 42 Carryable
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?
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?
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
---------------------------
---------------------------------------
//*** 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
---------------------------
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
---------------------------
---------------------------------------
//*** 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
That might have something to do with it.
lol
I'll try it now
lol
I'll try it now
