soldiers wont follow
Posted: Mon Aug 30, 2004 3:56 pm
Does anyone know why my soldiers wont follow me around?
heres what uve done so far..
main:
exec global/auto.scr
exec global/ai.scr
exec global/loadout.scr maps/test_neil.scr
exec global/ambient.scr test_neil
exec global/exploder.scr
//exec global/door_locked.scr::lock
exec global/friendly.scr
exec global/bomber.scr
//local.master = spawn ScriptMaster
//local.master aliascache snd_waterfall sound/amb/waterfall.mp3 soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps "obj dm"
level waittill prespawn
thread tank1
level waittill spawn
waitthread global/items.scr::add_item "binoculars" noprint
$player item weapons/thompsonsmg.tik
$player useweaponclass smg
$player ammo smg 1000
level.script = "maps/test_neil.scr"
level.friendly1.targetname = cappy
level.friendly2.targetname = private
level.friendly3.targetname = radio
waitthread global/objectives.scr::add_objectives 1 2 "Meet up with your friends." $obj1.origin
set_objective_pos $obj1
thread obj1
end
obj1:
$talk_trigger waittill trigger
// cappy talks to player
$cappy turnto $player
$cappy lookat $player
wait 0.2
$cappy anim 11b100_BritCaptGreet
$cappy waittill animdone
$cappy anim 12C105_dialogue
$cappy waittill animdone
$cappy turnto NULL
$cappy lookat NULL
// Tells the AI to move to the player
$cappy.destination = $player
$friend2.destination = $player
$friend3.destination = $player
// Sets the type of friendly soldier
$cappy.friendtype = 1
$friend2.friendtype = 1
$friend3.friendtype = 1
// stagger how far away they keep from their destinations
$cappy.distance = 175
$friend2.distance = 225
$friend3.distance = 250
// setup the friendlies to follow the player...
$cappy thread global/friendly.scr::friendlythink
$friend2 thread global/friendly.scr::friendlythink
$friend3 thread global/friendly.scr::friendlythink
waitthread global/objectives.scr::add_objectives 1 2 "Meet up with your friends." $obj1.origin
tank1:
$tank1_trigger waittill trigger
exec global/bomber.scr::bomb 1//sets of all #set 1
end
heres what uve done so far..
main:
exec global/auto.scr
exec global/ai.scr
exec global/loadout.scr maps/test_neil.scr
exec global/ambient.scr test_neil
exec global/exploder.scr
//exec global/door_locked.scr::lock
exec global/friendly.scr
exec global/bomber.scr
//local.master = spawn ScriptMaster
//local.master aliascache snd_waterfall sound/amb/waterfall.mp3 soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps "obj dm"
level waittill prespawn
thread tank1
level waittill spawn
waitthread global/items.scr::add_item "binoculars" noprint
$player item weapons/thompsonsmg.tik
$player useweaponclass smg
$player ammo smg 1000
level.script = "maps/test_neil.scr"
level.friendly1.targetname = cappy
level.friendly2.targetname = private
level.friendly3.targetname = radio
waitthread global/objectives.scr::add_objectives 1 2 "Meet up with your friends." $obj1.origin
set_objective_pos $obj1
thread obj1
end
obj1:
$talk_trigger waittill trigger
// cappy talks to player
$cappy turnto $player
$cappy lookat $player
wait 0.2
$cappy anim 11b100_BritCaptGreet
$cappy waittill animdone
$cappy anim 12C105_dialogue
$cappy waittill animdone
$cappy turnto NULL
$cappy lookat NULL
// Tells the AI to move to the player
$cappy.destination = $player
$friend2.destination = $player
$friend3.destination = $player
// Sets the type of friendly soldier
$cappy.friendtype = 1
$friend2.friendtype = 1
$friend3.friendtype = 1
// stagger how far away they keep from their destinations
$cappy.distance = 175
$friend2.distance = 225
$friend3.distance = 250
// setup the friendlies to follow the player...
$cappy thread global/friendly.scr::friendlythink
$friend2 thread global/friendly.scr::friendlythink
$friend3 thread global/friendly.scr::friendlythink
waitthread global/objectives.scr::add_objectives 1 2 "Meet up with your friends." $obj1.origin
tank1:
$tank1_trigger waittill trigger
exec global/bomber.scr::bomb 1//sets of all #set 1
end