Viper23rd 0 Posted April 18, 2008 Dear community, I'm working on a script which reflects the damage you did on a friendly unit, then allowing you to apologise to the target, having a 50% chance he will accept, and then you both regain your HP, now I've a question: Somewhere in my script I've used the command for the victim to target the shooter, and once I apologise I would like the victim to stop targeting the shooter, how would I do that, what would I need to target to stop targeting, basically? Yours sincerely, Share this post Link to post Share on other sites
lebson506th 0 Posted April 18, 2008 _unit disableAI "TARGET" Share this post Link to post Share on other sites
Viper23rd 0 Posted April 18, 2008 I tried that but it didn't seem to work, the unit still kept targeting me. Yours, Share this post Link to post Share on other sites
lebson506th 0 Posted April 18, 2008 You could try setCaptive true on the attacker. Share this post Link to post Share on other sites
Viper23rd 0 Posted April 18, 2008 I tried that as well, both before and after making the victim doTarget the shooter (me/player in this case) which neither seemed to work.. Yours, Share this post Link to post Share on other sites
fasad 1 Posted April 19, 2008 Interesting, it seems doTarget objNull does nothing, but commandTarget objNull works as expected (possibly only if the unit is in a group and not the leader)? Ah, doWatch objNull works perfectly! I've added a note to the wiki. Share this post Link to post Share on other sites
Viper23rd 0 Posted April 19, 2008 Trying it out now, I was thinking it had to be something with targeting 'Null' or some sorts, thank you. Yours, Edit #1: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_victim doWatch objnull Seems to work perfectly, thank you! Share this post Link to post Share on other sites
Mr Sarkey 0 Posted April 22, 2008 I find, Quote[/b] ]unit doTarget "" works... Share this post Link to post Share on other sites
fasad 1 Posted April 22, 2008 I find, Quote[/b] ]unit doTarget "" works... That results in "Generic Error In Expression" (doTarget: type Any, expected Array/Object). Share this post Link to post Share on other sites