- Joined
- Jul 18, 2012
- Messages
- 136
How to disable friendly fire and how to make the pet always follow the hero?
I tried many ways no1 worked please help!
I tried many ways no1 worked please help!
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.
- 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.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.
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
Well, the test map is only provided for you to learn. You can copy/paste the trigger to your map and apply it. Of course, changing some parts of it to fit exactly to your map.