bots follow ai script problem
Posted: Wed Nov 26, 2008 2:33 am
hi, i used this script to make an ai follow me and whenever the enemy ai goes to shoot the mission always crashes and goes back to the main menu. Heres the script i used:
exec global/auto.scr
level waittill prespawn
exec global/friendly.scr
level waittill spawn
//---------------------------------------------------------------------------
main:
//---------------------------------------------------------------------------
// Tells the AI to move to the player
$F1.destination = $player
$F2.destination = $player
$F3.destination = $player
// Sets the type of friendly soldier
$F1.friendtype = 1
$F2.friendtype = 1
$F3.friendtype = 1
// stagger how far away they keep from their destinations
$F1.distance = 175
$F2.distance = 225
$F3.distance = 250
// setup the friendlies to follow the player...
$F1 thread global/friendly.scr::friendlythink
$F2 thread global/friendly.scr::friendlythink
$F3 thread global/friendly.scr::friendlythink
end
can someone please help.
exec global/auto.scr
level waittill prespawn
exec global/friendly.scr
level waittill spawn
//---------------------------------------------------------------------------
main:
//---------------------------------------------------------------------------
// Tells the AI to move to the player
$F1.destination = $player
$F2.destination = $player
$F3.destination = $player
// Sets the type of friendly soldier
$F1.friendtype = 1
$F2.friendtype = 1
$F3.friendtype = 1
// stagger how far away they keep from their destinations
$F1.distance = 175
$F2.distance = 225
$F3.distance = 250
// setup the friendlies to follow the player...
$F1 thread global/friendly.scr::friendlythink
$F2 thread global/friendly.scr::friendlythink
$F3 thread global/friendly.scr::friendlythink
end
can someone please help.