Kulissenwechel mit Koordinatenabfrage

  • #1, by unkunstTuesday, 28. February 2017, 00:13 8 years ago
    Wir – ein Kollege und ich – sind in der Planungsphase eines Spiels. Kurz gesagt haben wir
    mehrere Kulissen, welche einen Zwilling haben. Am Einfachsten ist es, "The Silent Age" von der Spielmechanik her vor den Augen zu haben. Wir würden also gerne, nebst normalem Kulissenwechsel, dass unser Protagonist mittels eines Schalters zwischen Kulisse A und Kulisse A Zwilling wechseln kann. Da sich die beiden Kulissen gleichen, wäre es natürlich schön, wenn der Protagonist an der gleichen Stelle in der zweiten Kulisse erscheint, sprich wenn wir die Koordinaten in der ersten Kulisse abfragen und in der zweiten angeben könnten. Ist dies so realisierbar? Und wenn ja, wie? Was wäre der beste Weg? Meine Bemühungen und Versuche sind leider noch nicht vom Erfolg gekrönt worden.

    Vielleicht schon etwas zu vorgreifend, aber wenn die erste Kulisse an einer Stelle kein Hindernis hat, die zweite aber schon; wie würde man hier vorgehen?

    Vielen Dank schon mal im Voraus für eure Hilfe, wertvolle Tipps, …

    Newbie

    6 Posts


  • #2, by afrlmeTuesday, 28. February 2017, 01:01 8 years ago
    Sorry, I own Silent Age but haven't gotten around to playing it yet, but let me see if I can wrap my head around what bing translated...

    You are talking about a parallel dimension of sorts in which it's the same scene, but different because it's in another dimension/universe & you want to store the coordinates where the playable character is currently standing & then when you switch scene have the character in the exact same position? If that's the case then yes it's possible. You can store the coordinates with Lua script.

    So, you could do something along the lines of...

    1. execute a script >
    char_pos = game.CurrentCharacter.Position

    2. change scene "whatever the new scene is"
    3. execute a script >
    game.CurrentCharacter.Position = char_pos


    You might want to update the position inside of an at begin of scene action instead or add a pause before updating the position if you are fading to the new scene rather than changing immediately.

    Anyway, hope this helps. wink

    Imperator

    7285 Posts

  • #3, by TinTinTuesday, 28. February 2017, 06:58 8 years ago
    Thanks a lot AFRLme

    You always write English in this forum . Many times I don't know what is question but when I see your answers I got it fast like this topic. Your works is so useful for me and other people that don't know German language.

    Cheers

    Forum Fan

    196 Posts

  • #4, by afrlmeTuesday, 28. February 2017, 12:09 8 years ago
    Thanks a lot AFRLme

    You always write English in this forum . Many times I don't know what is question but when I see your answers I got it fast like this topic. Your works is so useful for me and other people that don't know German language.

    Cheers

    heh! I don't actually know how to speak/type German (or Spanish either & I've lived in Spain for 12+ years now). I feel most comfortable speaking/typing in English as I know I'm more likely to get the point across & most people know at least some English or can easily translate it ok with google or bing translator, seeing as I don't use too many slang or shorthand words.

    Imperator

    7285 Posts

  • #5, by unkunstTuesday, 28. February 2017, 17:23 8 years ago
    @AFRLme: Thanks a lot for your help. I will try it asap. And report.

    Newbie

    6 Posts