| 05-24-2005, 04:29 AM | #1 |
How do i make it so a Unit will follow another Unit Automatically? also how would i make it so a unit cast's a spell if its owner attacks it? |
| 05-24-2005, 09:40 AM | #2 |
1.) Code:
Event- For every .02 seconds Conditions Actions- set temppoint=position of Hero order unit to move-attack to temppoint custom script: call RemoveLocation(udg_temppoint) Code:
Event- Unit is attacked Conditions- Attacked unit is *place unit here* Attacking unit is in Unit Group-Player 1 Actions- Order unit to *cast spell* on attacking unit |
| 05-24-2005, 05:13 PM | #3 |
I would suggest the UnitGuardUnitAI function that you should find on that D2 Summons map in the submissions forum |
| 05-25-2005, 03:06 AM | #4 |
How would i make it follow a Character that has been Selected Via a Hero Selection System? |
| 05-25-2005, 03:09 AM | #5 |
With the Second one - I meant Cast's a Spell in a General Direction - So like if i attack it with my hero - it will cast lets say - Chain Lightning in a general direction towards the closest enemy - without moving.. |
| 05-25-2005, 04:05 AM | #6 |
Vex - How would i Config your d2summons to Work with a non Summoned Unit - or at least make it when a hero is Spawned Via a Hero Selection System - if it has a "Pet" it will make the pet follow the unit and do the same Actions? |
| 05-25-2005, 10:43 AM | #7 | |
Quote:
if each player onyl has one hero, order it to follow random unit owned by player matchign condition is a hero = true. otherwise, every hero you want to be followed by stuff must be kept in a variable (set at the creation of the hero) |
| 05-26-2005, 12:31 AM | #8 |
hmm - ill figure something out |
| 05-27-2005, 11:50 PM | #9 |
Sorry for not being here before. anyways you can just use the UnitGuardUnitAI function, instead of that trigger that calls it when units are summoned call it when they are created with the selection system. |
| 06-02-2005, 04:57 AM | #10 |
Vex - Read your PM ^^ :P |
