Results 1 to 9 of 9

Thread: Stopping DoTarget

  1. #1
    Corporal
    Join Date
    Apr 13 2008
    Location
    Nuenen, The Netherlands
    Posts
    80
    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,

  2. #2

  3. #3
    Corporal
    Join Date
    Apr 13 2008
    Location
    Nuenen, The Netherlands
    Posts
    80
    Author of the Thread
    I tried that but it didn't seem to work, the unit still kept targeting me.

    Yours,

  4. #4
    You could try setCaptive true on the attacker.

  5. #5
    Corporal
    Join Date
    Apr 13 2008
    Location
    Nuenen, The Netherlands
    Posts
    80
    Author of the Thread
    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,

  6. #6
    Master Gunnery Sergeant
    Join Date
    Dec 18 2005
    Location
    Adelaide, Australia
    Posts
    1,306
    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.



    [self-promotion]
    OFP:R Island : Rezina
    [/self-promotion]

  7. #7
    Corporal
    Join Date
    Apr 13 2008
    Location
    Nuenen, The Netherlands
    Posts
    80
    Author of the Thread
    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[/QUOTE]

    Seems to work perfectly, thank you&#33;




  8. #8
    I find,
    Quote Originally Posted by [b
    Quote[/b] ]unit doTarget ""
    works...




    YOUTUBE CHANNEL, OFP/ARMA Movie Maker since 2005

  9. #9
    Master Gunnery Sergeant
    Join Date
    Dec 18 2005
    Location
    Adelaide, Australia
    Posts
    1,306
    Quote Originally Posted by (supershooter @ April 23 2008,07:55)
    I find,
    Quote Originally Posted by [b
    Quote[/b] ]unit doTarget ""
    works...
    That results in "Generic Error In Expression" (doTarget: type Any, expected Array/Object).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •