Page 1 of 1

AI MG42

Posted: Tue Mar 23, 2004 5:48 pm
by fuhrer
hey i went thru the tutorial and i got an ai spawning and instantly moving to the gun (not running as it says it should do in the tut) and he just stands there doing nothing.

i copied the basic script from another dm map i was messing with, i dunno if i have to set it up as Single Player, not sure how to do that.

Code: Select all

// mg42
// ARCHITECTURE: fuhrer
// SCRIPTING: fuhrer

main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none" 

level waittill prespawn

exec global/ai.scr
level.script = "maps/dm/mg42.scr" 

level waittill spawn

$mg42 thread global/mg42_active.scr::mg42

end

Posted: Tue Mar 23, 2004 6:40 pm
by blue60007
well:

Code: Select all


// mg42 
// ARCHITECTURE: fuhrer 
// SCRIPTING: fuhrer 

main: 

level waittill prespawn 

exec global/ai.scr 
level.script = "maps/dm/mg42.scr" 

level waittill spawn 

$mg42 thread global/mg42_active.scr::mg42 

end

then I think if you have the pathnodes and everything set up right, it should work

Posted: Tue Mar 23, 2004 6:58 pm
by fuhrer
i didnt think that was gonna work,

i double checked the pathnodes, they are both fine, just to make sure....i have the one behind the gun just touchin the butt of the gun bout chest height of the AI.

i have the bsp and script files located in maps/dm

is the dm causing the problem? as it must be singleplayer? just map dir only?

the tutorial didnt have much depth in explanation it was more do this and that and it will work, not explaining why.

Posted: Tue Mar 23, 2004 7:11 pm
by fuhrer
ok ive moved the node closed to the mg42 and ive put the bsp n scr in just a map folder zipped that n started the map thru the console....

still no activity from the AI and now no sound from the MG

im runnin this in BT will this cause a problem?

Posted: Tue Mar 23, 2004 7:50 pm
by blue60007
OK I see your problem now. The scripts fine but you need to name your map test_mapname (change mapname no whatever it is). With out test_ prefix the ai stuff (animations) won't be loaded and nothing will happen. Also it does need to be in the /maps/ dir. You'll need to either use the 'map mapname' command or type 'maplist' in the console and double click the map. That should solve your problem, key word there is should.

Posted: Wed Mar 24, 2004 3:11 am
by fuhrer
thanx ill give it a shot

Posted: Wed Mar 24, 2004 6:39 am
by fuhrer
ok i tried, that

first game it crashed to the consolewith some error i didnt get a chance to read, restarted comp

second time it got to the map then froze.

Posted: Thu Mar 25, 2004 2:05 am
by blue60007
hmmm. :oops: