Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] No "Friendly Fire" help please

Discussion in 'Triggers & Scripts' started by mammoth28, Sep 11, 2007.

  1. mammoth28

    mammoth28

    Joined:
    Sep 4, 2007
    Messages:
    23
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Well I have dug and searched through what seems like hundreds of threads and simply looking for a way to prevent "Friendly Fire" between teammates. Some of the custom AOE spells are killing off their friends. Or in the case of some jerk just trying to kill off the group for fun.

    Please note this is for ROC and I can use convert to custom text for the triggers and get away with alot, but please only post if compatible with ROC. So far I have set to where they can only attack enemy but they still take damge from AOE. (unit-damage area).

    This is my first post so if you have any questions on what I'm trying to achieve, or need to see some of the AOE spells please holler. But I dont really want to change the spell, just looking for a trigger to prevent any team damage. Thanks for help in advance. :ad:
     
  2. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Instead of Unit - Damage Area

    Pick every unit in the area, and use Unit - Damage Target.
     
  3. FamousPker49

    FamousPker49

    Joined:
    May 27, 2007
    Messages:
    1,640
    Resources:
    1
    Skins:
    1
    Resources:
    1
    Use matching unit, and make sure that "(Picked Unit) is an enemy of (Triggering Unit)" then do that, because it will exclude them
    • Melee Initialization
      • Events
      • Conditions
      • Actions
        • Unit Group - Pick every unit in (Units in (Your Area) matching (((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
          • Loop - Actions
     
  4. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Before that line, add

    • Custom script: set bj_wantDestroyGroup = true
    to prevent leaks.
     
  5. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,022
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    if the AoE spell is just an ordinary spell with no triggers, then there is a data file that says targeted units, and check if any has a relation to hurt allies.
     
  6. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    -.-
     
  7. Turtles

    Turtles

    Joined:
    Aug 24, 2007
    Messages:
    190
    Resources:
    0
    Resources:
    0
    roc doesn't have Custom script.
     
  8. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Oh, whoops, forgot about that.

    (sucks for roc... guess it's a good reason to learn JASS, though)
     
  9. Turtles

    Turtles

    Joined:
    Aug 24, 2007
    Messages:
    190
    Resources:
    0
    Resources:
    0
    Converting it to jass and adding the function in the right spot would correct the problem, though it would be easier just to write it all in jass.
     
  10. mammoth28

    mammoth28

    Joined:
    Sep 4, 2007
    Messages:
    23
    Resources:
    1
    Maps:
    1
    Resources:
    1
    thanks anyways

    Thanks for the usful comments and I got to work in ROC, but once I went to B-NET none of it worked for regular ROC players, so it looks like Jass is only option.

    You can however make make a "custom script" in ROC by using comment type what you need like (call RemoveLocationthen udg_location) then convert and remove the two // from that line.

    Thanks for all the help. :thumbs_up:
     
  11. mammoth28

    mammoth28

    Joined:
    Sep 4, 2007
    Messages:
    23
    Resources:
    1
    Maps:
    1
    Resources:
    1
    another option please...

    Well I'm finding out that even standard spells can cause friendly fire like blizzard for instance. If your buddy is in the middle of the horde your attacking he will take damage. :slp:

    I am asking if anybody out there has any other suggestions for "No Friendly Fire" solution that will work regardless of what the spell is.
     
  12. Just_Spectating

    Just_Spectating

    Joined:
    May 16, 2007
    Messages:
    7,022
    Resources:
    46
    Models:
    11
    Icons:
    9
    Skins:
    26
    Resources:
    46
    idk, check if a player is hurting another player and heal the hurt player or something.