Ein wenig Hilfe für Anfänger?/ A little help for beginners? GER/ENG

  • #1, by klockbox-1Tuesday, 01. August 2017, 03:23 7 years ago
    +++GER+++

    Hallo, Visionaire Community.

    Ich arbeite momentan mit einem Freund an einem recht umfangreichen, stark an "Edna bricht aus" angelehnten Point and Click Adventure als Hochschulprojekt. Visionaire har sich dabei als einsteigerfreundliches und verlässliches Programm herausgestellt, weswegen wir uns auch bereits eine Lizens geholt haben. Ich bin ein absoluter Anfänger was Spieleentwicklung angeht und lerne parallel zur Arbeit mit Visionaire das Programmieren mit dem offiziellen LUA Buch, auch wenn ich bis dato nicht über das Vorwort hinausgekommen bin.

    Nun, ich stehe momentan vor ein Paar Problemen die ich nicht lösen kann bzw. für die ich einen einfacheren Lösungsweg suche. Daher wollte ich mich an euch wenden.

    Ersteinmal wollte ich fragen, ob es eine Möglichkeit gibt, in Dialogen automatisch das Interface auszublenden. Wenn ich in den Interfaceoptionen einstelle, dass das Interface nicht permanent angezeigt wird bleibt es trotzdem in Dialogen unter dem Dialograhmen sichtbar. Wenn ich vor und nach jeden Dialogeintritt die Aktionsteile "Sichtbarkeit des Interface ändern" einsetzte kommt es teils zu merkwürdigen Stellen, bei dem diese Aktionen einfach ignoriert werden. In den Cutscenes soll das Interface allerdings weiterhin angezeigt werden. Gibts es dafür eine verlässliche Lösung?

    Ein weiteres Problem haben wir mit unserem Inventar. Ich habe es hinbekommen ein Slide-Out Inventar zu basteln, dass soweit ziemlich genau, wie das von "Edna bricht aus" funktioniert. Allerdings gibt es immernoch die seltsame Situation, bei dem ein Item im Inventar mithilfe eines Kombinierten Befehls mit sich selber kombinierbar bleibt. Dies führt zu seltsamen Aktionstexten, wie "Benutze Permanentmarker mit Permanentmarker" o.ä.. Gibt es eine Möglicheit Visionaire davon zu überzeugen, dass gleiche Objekt bei einem kombinierten Befehl zu ignorieren?

    Zu guter letzt: Momentan haben wir den Aktionstext zwei mal auf dem Bildschirm, ein mal überm Interface und einmal beim Cursor. Das soll auch erstmal so bleiben. Beim Aktionstext, der in einem Rahmen über dem Interface angezeigt wird, ist es irgendwie nicht möglich den Text linksbündig auszurichten. Wenn ich eine andere Ausrichtung als "Absolut" einstelle wird die gesamte Szene nach den ersten Paar Aktionen beim Beginn der Kulisse schwarz. Und der Text bleibt zentriert im Kasten.

    Wenn ihr euch den momentanen Stand unseres Projekts ansehen wollt ist hier der Link zum Download:
    https://www.dropbox.com/s/ta1pj38ny1tq5xg/Jaspers%20Adventur...

    Ich bedanke mich jetzt schon einmal für jede Hilfestellung!

    +++ENG+++

    First and foremost: Im terribly sorry for my english.

    Hello, Visionaire community.

    I and a friend of mine are currently working on a rather extensive, strongly "Edna & Harvey: The Breakout"-inspired point and click adventure as a project for our university. Visionaire turned out to be a very beginner-friendly and reliable program, thats why we already bought a license. I am an absolute beginner when it comes to game development and I am trying to learn LUA with the official
    book parallel to working on our project, even though I only read foreword until now.

    Well, at the moment I am facing some problems i cannot solve or find an easier way around. Thats why i turn to you.

    At firt I want to ask, if there is a way to automatically hide the interface in dialouges but not in cutscenes. Right now the interface is still visible when a dialouge takes place, even if I turn off the "Show iterface permanently" checkbox in the interface-options. When I am using actionparts to manually set the visibility or hide the interface before and after every dialouge visionaire sometimes plainly ignores some commands, wich is rather odd...

    Also, I have some troubles regarding our inventory. I managed to set up a slide-out inventory thats almost working identically to the "Edna & Harvey: The Breakout"-inentory without any custom scripts. But there is still the oddity, that you can combine an object with itself. This leads to rather strange action-texts like "Use permanent marker with permanent marker". Can I somehow convince Visionaire to ignore the
    same object in a combined command?

    At last: We are currently working with two action text displays, one above our command-interface and one at the cursor. Sadly, I am currently not able to make the action text above the command interface left-justified (I hope thats the right translation). I can only set the text alignment to absolut. as soon as i choose any other option the whole scene turns black after a few parts of the scene-start action. and the text is still centered in the textbox.

    If you want to take a look at our project you can download it here:
    https://www.dropbox.com/s/ta1pj38ny1tq5xg/Jaspers%20Adventur...

    Thanks for every little help!

    Newbie

    27 Posts


  • #2, by afrlmeTuesday, 01. August 2017, 03:57 7 years ago
    A'llo,

    English seems fine to me.

    1. There's some action parts available that you can use to manually force specific interface classes to hide/show or you can use Lua script to hide a specific interface. If you want to use Lua script method then create an execute a script action part & add this to it (don't forget to change name to the actual name of the interface you want to show or hide)
    Interfaces["name"].InterfaceVisible = false -- false to hide. true to show.


    2. Not so sure about this one. There's multiple ways you might go about it, but it depends on the inventory system. You could hide the text easy enough though. Create for each item a mouse enters action & create an execute a script action part & add this to it...
    if game.CurrentObject == game.UsedItem then game.DrawActionText = eDrawNoActionText end

    Now create a mouse leaves action & an execute a script for that & add this to it...
    game.DrawActionText = eDrawActionTextAtCurrentPos


    3. The displacement bit in the interface properties is in regards to positioning the interface, not the text. For the text you need to create a polygon for the text using the set text for action area button on the toolbar above the interface preview window & then creating a rectangle shape for the text to go into. I think action text is always centered.


    Extra quick tip: I know you said you managed to sort out the sliding interface, but I figured I would share a super fast way of creating moving interfaces.

    For example here's how you could create an interface that slides in from the top. Let's say the interface is 300x300px.
    local int = Interfaces["example"]
    
    if int == 0 then -- it's fully out.
     int:to(1000, { InterfaceOffset = {x = int.InterfaceOffset.x, y = -301} }, easeQuintIn)
    elseif int == -301 then -- it's fully hidden
     int:to(1000, { InterfaceOffset = {x = int.InterfaceOffset.x, y = 0} }, easeBounceOut)
    end

    I even added some easing effects to the transitions. easeQuintIn builds up movement slowly whereas easeBounceOut will force the interface to bounce up & down a little bit when it gets to the specified position as if it's just hit a wall or something & ends up bouncing off of it.

    Imperator

    7278 Posts

  • #3, by sebastianTuesday, 01. August 2017, 08:38 7 years ago
    Ein weiteres Problem haben wir mit unserem Inventar. Ich habe es hinbekommen ein Slide-Out Inventar zu basteln, dass soweit ziemlich genau, wie das von "Edna bircht aus" funktioniert. Allerdings gibt es immernoch die seltsame Situation, bei dem ein Item im Inventar mithilfe eines Kombinierten Befehls mit sich selber kombinierbar bleibt. Dies führt zu seltsamen Aktionstexten, wie "Benutze Permanentmarker mit Permanentmarker" o.ä.. Gibt es eine Möglickeit Visionaire davon zu überzeugen, dass gleiche Objekt bei einem kombinierten Befehl zu ignorieren?
    Bevor ich mich hier in englischen Schachtelsätzen verliere versuche ich hier mal auf das Aktionstextproblem mit den Items in deutsch zu einzugehen:

    (before i get lost in nested english sentences i will go ahead and try to answer your question regarding the action text itemnissue in potato) :

    =========

    Hier gibt es eigentlich nur die Möglichkeit per Lua dies verlässlich zu bearbeiten/zu überschreiben, sodass wenn "Objekt unter Curser" == "Item in Benutzung" gar nichts im Aktionstext steht. 

    Es gibt hierzu eine Lua Funktion, die du auslösen kannst, sobald sich etwas am Aktionstext ändert. Leider wird bei dieser Funktion nicht der Aktionstext, wie er dann dargestellt werden würde übergeben. 
    Sprich du müsstest diesen Aktionstext in dieser Funktion komplett neu bauen. Was sich erstmal schwer anhört, aber eigentlich ganz "ok" zu machen ist. Je nach Interface (verbcoin, scumm, 2click,etc) mal mehr mal weniger. 
    Ich könnte dir heute Abend, wenn ich von der Arbeit wieder da bin ein Skript zukommen lassen. In einem. meiner zukünftigen YT Tutorials werde ich darauf auch nochmal eingehen


    Grüße 
    Sebastian  smile 

    Thread Captain

    2346 Posts

  • #4, by afrlmeTuesday, 01. August 2017, 12:14 7 years ago
    Aye @Sebastian, they could probably create a more globalized version of what I wrote by using a mouseEvent handler, then listening out for when mouse moves & checking if current object is same as held item & if so hide action text, if current object is empty & action text isn't hidden then reactivate it.

    They could, if they wanted to keep the use x with x action text for the action text to display something else. I'm pretty sure I wrote a function as a test while working on the ALLD demo for editing the action text. Aye, found it...
    --[[
    Update action text of current language with new text
    Written by AFRLme [Lee Clarke]
    --]]
    
    -- * function which updates the action text of an object for the current language * --
    function setText(obj, txt)
     local texts = obj.TextTextLanguages -- get all texts belonging to the object
     -- + --
     for i = 1, #texts do -- iterate through the stored texts
      if texts[i].language == game.StandardLanguage:getId().id then
       texts[i].text = txt;  obj.TextTextLanguages = texts -- update old text with new text
       break -- no need to keep iterating, cancel the loop
      end
     end
    end

    It needs modifying to only remove the second instance of the item word if the object is the same as the currently held item. Maybe you could predict the length (in characters) the text needs to be or run an iteration loop to split it into words & remove the 4th word if it exists.

    Imperator

    7278 Posts

  • #5, by klockbox-1Wednesday, 02. August 2017, 14:28 7 years ago
    Hi.

    Tut mir leid, dass ich so spät antworte. Ich hatte gestern leider keine Zeit mich zu melden.
    Ich geb nochmal bescheid, sobald ich eure Tipps ausprobiert habe.
    Schonmal vielen lieben Dank für die Hilfe!

    I'm sorry for my late reply. I had no time to response yesterday.
    I'll let you know as soon as i tried your suggestions.
    Thank you very much for the help!

    Newbie

    27 Posts

  • #6, by afrlmeWednesday, 02. August 2017, 14:30 7 years ago
    No worries. Forum isn't going anywhere. wink

    Imperator

    7278 Posts

  • #7, by klockbox-1Wednesday, 02. August 2017, 18:30 7 years ago
    @AFRLme Your first suggestion works perfectly. And its also a bit more elegant to always use two action parts to hide my two main interface elements.

    Your second tip also works, but its not quite what im looking for, since the cursor stays active and it only hides the text. I'll wait for sebastians script or his tutorial, since we are going to work on our project for at least another year.

    I guess that Deadalic used a selfmade interface system then, since the action text above the command-buttons in "Edna and Harvey: The Breakout" is left justified. Well im by far not skilled enough yet to tackle such complex problems, so we will probably keep the centered text. Its not a big problem anyway.

    In any case i'd like to thank you very much smile

    @sebastian Wir benutzen ein SCUMM-ähnliches Interface. Das macht die Sache vermutlich etwas komplizierter, oder? Wäre ein wirkliches gutes Thema für ein Tutorial. Ich freu mich auf jeden Fall drauf.

    Newbie

    27 Posts

  • #8, by afrlmeWednesday, 02. August 2017, 18:40 7 years ago
    Which Edna & Harvey game? The first game wasn't made with Visionaire Studio. The second one was, which is called "Edna & Harvey: Harvet's New Eyes" in English. I think it was Harvey's Neue Augen in German - I forget (bad memory & I don't know much German).

    If you want left aligned then you could probably use the display object text action part & link it to a value. You could insert the action text into the value & have the display object text display that. Object text alignment can be set.

    Imperator

    7278 Posts

  • #9, by MachtnixWednesday, 02. August 2017, 19:47 7 years ago
    Said „Edna bricht aus“ – so it's the first one. This game COULD be made by Visionaire, all functions are possible. 

    Thread Captain

    1097 Posts

  • #10, by afrlmeWednesday, 02. August 2017, 20:00 7 years ago
    Said „Edna bricht aus“ – so it's the first one. This game COULD be made by Visionaire, all functions are possible. 
    Sorry, my bad. I glossed over the text quickly. Just Saw Edna & Harvey & somehow missed the sub-title. Still, we don't currently have support for aligning the default action text, whether it's the system via the game settings tab or one created via an interface. If rect is specified then it automatically centers the text both x & y inside of the specified rect, which means they either have to use display object with values & Lua script or Lua script with the new draw function - I don't know if Simon has provided any documentation/examples of how to use that yet!?

    Imperator

    7278 Posts

  • #11, by klockbox-1Wednesday, 02. August 2017, 20:02 7 years ago
    Oh, my bad. I meant the first one and I thought that it was made in VS.

    Im going to try your suggested method. smile

    Newbie

    27 Posts