This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.
See the Indie Bundle Try it for freescene = game:getLink(VGameCurrentScene)
startAction("scene.SceneActions[interact_chase]") *
local k, p, dx
k = Characters["kolegaNormal"]:getPoint(VCharacterPosition)
p = game.GameCurrentCharacter:getPoint(VCharacterPosition)
if p.x >= k.x then
dx = k.x + 150
else
dx = k.x - 150
end
game.GameCurrentCharacter:setValue(VCharacterDestination, {x=dx, y=k.y})
function getTalkDest(c)
c = Characters[c].Position
-- + --
if game.CurrentCharacter.Position.x >= c.x then
game.CurrentCharacter.Destination = { x = (c.x + 150), y = c.y }
else
game.CurrentCharacter.Destination = { x = (c.x - 150), y = c.y }
end
end
getTalkDest("Tom") -- Tom being the npc character.
local c = Characters["kolegaNormal"].Position
if game.CurrentCharacter.Position.x >= c.x then
game.CurrentCharacter.Destination = { x = (c.x + 150), y = c.y }
else
game.CurrentCharacter.Destination = { x = (c.x - 150), y = c.y }
end