#contact2
pltcontactlist = []
_Numcontacts = count list detected - 1
_i = 0
_contactknows = 0.35
_contactcalled = list detected select 0
#contact2part2
_contact = (list detected select _i)
_sqd = group player
pltcontactlist = pltcontactlist + [list detected select _i]
? (leader _sqd) knowsabout _contact > _contactknows: _contactcalled = _contact; _contactknows = ((leader _sqd) knowsabout _contactcalled)
_i = _i + 1
? _i <= _Numcontacts: goto "contact2part2"
_type = ""
? "Tank" counttype [_contactcalled] == 1: _type = "ENEMY TANK, "
? "Man" counttype [_contactcalled] == 1: _type = "ENEMY INFANTRY, "
? "APC" counttype [_contactcalled] == 1: _type = "ENEMY APC, "
? "M2StaticMGE" counttype [_contactcalled] == 1: _type = "ENEMY MACHINE GUN EMPLACEMENT, "
? "SoldierESniper" counttype [_contactcalled] == 1: _type = "ENEMY SNIPER, "
? "_x counttype [_contactcalled] == 1" count [{OfficerE},{OfficerEHG}] > 0: _type = "NEMY OFFICER, "
? "_x counttype [_contactcalled] == 1" count [{SoldierESaboteurPipeHG},{SoldierESaboteurPipe}] > 0: _type = "ENEMY SPETZ NATZ, "
_dis = ((((leader _sqd) distance _contactcalled)/10) - ((((leader _sqd) distance _contactcalled)/10) mod 1))*10
? (_dis == 0) : _dis = 5
_dir = ""
? ((getpos (leader _sqd) select 1) + (_dis/2)) <= (getpos _contactcalled select 1): _dir = "north"
? ((getpos (leader _sqd) select 1) - (_dis/2)) >= (getpos _contactcalled select 1): _dir = "south"
? ((getpos (leader _sqd) select 0) + (_dis/2)) <= (getpos _contactcalled select 0): _dir = _dir + "east"
? ((getpos (leader _sqd) select 0) - (_dis/2)) >= (getpos _contactcalled select 0): _dir = _dir + "west"
raduse = true
player sidechat format ["CONTACT! %1%2 METRES TO THE %3",_type,_dis,_dir]
reveal _contactcalled foreach units _sqd
raduse = false
exit
okay thats what ive got so far
i know its wrong cause no sidechat comes up on the screen just an error about
"_x reveal _contactcalled" foreach listwest
i got this from Sui's script and modified it hope he doesnt mind i probaly should of asked him first but i couldnt be bothered waiting for a reply so i thought i might as well
anyway the problem is no text comes up on screen
i mignt need to explain some bits and i need explaing some bits
it should (i think) get what kind of unit has been detected by a east detected by west trigger than check if its a tank, apc, infantry etc
then it gets the distance and direction
then shows a sidechat with that info in it.
i have set up a east detected by west trigger name = detected
conditon = this
onactivation = [this] exec "contact.sqs"
above is apart of contact.sqs wich is basically a different version wich works but calls out map coords instead of what this one does
EDIT - edited the script slightly got some text but not the right kind i got this
"CONTACT! Scalar bool array 0fffceff01f METRES TO THE "
something like that
its not sayng what the enemy is
how many metres
or what direction all the other text fine but whats not there is the main part of the script