function distanceScriptTry (mc, opponent)
standingRight = getObject("Conditions[standingRight]")
standingLeft = getObject("Conditions[standingLeft]")
mc = getObject("Characters[MC]")
opponent = getObject("Characters[opponent]")
if mc.Position.x < opponent.Position.x
and
mc.Position.x - opponent.Position.x >=-300
then
standingLeft:setValue(VConditionValue, true)
else
standingLeft:setValue(VConditionValue, false)
end
if mc.Position.x > opponent.Position.x
and
mc.Position.x - opponent.Position.x <=300
then
standingRight:setValue(VConditionValue, true)
else
standingRight:setValue(VConditionValue, false)
end
end
local mc, opponent
function distanceScriptTry(mc, opponent)
mc = Characters[mc]
opponent = Characters[opponent]
-- + --
if mc.Position.x < opponent.Position.x and opponent.Position.x - mc.Position.x <= 300 then
Conditions["standingLeft"].Value = true
Conditions["standingRight"].Value = false
elseif mc.Position.x > opponent.Position.x and mc.Position.x - opponent.Position.x <= 300 then
Conditions["standingLeft"].Value = false
Conditions["standingRight"].Value = true
end
end
having the variable the same name as the condition isn't goodsome programing languages its a bad thing
yeah i noticed i was getting ";" added to code after "<"