jaenak 0 Posted January 19, 2004 If I have a person ordered to "dowatch" a particular object and I wanted to cancel that after a bit, how would I do that? I can change his combat mode and behaviour but he still stares at the object. I can even type in "man1 dowatch nil" and even that doesn't work. Is it even possible to cancel dowatch? Share this post Link to post Share on other sites
RED 0 Posted January 19, 2004 Try: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> unit dowatch objNull RED Share this post Link to post Share on other sites
Chris Death 0 Posted January 19, 2004 Or maybe even try: unit doWatch [] :note - you can either doWatch an object or a position array - maybe starring at an empty array could free their unit's head again too. ~S~ CD Share this post Link to post Share on other sites
jaenak 0 Posted January 25, 2004 Sorry about the late reply. I tried both suggestions and neither worked. Any other ideas? Share this post Link to post Share on other sites
RED 0 Posted January 25, 2004 How about unit dowatch unit? Getting the unit to watch its self may work. RED Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted January 25, 2004 Perhaps if you dont try and call Dowatch directly with a NullObject? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_WatchGuy=Enemy1 Soldier1 DoWatch _WatchGuy Then when you want to finish: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_WatchGuy=ObjNull Or for a position you can get him to roughly return to the direction he was last looking? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Dir=GetDir Soldier1 Soldier1 DoWatch (GetPos Enemy1) Then when you want to finish: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _SinX=Sin(_Dir*50) _CosY=Cos(_Dir*50) Soldier1 Dowatch [_SinX,_CosY,5] You might need to work out the height above sea level for the Z values. Share this post Link to post Share on other sites
RED 0 Posted January 25, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _SinX=Sin(_Dir*50) _CosY=Cos(_Dir*50) Soldier1 Dowatch [_SinX,_CosY,5] Doing this would make the soldier watch this point though, I guess if you looped this it would work. It is a nasty work around though. RED Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted January 25, 2004 Things like DoWatch and Scan Horizon seem to be perminent states. Try stopping a unit from scanning the Horizon with anything but the DoWatch command, the same applies for DoWatch called from the menu. I dont think you can? I think the best you can do is get it to point in the direction it was last looking at, so you would only have to call DoWatch on a X,Y position once. Doing it in a loop would probably be in conflict with OFP's default behaviour. Or perhaps get him to DoWatch his commander? Even if you create an object, get the AI to DoWatch it. Then delete it, the AI will still watch the position. If you then create an object, get the AI to DoTarget it. Then delete it, the AI will still return to the previous DoWatch the position. P.S For a laugh get him to DoWatch himself Share this post Link to post Share on other sites
zayfod 1 Posted March 8, 2004 Try: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> unit dowatch objNull RED This works fine for me--jaenak I suggest you try it again. Place a soldier on the map and call him "a" Place another soldier on the map and call him "b" place a trigger *activation* radio alpha -- repeatedly *On activation" a dowatch b place another trigger *activation* radio bravo -- repeatedly *On activation" a dowatch objnull then make the radio calls and watch soldier "a" as he turns to watch soldier "b" and back again. Note--soldier "a" may not always directly face soldier "b". Soldier "a" will only turn as far as required untill he can get a visual--sometimes this means it looks like he is not actually watching soldier "b", but he actually is. If you want soldier "a" to accurately watch the exact spot where soldier "b" is then you could use a dowatch getpos b This means he will always turn right round and face exactly where you want him to. And once again this command is cancelled with a dowatch objnull Hope this helps. Zay Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted March 8, 2004 Its been a few weeks since I checked, but make sure the guy do watching ObjNull is not really just watching position [0,0,0]. I dont think thats what OFP's guys do normally, try doing: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Hint Format ["%1",GetPos ObjNull] You will see what I mean. Share this post Link to post Share on other sites