Minispiel in Visionaire

  • #1, by florian-grauertThursday, 20. May 2021, 12:18 3 years ago
    Hallo Visionaire Community,

    Ich arbeite zur Zeit in Rahmen eines Schulprojektes an einem
    Point and Click Adventure und bin für die Engine verantwortlich,
    wir haben dabei ein Rätsel, bei dem man auf einer Quadtratgrid, Felder
    anklicken muss um deren Farbe zu invertieren, allerdings verändert das auch
    die Farben der umliegenden Felder.
    Um das Rätsel zu lösen muss man einen bestimmten Berreich in eine Farbe bekommen.

    Ich möchte das Rätsel als Interface anlegen um eine Szene zu sparen, so machen
    wir alle unsere Rätsel und es funktionierte bis jetzt ganz gut.

    Ich arbeite also nur mit Schaltern und ihren Attributen, was eig ganz gut bis jetzt funktioniert hat.
    Aber für das Rätsel muss jeder Schalter wissen welche Schalter um ihn herum liegen, bzw. wo er selbst liegt und ich habe leider keine Ahnung wie ich das machen soll.
    Mit Lua wäre es wahrscheinlich einfacher weil ich einfach über die Schalter drüber loopen könnte aber ich kann kein Lua und kenn mich auch nicht mit den Datenstrukturen von Visionaire aus.

    Weiß jemand was ich sonst tun könnte? Z.b. ob diese Blöcke eine Lösung sind
    und wo man dazu eine Dokumentation findet wenn ja.
    Weil das einzige was mir bis jetzt einfällt wäre jedem Schalter zu sagen welche anderen Schalter er auch noch switchen muss, was ein immenser Arbeitsaufwand wäre und ziemlich redunant.

    Newbie

    6 Posts


  • #2, by afrlmeThursday, 20. May 2021, 12:50 3 years ago
    A'llo, it would help a bit if you try to post in English too. Most of our members don't speak/read German.

    Can you post a screenshot of the puzzle or link to a video example or something, so I can get a better understanding of what the puzzle is & how it's supposed to work?

    Based on what you have said, I think a grid based approach is what you will need to use, which unfortunately for you will involve a bit of scripting - mostly array tables to create the grid, which you can use to query which squares are surrounding the one you click on.

    It might be possible without scripting, but I should imagine that it would involve a lot more work to make it work.

    Imperator

    7278 Posts

  • #3, by florian-grauertFriday, 28. May 2021, 02:42 3 years ago
    A'llo, it would help a bit if you try to post in English too. Most of our members don't speak/read German.

    Can you post a screenshot of the puzzle or link to a video example or something, so I can get a better understanding of what the puzzle is & how it's supposed to work?

    Based on what you have said, I think a grid based approach is what you will need to use, which unfortunately for you will involve a bit of scripting - mostly array tables to create the grid, which you can use to query which squares are surrounding the one you click on.

    It might be possible without scripting, but I should imagine that it would involve a lot more work to make it work.
    hello thank you for your quick response and for taking the time to put my text into the google translator.

    I think i managed to find a solution with Lua scripting,
    but I have a problem i can't find a solution for.
    I made the grid and found a way to store the button i click in
    a variable, but now i need to change the Buttons picture from active to
    inactive, in the documentation of the datastructures i found nothing about it.

    But in the action Area for the Button's there is a option too change the active picture to
    the passive by a trigger, but i don't know how to express this in code.
    I Loop over all Buttons i want to change the picture of, so i thought maybe there is a
    attribute i could change for those Buttons that would change the sprite, but i cant find
    it in the docs.

    Is there maybe a way to call the functions from the action Area in the Interface section, i will upload a screenshot so you know what i mean.

    Edit:

    I think to use active and inactive pictures might be not the best idea, since i cant highlight
    the tile i'm hovering over with my mouse this way, so the best way would be
    actually to change the sprite itself by changing the location/path.
    Is this possible?

    Newbie

    6 Posts

  • #4, by afrlmeFriday, 28. May 2021, 13:24 3 years ago
    I didn't use google translator (it's terrible). Sebastian found out about an online translator called Deepl a couple or so years back. It's a lot more accurate than google translator.

    Anyway, it should be possible on mouse enters/leaves to change between the active & inactive image belonging to a button, as there are action types called mouse enters & mouse leaves that you can create in the actions tab belonging to each button & there's also action parts to change between active & inactive image state.

    Imperator

    7278 Posts