Page 2 of 2

Posted: Tue Nov 18, 2003 8:09 am
by bdbodger
$ai exec global/moveto.scr anim/walk.scr $mynode

the anim/walk.scr will give you the right walk animation for the weapon group you are useing if you use the moveto command . Or just use

$ai walkto $mynode

either one is ok

Posted: Tue Nov 18, 2003 1:19 pm
by smartaiguy
OK I was wondering what one I should use, but you can use both.

Posted: Fri Nov 28, 2003 4:54 am
by Lone_Rebel
This is the script i used, all of this is straight from the AI patrol tutorial in the .Map tutorial section.


//SCRIPTING: Gener_AL
main:
exec global/ai.scr
exec global/loadout.scr maps/yourmapname.scr
exec gloal/friendly.scr

level waittill prespawn

exec global/ambient.scr yourmapname

level waittill spawn

$player item weapons/colt45.tik
level.script = "maps/yourmapname.scr"
thread objectives // calls objectives thread
thread badguy1move // calls badguy1move thread

end

objectives:
waitthread global/objectives.scr::add_objectives 1 2 "Kill the guards." $obj1.origin
set_objective_pos $obj1
thread objective1
end

objective1:

waitthread global/objectives.scr::current_objectives 1
$player stufftext "tmstart sound/music/mus_04f_suspense.mp3"
iprintln "kill the guards"
if (IsAlive $badguy1)
$badguy1 waittill death
if (IsAlive $badguy)
$badguy waittill death
thread levelend
end


levelend:

waitthread global/objectives.scr::current_objectives 0
iprintln "mission completed"
wait 1
exec global/missioncomplete.scr test_mohdesigntut3 1
end