Getting AI to use MG42...help

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

Moderator: Moderators

Post Reply
greywolff
Corporal
Posts: 31
Joined: Tue Dec 17, 2002 3:06 pm
Location: USA

Getting AI to use MG42...help

Post by greywolff »

Ok I'm stumpt. I tryed a bunch of different things to get this to work but no luck (making me feel even worse...lol). Well anyway this is what I have so far.

I made a siple room(so I can Learn it first)

Put a wall 48 units high in to but he mg42 on

placed the bipod and gun in

then I read a couple of tutuarls and went with them

gave the gun a targetname/mg42


Then added a AI/german/wehrmact/soldier

Gave him key/values

targetname/mg42_gunner

target/mg42

turret/mg42

type_idle/machinegunner

type_attack/turret

And this is my script file:

exec global/loadout.scr maps/test_learn.scr
exec global/si.scr

main:


level waittill prespawn:


level waittill spawn:
$mg42 thread global/mg42_active.scr::mg42

end

Now I know that the AI is link to the gun ( arrow points to it) and when I compile the map He runs to the gun but will not shot. If I knock him off the gun he pulls his rifle out ad shoots me then(go figure...lol).

any ideas would be great thanks all.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Your script is corrupt, i.e. these colons should be there. Try this for a change:

Code: Select all

main:
    level waittill spawn
    $mg42 thread global/mg42_active.scr::mg42
end
Image
greywolff
Corporal
Posts: 31
Joined: Tue Dec 17, 2002 3:06 pm
Location: USA

Post by greywolff »

Thanks JV. I will give it a try and let you know what happens.
greywolff
Corporal
Posts: 31
Joined: Tue Dec 17, 2002 3:06 pm
Location: USA

Post by greywolff »

WOOHOOO. It works yeah. Thanks so much JV. Didnt realize I was writing my script out wrong like that. Now I will be able to get all the stuff I have been trying to get to work actually working.

Agian thanks very much.
Post Reply