This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
Naja, die Plazierung des vermeintlichen Charakters ist nur der Fake, damit sich der Geschützturm nach ihm ausrichtet. Darum geht es ja die ganze Zeit. Der sogenannte Charakter ist nur dazu da, um nur das zu ermöglichen. Er besteht aus rein gar nichts. Ich könnte dasselbe ebensogut mit einem Objekt machen. Deshalb am liebsten sofortige Ausrichtung. Da das wahrscheinlich zu einer Endlosschleife führt, war vorgesehen: Plaziere Charakter auf Mausposition -> 20ms Pause -> Plaziere Charakter auf Mausposition usw.Ich mach mir mal n paar gedanken zu der positionierung des Chars zum Cursor.
Soll das "direkt" geschehen (teleport) oder dorthinbewegt werden (also der char soll dahin gehen)?
-- set character "Tom" to position x(100), y(300)
local tom = getObject("Characters[Tom]")
tom:setValue(VCharacterPosition, {x=100,y=300})
x = (getCursorPos().x + game.ScrollPosition.x)
y = (getCursorPos().y + game.ScrollPosition.y)
print("Mausposition", x, y)
SchussrichtungObjekt = getObject("Objects[Ziel]")
SchussrichtungPosition = getObject("Objects[Ziel]"):getPoint(VObjectPosition)
print ("Ziel",SchussrichtungPosition.x, SchussrichtungPosition.y)
SchussrichtungPosition.x = x
SchussrichtungPosition.y = y
print ("Ziel gleich Mausposition", SchussrichtungPosition.x, SchussrichtungPosition.y)
[b]SchussrichtungObjekt:setValue(VObjectPosition, {x=SchussrichtungPosition.x, y=SchussrichtungPosition.y})[/b]
Conditions["item_used"].ConditionValue = false
Conditions["item_used"].ConditionValue = true
Values["items_used"].ValueInt = 10
Values["item_name"].ValueString = test
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.