OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: cannonfoda on 25 May 2003, 11:56:27

Title: Targetting with binoculars
Post by: cannonfoda on 25 May 2003, 11:56:27
hey guys,

i need to know if there is a script to detect if the player has their binoculars out and has right-clicked to target a specific unit. when this happens one of the objectives have been completed. as i'm only a noob at scripting i was hoping some of the gurus out there could help.

thx
Title: Re:Targetting with binoculars
Post by: Tomb on 25 May 2003, 12:12:49
I'm honestly afraid that its gonna be VERY hard to find a way to detect wether player (or anyone) have "clicked" the target button, so to speak.  :-\ ::)

But ya can determine if a d00d has got them binocs there :thumbsup:

NameOfUnit HasWeapon "Binocular"

...only, it's not very good  ::) :hmm:

In other words - the AI use those stinkin binoculars all the time when they have 'em, so its quite pointless to try and set up "HasWeapon" conditions, unless ya DON'T give them the binocs untill they're supposed to use them (which off course kills the randomness (randomness?? LOL) ).  :P ::) ;D


Not sure if yer wishes can become reality, mate  :-\ ???



=========
[mod]  *he DID say "player", Tomb!*  ::)


uuum, well... same prob. basically


 :D What you CAN use successfully is the "KNOWSABOUT" condition in a trigger :thumbsup:


Player knowabout EnemyUnitName > 2

(goes from 1-4, where 4 is "knows everything, even the brand of his pants)  ;)


Title: Re:Targetting with binoculars
Post by: cannonfoda on 25 May 2003, 12:26:29
my idea was like the mission in the single player campaign called "Recon"...i think. The one where u're a black op and have to find the three shilka's at the southern end of Kolgujev. After unPBO'ing the mission i found no script files containing anything like this and all the triggers etc.. in the mission editor are written in a different language. :( :(

neway, thx for the quick reply ;D
Title: Re:Targetting with binoculars
Post by: Maurekk on 25 May 2003, 13:42:39
write in trigger as condition: UnitName knowsabout enemyunitname
i think
Title: Re:Targetting with binoculars
Post by: cannonfoda on 25 May 2003, 15:09:13
thx for the help...

i decided to just use a trigger set to Detected by West.