Ahilphino
Excellent OT User
- Joined
- Jun 5, 2013
- Messages
- 1,667
- Solutions
- 1
- Reaction score
- 734
ok so i am not at home right now but i have written a script explaining my problem
ok i know its shit code but look at this, when i use this spell after 3 seconds it should hit the target with an asssassin star, HOWEVER if the target has moved during those 3 seconds, the asssassin star will shoot from where i was 3 seconds ago to where the target was 3 seconds ago. How can I fix this and make it so the casters and targets posistions gets updated after those 3 seconds? So that it shoots from my current posistion and to where the target is right now?
Code:
function onCastSpell(creature, var)
local cid = creature:getId()
local player = Player(cid)
local targ = player:getTarget()
addEvent(doSendDistanceShoot, 3000, player:getPosition(), targ:getPosition(), CONST_ANI_REDSTAR)
return true
end
ok i know its shit code but look at this, when i use this spell after 3 seconds it should hit the target with an asssassin star, HOWEVER if the target has moved during those 3 seconds, the asssassin star will shoot from where i was 3 seconds ago to where the target was 3 seconds ago. How can I fix this and make it so the casters and targets posistions gets updated after those 3 seconds? So that it shoots from my current posistion and to where the target is right now?
Last edited: