Struggeling with If / Else

  • Hi,

    I'am struggeling with formulating a right source code. I want to make a sort of configurator with KRPano. There are 2 color choices for the wall, 5 for the floor.

    So depending on which base scene is chosen by the user; a (color wall option 1) or b (color wall option 2), next scene that is loaded will be a2 or b2.

    I thought one solution would be to add my own XML tag to a scene to make a difference between the two 'wall choices'.

    So my first question is: can I add a xml tag to a scene, for example x=a?

    Code
    <scene name="WIT" title="WIT" onstart="" thumburl="thumb.jpg" lat="" lng="" heading="" x="a">


    Second question: how do I put this to if else code? Now its not working properly, it is always false thus only loads the 'else' scene.

    Code
    <action name= "donkergrijs">	
    		 if (x == a, loadscene(scene_30X45_dgrijs);	
    		<!--else-->, 
     		loadscene(scene_40X20_DGRIJS);	                        );	);
    </action>

    Many thanks,

  • Thanks for your quick reply!

    yes, but the problem is that it will only check if that specific one scene is currently displayed, no?
    I rendered 10 scenes. 5 scenes with color wall A and 5 scenes color wall B. Thats why I want to give 5 scenes a specific value, so the IF value is either A or B.

Jetzt mitmachen!

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