a team of rangers to spawn at the start of the map and follow the player. thus he has a team. they'll follow him just like the brits in t1l2. (SH map 2)
the map is e3l4 (last BT map, my favvy!)
the code i've added is at the end of main, so it calls the thread right before ending main. it goes exactly like this, btw this is perfectly functional in my own maps, i've no idea why it won't work.....
Code: Select all
spawn models/human/1st-ranger_private.tik "$targetname" "friendly1"
spawn models/human/1st-ranger_private.tik "$targetname" "friendly2"
spawn models/human/1st-ranger_sergeant.tik "$targetname" "friendly3"
spawn models/human/1st-ranger_captain.tik "$targetname" "friendly4"
friendly1.targetname = Montgomery
friendly2.targetname = Jameson
friendly3.targetname = Wilson
friendly4.targetname = cappy
//all others use default weaponry.
$Wilson.gun = bar
$cappy.accuracy = 75 //best. besides player.
$Wilson.accuracy = 60 //sergeant, toughie. not as good as cappy though.
$Jameson.accuracy = 45 //private
$Montgomery.accuracy = 45 //private
$cappy.health = 300
$Wilson.health = 290
$Jameson.health = 280
$Montgomery.health = 280
$cappy.destination = $player
$Wilson.destination = $cappy
$Montgomery.destination = $cappy
$Jameson.destination = $cappy
$cappy.frienddtype = 1
$Wilson.friendtype = 1
$Montgomery.friendtype = 1
$Jameson.friendtype = 1
$cappy.distance = 150
$Wilson.distance = 100
$Montgomery.distance = 100
$Jameson.distance = 100
$cappy thread global/friendly.scr::friendlythink
$Wilson thread global/friendly.scr::friendlythink
$Montgomery thread global/friendly.scr::friendlythink
$Jameson thread global/friendly.scr::friendlythink