HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A Tad Bit of Help Required

05-24-2005, 04:29 AM#1
EnZ
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
divine_peon
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)
2.)
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
Vexorian
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
EnZ
How would i make it follow a Character that has been Selected Via a Hero Selection System?
05-25-2005, 03:09 AM#5
EnZ
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
EnZ
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
earths-fury
Quote:
Originally Posted by EnZ
How would i make it follow a Character that has been Selected Via a Hero Selection System?

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
EnZ
hmm - ill figure something out
05-27-2005, 11:50 PM#9
Vexorian
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
EnZ
Vex - Read your PM ^^ :P