This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Until 1 Dec 2026 all licenses are 30 % off, for example the Indie Bundle for €69.30 instead of €99. The code BLACKFRIDAY is applied automatically at checkout.
See licenses Try it for free-- Interface
comp_interface = getObject("Interfaces[Kompass]")
-- Lokale Interface-Koordinaten des Kompassnadel-Drehpunktes
rot_point = {55;85}
-- Anzahl Sprites
num_sprites = 64
-- Geschwindigkeit (1=sofort; je größer, je langsamer)
rot_speed = 5
---------------------------------------
-- Aktuelle Position des Kompasses
pos_compass = {0;0}
-- Aktueller Winkel
curr_angle = 0
--Dreht die Kompassnadel in Richtung des Mauszeigers
function spinNeedle()
local pos_cursor = getCursorPos()
local target_angle = math.atan2(pos_compass[2] - pos_cursor.y, pos_compass[1] - pos_cursor.x) / math.pi * 180
local rot_angle = target_angle - curr_angle
if rot_angle <= -180 then
rot_angle = 360 + rot_angle
elseif rot_angle > 180 then
rot_angle = 360 - rot_angle
end
curr_angle = curr_angle + rot_angle / rot_speed
if curr_angle < 0 then
curr_angle = 360 + curr_angle
elseif curr_angle >= 360 then
curr_angle = curr_angle - 360
end
local call_frame = math.floor(curr_angle / 360 * num_sprites + 0.5) + 1
if call_frame == 65 then call_frame = 1 end
comp_anim:setValue(VAnimationFirstFrame, call_frame)
comp_anim:setValue(VAnimationLastFrame, call_frame)
end
-- Speichert die Position des Kompass-Drehpunktes in einer globalen Variable
function setRotationPoint()
local int_pos = comp_interface:getPoint(VInterfacePosition)
pos_compass = {int_pos.x + rot_point[1];int_pos.y + rot_point[2]}
end
This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New threadDeponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.