Open a single-layer access point and keep it open in the first loaded scene

  • Hello, I have knowledge at the beginner level and I would like to know what code to use to maintain a visible access point when clicking on a layer and that remains visible when I return to it and in the rest of the panoramas that the hotspot is not shown, Can someone help me? Thanks.


    <layer name="intro_game"
    url="img/introgame.png"
    align="center"
    width="prop" height="50%"
    keep="true"
    handcursor="true"
    enabled="true"
    visible="false"
    alpha="0"
    onclick=" show_cofre());"
    />

    <hotspot name="cofre" url="img/cofre.png" keep="false" visible="false" ath="174.324" atv="18.885" scale="0.6" distorted="true" onclick="add_score_cofres(); hide_cofre();" />

    <action name="show_cofre">
    set(hotspot[cofre].visible, true);
    set(hotspot[cofre].alpha, 0);
    tween(hotspot[cofre].alpha, 1. 0.5);
    </action>

    <action name="hide_cofre">
    tween(hotspot[cofre].alpha, 0.0, 0.5, default, set(hotspot[cofre].visible, false));
    </action>

  • Hi,

    there are two possibilities:

    - either your create some custom data structure and store there what has changed and run code on every scene load that interprets and storage,

    - or modify the scene[name].content variable - that's the xml code of that scene as string, so when the scene gets loaded again, that modified xml code will get loaded.

    Best regards,
    Klaus

  • Hello, after converting the layers into hotspots to visualize it in VR Mode, the variables that maintain the current status of the hotspots, such as an open chest that remains open when returning from another scene, do not work in VR Mode, would there be any solution? .


    By the time the next KRPANO update is released, thank you.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!