• Hi, I'm trying to call an action if two conditions are true, but it doesn't seems to work :

    Code
    <action name="testhotspots">
    		for(set(i,0), i LT hotspot.count, inc(i),
    			getlooktodistance(d, hotspot[get(i)].ath, hotspot[get(i)].atv);
    			if( (get(hotspot[get(i)].style) === menustyle) AND (d LT 7),
    				showlog();trace(menu_on);
    			  ,
    				showlog();trace(menu_off);
    			  );
    		  );
    	</action>

    what is wrong with my code ?

    Thanx !

  • Interesting. That is one area where I always seem to struggle - I never know whether I can access a variable directly or whether I need to use get(variable), and usually end up resorting to trial and error. *confused*

    I am not a natural coder - I find it quite hard, so an explanation of the rules on this, or a pointer to where I can find them, would be most appreciated, please.

    Regards

    Andrew

  • Yes, a tutorial would be cool ;)

    I'm trying to check for each hotspots if they are in the middle of the screen and depending on their style do something, but it's not working, all the hotspot will do the first action even if their style is different :


    I know it's my fault and I didn't understand how to code it, do you have a clue ?

    Thanx !

  • Hi,

    I never know whether I can access a variable directly or whether I need to use get(variable)

    There is no universal rule, but the documentation should tell it (if not, please report and I will update it).

    Here the about the if() action:
    https://krpano.com/docu/actions/#condition

    Quote

    When a or b is a variable, then the content of the variable will be loaded and used.
    When not a variable, then the given a or b value will be used.

    I know it's my fault and I didn't understand how to code it, do you have a clue ?

    Please post the whole example (link), that code alone might be not enough.

    Best regards,
    Klaus

  • Please post the whole example (link), that code alone might be not enough.


    Hi Klaus, here is an examle : http://360images.fr/parisvr/krpano.html

    when moving over a red hotspot should trace "red hotspot" and on a white hotspot should trace "white hotspot"
    all the hotspots traces "red hotspot" so I guess my code is wrong :

  • i using image crop just like examble but for oculus rift action infocus how can i modified it to make my hotspot animated work for five second and then loaded an action

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!