Portable MG42 in Destroyed Village

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Eviscero
Private
Posts: 7
Joined: Thu Dec 12, 2002 7:34 am

Portable MG42 in Destroyed Village

Post 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
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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.
Image
Desert Eagle
Captain
Posts: 237
Joined: Mon Jan 13, 2003 1:05 am
Location: Mapping Bunker
Contact:

Post 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.
Desert-Eagle
....The Eagle Has Landed...
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

The cache stuff should be in the yourmapname_precache.scr
Live to map, not map to live.
-mohaa_rox, .map
moderator
Eviscero
Private
Posts: 7
Joined: Thu Dec 12, 2002 7:34 am

Mg 42 Carryable

Post 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?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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
---------------------------
Image
Eviscero
Private
Posts: 7
Joined: Thu Dec 12, 2002 7:34 am

no love

Post by Eviscero »

No good...
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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
---------------------------
Image
Eviscero
Private
Posts: 7
Joined: Thu Dec 12, 2002 7:34 am

level waittill spawn

Post by Eviscero »

That might have something to do with it.

lol

I'll try it now
Eviscero
Private
Posts: 7
Joined: Thu Dec 12, 2002 7:34 am

Nope

Post 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
Post Reply