MG 42 .scr script

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
jordanw23
Private
Posts: 8
Joined: Thu Feb 12, 2004 11:10 pm

MG 42 .scr script

Post by jordanw23 »

Could someone please write me up a script for an MG42 that can be fired and used and can be put into a .scr.....I know how to put s in just not how to add attributes and stuff...
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

See Game Objects Usage Doc.doc that ships with mohradiant :idea:
Image
jordanw23
Private
Posts: 8
Joined: Thu Feb 12, 2004 11:10 pm

Post by jordanw23 »

can't get it to work, could someone please correct my script, this will be going in a .scr

mg42working:

local.static = spawn script_model
local.static model "statweapons/mg42_gun.tik"
local.static.origin = ( -2586.90 851.93 74.40)//5 -2215 55
local.static.angles = ( 0 0 0)
local.static solid
setPlayerUsable 1
firetype bullet
end
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

setPlayerUsable 1
firetype bullet

Why not put local.static in front?
Image
jordanw23
Private
Posts: 8
Joined: Thu Feb 12, 2004 11:10 pm

Post by jordanw23 »

....sry im a n00b. :roll: Thank you sir :)
jordanw23
Private
Posts: 8
Joined: Thu Feb 12, 2004 11:10 pm

Post by jordanw23 »

I am completely confuzzled on this one...when the script is added as usuable it makes all my other spawned models disappear including the usable one im trying to spawn....???could someone please point me in the right direction :?:
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well then get rid of the setplayerusable line... all mg-42s are usuable by default anyway.
Image
jordanw23
Private
Posts: 8
Joined: Thu Feb 12, 2004 11:10 pm

Post by jordanw23 »

ok but do I have the right model....
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes but you spawned it as a script_model and script_models can't be fired.

Instead, spawn it a little different.

local.static = spawn script_model
local.static model "statweapons/mg42_gun.tik"

should be:

local.static = spawn "statweapons/mg42_gun.tik"

Then all should be fine 8-)
Image
User avatar
Franko74
Corporal
Posts: 45
Joined: Sat Jan 03, 2004 12:48 am
Location: Hungary
Contact:

Post by Franko74 »

Hi, jordanw23

if u have this problem yet just see this example:

http://212.92.14.2/feco/mg42.zip

u can use it to both sides (allies and axis too)

have a nice work:
F74
jordanw23
Private
Posts: 8
Joined: Thu Feb 12, 2004 11:10 pm

Post by jordanw23 »

thank you sir 8-)
Post Reply