enemy walking

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
smartaiguy
Brigadier General
Posts: 512
Joined: Tue Jul 08, 2003 2:52 pm

Post by smartaiguy »

OK I was wondering what one I should use, but you can use both.
Fallschirmjager in europe(FIE)! (Mapper/Webmaster)
.Map map reviewer
Look up in the sky! Its a bird its a plane, oh wait its a bird.:lol:
Lone_Rebel
Sergeant
Posts: 72
Joined: Sat Jul 05, 2003 11:39 pm
Location: USA
Contact:

Post 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
It's not whether you win or lose... It is how many enemies you take down with you that counts.
Image

Lone's MOH Maps
Post Reply