• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua toPosition

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
650
Solutions
14
Reaction score
88
Hello I'm working on a tfs 1.2 (10.90)
and I have a stupid problem:

Code:
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
player:teleportTo({x=1000, y=1000, z=7})
fromPosition:sendMagicEffect(5)
return true
end


I want that the effect was in position to which he will teleport, because now is on the position from which it teleport. Thanks
 
Last edited by a moderator:
The way I'd do it as a Noob Scripter is: Create another short script, link it with the Tile where it teleports to and send the effect there.

Code:
function onStepIn(creature, item, position, fromPosition)
fromPosition:sendMagicEffect(5)
return true
end

Like this or something.

Or
doSendMagicEffect({x=1011,y= 1010, z=7}, 5)

Cya :)
 
Last edited by a moderator:
change

fromPosition:sendMagicEffect(5)

to

Position(player:getPosition()):sendMagicEffect(5)



maybi
 
Last edited:
I made that:
doSendMagicEffect({x=1011,y= 1010, z=7}, 5) and works, but I have a little question. Can I make scripts to 10.90 as to 8.6??
Will it be bad?
 
Teleport player with 0 millisecond delay. This seems to be TFS 1.x bug.

Other way is to copy the position you wanted to send effect on.
 
Back
Top