• 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!

Solved TFS 1.0 - doAreaCombatHealth Direction Bug ?

eduardbean

Member
Joined
Nov 26, 2010
Messages
129
Solutions
2
Reaction score
15
Hello, I'm trying to make a new spells system by talkactions, but i have one problem.

Look, This is my script
Code:
local area = createCombatArea{
    {1, 1, 1},
    {1, 3, 1}
}

function onSay(player, words, param)

    local lvl = player:getLevel()
    local dmgMax = ((lvl * 5))
    local dmgMin = ((dmgMax*0.90))
  
    return  doAreaCombatHealth(player.uid, COMBAT_PHYSICALDAMAGE, player:getPosition(), area, -dmgMin, -dmgMax, CONST_ME_BLOCKHIT)

end
And this is when i try to use this spell:

qD2xvbP.png


The script ignores my direction and always goes south

How i can solve this "Bug"​
 
Code:
    local position = player:getPosition()
    position:getNextPosition(player:getDirection())

    doAreaCombatHealth(player.uid, COMBAT_PHYSICALDAMAGE, position, area, -dmgMin, -dmgMax, CONST_ME_BLOCKHIT)
 
Edit:
This Dont respect de "3" on my script​

Code:
local position = player:getPosition()
position:getNextPosition(player:getDirection())

doAreaCombatHealth(player.uid, COMBAT_PHYSICALDAMAGE, position, area, -dmgMin, -dmgMax, CONST_ME_BLOCKHIT)

U1erVAF.png

Code:
local area = createCombatArea{
    {1, 1, 1},
    {1, 1, 1},
    {1, 3, 1}
}

function onSay(player, words, param)

    local lvl = player:getLevel()
    local dmgMax = ((lvl * 5))
    local dmgMin = ((dmgMax*0.90))

    local position = player:getPosition()
    position:getNextPosition(player:getDirection())

    doAreaCombatHealth(player.uid, COMBAT_PHYSICALDAMAGE, position, area, -dmgMin, -dmgMax, CONST_ME_BLOCKHIT)

end

How i can solve this problem ?​
 
Back
Top