bizao030188
Member
- Joined
- Jun 4, 2012
- Messages
- 50
- Solutions
- 2
- Reaction score
- 7
I am trying to make my own fly system for TFS 1.2 and I am not sure about how to create a new tile in destPos while moving (onStepOut movement)
With onSay I can create a tile upstairs:
but then I can't create a tile when player tries to walk using onStepOut since the method is not called when player wants to walk to void:
I appreciate any kind of help.
With onSay I can create a tile upstairs:
Code:
function onSay(player, words, param)
if player:getStorageValue(storageFly) ~= 1 then return false end
local position = player:getPosition()
position.z = position.z - 1
local destTile = Tile(position)
if not destTile then
Game.createTile(position)
Game.createItem(8426, 1, position)
player:teleportTo(position)
end
return true
end
but then I can't create a tile when player tries to walk using onStepOut since the method is not called when player wants to walk to void:
Code:
function onStepOut(creature, item, position, fromPosition)
local destTile = Tile(position)
if not destTile then
Game.createTile(position)
Game.createItem(8426, 1, position)
creature:teleportTo(position, false)
end
return true
end
I appreciate any kind of help.