• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Friendly Fire and Autofollow pet

Status
Not open for further replies.
Level 28
Joined
Sep 26, 2009
Messages
2,520
in case of units, that cause AoE damage by their basic attack (mortar team, demolisher, etc.) go to object editor, find that unit and check enemy (and neutral, if you want) in "Combat - Attack 1/2 - Area of Effect Targets". This determines what units shall be damaged by AoE auto attacks.

Note, that this only changes which targets take damage from basic auto attacks. Changing those values won't have effect if attacking unit has passive abilities that enhance/change basic attacks.


And the follow pet part - It's hard to come up with anything when you're not really specific. Should pet follow his master, but auto attack himself, or should he attack only what his master attacks? etc.
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
To disable friendly fire, use the object editor and set:
Combat - Attack 1 - Area of Effect Targets to include Enemy and exclude Friend / Nuetral

For abilities, ensuring that only "Enemy" and maybe "Neutral" are checked with "Friend" unchecked.

To stop regular, targeted attacks you have to use a trigger. See any of these threads (can't quote due to them being locked).

//\\oo//\\

Edit:
Took too long looking this up...
::(
 
Level 6
Joined
Nov 24, 2012
Messages
218
To disable manual (on purpose) friendly fire, create a trigger like this:


  • Disable Manual Friendly Fire
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) belongs to an ally of (Owner of (Attacked unit))) Equal to True
  • -------- This condition is found in Boolean conditions as "Unit - Unit Belongs to An Ally of Player" --------
    • Actions
      • Unit - Order (Attacking unit) to Stop


To make pet permanently follow your Hero, create a trigger similar to this:


  • Pet Follow Hero
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order Pet to Follow Hero
  • -------- You should have your Pet and Hero saved to a variable --------


Does this make sense?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520

  • Pet Follow Hero
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order Pet to Follow Hero
  • -------- You should have your Pet and Hero saved to a variable --------


Does this make sense?
Imo this will cause problems in fight. More so if hero is ranged unit as the pet will run away from enemy back to him even in fight. There needs to be another trigger which checks if hero is in combat or not.
 
Level 8
Joined
Jul 18, 2012
Messages
136
To disable manual (on purpose) friendly fire, create a trigger like this:


  • Disable Manual Friendly Fire
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) belongs to an ally of (Owner of (Attacked unit))) Equal to True
  • -------- This condition is found in Boolean conditions as "Unit - Unit Belongs to An Ally of Player" --------
    • Actions
      • Unit - Order (Attacking unit) to Stop


To make pet permanently follow your Hero, create a trigger similar to this:


  • Pet Follow Hero
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order Pet to Follow Hero
  • -------- You should have your Pet and Hero saved to a variable --------


Does this make sense?
Pet Follow don't make sense.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Pet Follow don't make sense.

Here, I've make a test map for Pet Follow based on others triggers. You can test the game and see how it does.And a explanation about triggers is also there. Forgot to say in the test map also, the variables are also configurable so you can change it to your desired units.
 

Attachments

  • Trigger - Pet Follow.w3x
    16.6 KB · Views: 108
Level 8
Joined
Jul 18, 2012
Messages
136
Here, I've make a test map for Pet Follow based on others triggers. You can test the game and see how it does.And a explanation about triggers is also there. Forgot to say in the test map also, the variables are also configurable so you can change it to your desired units.

Dude! I wan't use system for ORPG not for basic map.(If hero buys a pet then pet follow him all time
 
Status
Not open for further replies.
Top