Page 1 of 1

Getting AI to use MG42...help

Posted: Fri Jan 24, 2003 11:10 pm
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.

Posted: Sat Jan 25, 2003 9:56 am
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

Posted: Sat Jan 25, 2003 2:02 pm
by greywolff
Thanks JV. I will give it a try and let you know what happens.

Posted: Sat Jan 25, 2003 2:33 pm
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.