problem in LastTarget

Ask for help
Post Reply
-k-
Neophyte
Neophyte
Posts: 41
Joined: 23.01.2012 0:22

problem in LastTarget

Post by -k- »

ok, when i use 'self' (TargetToObject(self), WaitTargetObject(self)...) the LastTarget changes also for 'self'. this is normal? because i want the LastTarget continues on the enemy. =[[

thx
User avatar
Vizit0r
Developer
Developer
Posts: 3956
Joined: 24.03.2005 17:05
Contact:

Re: problem in LastTarget

Post by Vizit0r »

yes, now "Self" drop the target to PayerID
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Crome696
Novice
Novice
Posts: 67
Joined: 04.03.2012 18:57
Location: Germany
Contact:

Re: problem in LastTarget

Post by Crome696 »

Runuo and other shardsoftware also handle Target as object containing any entity you last got through any target interaction.
So if you use any method to target to anything it will be assigned to Character.Target.
Stealth Development Team & Support
-k-
Neophyte
Neophyte
Posts: 41
Joined: 23.01.2012 0:22

Re: problem in LastTarget

Post by -k- »

the problem is, i set target enemy
.target, in my shard, set cursor target, i click in enemy and LastTarget 'Stealth' accept the ID,

cast('Fireball')
WaitTargetObject(LastTarget);

i cast in enemy. But when i use

cast('heal')
WaitTargetObject(self);

the LastTarget 'Stealth' change to my char ID, and when i use again,

cast('Fireball')
WaitTargetObject(LastTarget);

i cast the magic in myself
Post Reply