hotspot as a parent for a layer doesn't work?

  • Hi, i would like to use skin_bottonglow function over my layer and over my hotspot so i have change the default skin_bottonglow function because in the log i have this error: "no parent 'btn-gallery-bagni2' found" and the glow effect doesn't appear over the hotspot.
    This is my code (my changes in red):


    if(%1 != null,
    set(strength,0.7);
    if(%2 != null, set(strength,%2));
    if (hotspot[1%].name === %1,
    set(layer[skin_buttonglow].parent, hotspot[1%]);,
    set(layer[skin_buttonglow].parent, %1);
    );
    set(layer[skin_buttonglow].visible, true);
    tween(layer[skin_buttonglow].alpha, get(strength), 0.07);
    ,
    tween(layer[skin_buttonglow].alpha, 0.0, 0.1, default, set(layer[skin_buttonglow].parent, null); set(layer[skin_buttonglow].visible, false); );
    );

    but the i get the same error. so i'm thinking is it possible to have an hotspot like a parent for a layer?

  • Hotspots and layers are in different "dimensions"! Hotspots are inside panorama while layers are on the screen. So it is impossible to set hotspot as parent for a layer. Instead, create a "glow" hotspot using the same crop as the "buttonglow" image and use this hotspot to "jump" over other hotspots.

  • Okay, I've made a quick test with the standard skin and went the easiest way: joined styles for hotspots:

    Code
    <hotspot name="spot1" style="skin_hotspotstyle|skin_glow" ath="53.498" atv="13.032" linkedscene="scene_25" />

    I see the error that "ERROR: no parent "spot1" found". However, I see the glow layer somewhere near the middle of the screen.

    Check out the link:

    http://vt-vr.most-inform.com/glow_test/

    I suppose there must be some further playing with sphere to screen to calculate where the glow layer must appear.

  • you have a working example of this function? Very be interesting to see its use! *question*
    Tnx!

    layers with hotspot parents look like just two hotspots next two each other. Use ox and oy for positioning.

    hotspots with hotspot parents are really strange though. I suggest you try that!

  • This action almost works)))


    Check out the link again:
    http://vt-vr.most-inform.com/glow_test/

Jetzt mitmachen!

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