easter egg snippet

  • hi all
    coded a quick and dirty easter egg

    - change your scene name
    - add the code letters from the padlock to keybegg
    - duplicate the if's to match the length your word (3 if's for word art)
    - change the keycode in the if
    - change the unlock action (in this case i want to show a hotspot)

    yes, padlock phrase could be a string, yes could be customizable to reset or not the padlock if you miss a key
    hope it helps someone


    <events name="easteregg_handlekey" keep="true" onkeydown="easteraeggaction();" />

    <keybegg a="65" r="82" t="84" />

    <action name="easteraeggaction" args="keypressed" >
    set (scenename, get(scene[get(xml.scene)].name) );
    set (resetscore , true);
    if ( scenename == 'yourscenename' ,
    if(keycode == keybegg.a , set(easteregg , 1);set(resetscore , false); );
    if(get(easteregg) == 1 AND keycode == keybegg.r , set(easteregg , 2) ;set(resetscore , false);) ;
    if(get(easteregg) == 2 AND keycode == keybegg.t , set(easteregg , 3) ;set(resetscore , false);) ;
    ,
    set(easteregg , 0);
    );

    if(resetscore , set(easteregg , 0););
    if(get(easteregg) == 3 , set( hotspot[treasure].visible, true););

    </action>

Participate now!

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