mg42

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
martijn_NL
Map Reviewer
Posts: 156
Joined: Mon Apr 14, 2003 5:33 pm
Location: The Netherlands
Contact:

mg42

Post by martijn_NL »

I was doing the turorial that was including with the spearhead SDK. But the thing with the mg-42 tutorial didnot work.
This is the tutorial (the mg 42 part):

Create a brush where you can rest the MG-42 on. Create another brush, bring up your ?Entity? window and select ?static_weapon_mg42bipod? and place it on top of your brush for the MG42. Now create another brush, open your ?Entity? window, select ?addon_turretweapon_german_mg42? and line it up with your bipod that you just created. Add a $targetname ?mg42?. Create another brush, open your ?Entity? window and select ?ai_german_wehrmact_soldier?. Press ?i? to bring up your ?AI Parameters? window, adjust hearing and sight to 2048 and enter the $targetname ?mg42_guy?. Now deselect the german soldier and select the MG42. While the MG42 is still selected also select the mg42_guy and press (ctrl + k) to target the mg42 to the enemy AI.

Sry no picture
Diagram 1-5 (Top View)


Add the following code to your script:


//----------------------------------------------------------------------------
InitMG42s:
//
// Initialize MG42s in the level...
//----------------------------------------------------------------------------

if ( self==NIL )
{
println "No MG42s in level."
end
}

self maxyawoffset 70.0
self pitchcaps "-20 20 0"
self AIbulletspread 350 175
self convergetime 0.25

end


Add the following line to main:


$mg42 waitthread InitMG42s

Now we have our German manning the Mg42.




But the mg42 with the gunner doesn't work in my map. I did anything that was said in the tut, but it doesn't work. Please help me :(
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hmm I don't have any experience with spearhead scripting, but I know this wouldn't suffice for mohaa.

Maybe you need to include a call to a global script, for example exec global/turret.scr

Oh and have a nice birthday :D
Image
User avatar
martijn_NL
Map Reviewer
Posts: 156
Joined: Mon Apr 14, 2003 5:33 pm
Location: The Netherlands
Contact:

Post by martijn_NL »

can anybody else help me?
nihilo
Sergeant Major
Posts: 107
Joined: Thu Mar 13, 2003 6:07 am

Post by nihilo »

lol.. first time jv_map's help wasn't good enough
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Post by Yarik »

lol.. first time jv_map's help wasn't good enough
(not the first time)
























LOL JUST KIDDING. Jv is great...
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
Post Reply