-static bool _skaterift_script_ch3s1( ent_script_event *event )
+static bool _skaterift_script_city( ent_script_event *event )
{
-#if 0
- static const struct cs_subtitle EN[] =
+ if( on_nugget_once( event, "ch3s1_view" ) )
{
- { "j1", KCOL_JOHN "Ohh this is it guys." },
- { "j2", KCOL_JOHN "Good enough!" },
- { "m1", KCOL_MIKE "Never even thought I'd visit the USA" },
- { "m2", KCOL_MIKE "But here we are I guess.." },
- { "j3", KCOL_JOHN "I've had weirder sundays." },
- { "m3", KCOL_MIKE "Somehow I'm not surprised." },
- { NULL, NULL },
- };
- static const struct generic_cutscene cutscene =
+ static const struct cs_subtitle EN[] =
+ {
+ { "j1", KCOL_JOHN "Ohh this is it guys." },
+ { "j2", KCOL_JOHN "Good enough!" },
+ { "m1", KCOL_MIKE "Never even thought I'd visit the USA" },
+ { "m2", KCOL_MIKE "But here we are I guess.." },
+ { "j3", KCOL_JOHN "I've had weirder sundays." },
+ { "m3", KCOL_MIKE "Somehow I'm not surprised." },
+ { NULL, NULL },
+ };
+ _cutscene_load_and_play( "metascenes/ch3s1.ms", EN, 1 );
+ }
+
+ // REgion complete
+ if( on_function_trigger( event, 5 ) )
{
- .metascene_path = "metascenes/ch3s1.ms",
- .freeze_player = 1,
- .subtitles = EN,
- };
- generic_cutscene_wrapper( &cutscene, event );
+ if( _skaterift_script_nugget_status( "ch3s2_view" ) == 0 )
+ _skaterift_script_nugget_set( "ch3s2_view", 2 );
+ }
- if( on_nugget_once( event, "ch3s1_view" ) )
+ // On activate finale challenge
+ if( on_function_trigger( event, 7 ) )
{
- play_generic_cutscene( event );
}
-#endif
+
+ // On complete finale challenge
+ if( on_function_trigger( event, 8 ) )
+ {
+ _skaterift_script_nugget_set( "city_finale", 3 );
+ _skaterift_script_nugget_set( "ch3s3_view", 2 );
+ }
+
+ u64 status;
+ if( on_nugget_changed( event, "city_finale", &status ) )
+ {
+ _ent_list_set_visible( _ent_list_get_aliased( "finale" ), status > 0 );
+ _ent_list_set_visible( _ent_list_get_aliased( "finale_marker" ), status == 2 );
+ }
+
return 1;
}
static bool _skaterift_script_ch3s2( ent_script_event *event )
{
-#if 0
- static const struct cs_subtitle EN[] =
- {
- { "m1", KCOL_MIKE "Is that the FBI??" },
- { "m2", KCOL_MIKE "I don't know about this man things are getting weird." },
- { "m3", KCOL_MIKE "Oh no that is not good" },
- { "m4", KCOL_MIKE "What do they even want with him?" },
- { "m5", KCOL_MIKE "Ahhh yeah, the aliens. That'l do it." },
- { NULL, NULL },
- };
- static const struct generic_cutscene cutscene =
+ u64 status;
+ if( on_nugget_changed( event, "ch3s2_view", &status ) )
+ _ent_list_set_visible( event->entity_list, status == 2 );
+
+ if( on_function_trigger( event, 0 ) )
{
- .metascene_path = "metascenes/ch3s2.ms",
- .freeze_player = 1,
- .subtitles = EN,
- };
- optional_video_wrapper( &cutscene, "ch3s2_view", 0, event );
-#endif
+ if( on_nugget_once( event, "ch3s2_view" ) )
+ {
+ _skaterift_script_nugget_set( "city_finale", 2 );
+
+ static const struct cs_subtitle EN[] =
+ {
+ { "m1", KCOL_MIKE "Is that the FBI??" },
+ { "m2", KCOL_MIKE "I don't know about this man things are getting weird." },
+ { "m3", KCOL_MIKE "Oh no that is not good" },
+ { "m4", KCOL_MIKE "What do they even want with him?" },
+ { "m5", KCOL_MIKE "Ahhh yeah, the aliens. That'l do it." },
+ { NULL, NULL },
+ };
+ _cutscene_load_and_play( "metascenes/ch3s2.ms", EN, 1 );
+ }
+ }
return 1;
}
+struct script_ch3s3_waiter
+{
+ bool go;
+};
+
static bool _skaterift_script_ch3s3( ent_script_event *event )
{
-#if 0
- static const struct cs_subtitle EN[] =
+ if( event->type == k_escript_event_allocate )
+ {
+ struct script_event_allocate *event_info = event->info;
+ struct script_ch3s3_waiter *waiter = vg_linear_alloc( event_info->heap, sizeof(struct script_ch3s3_waiter) );
+ waiter->go = 0;
+ event_info->userdata = waiter;
+ return 1;
+ }
+ struct script_ch1s6a_waiter *waiter = event->userdata;
+
+ u64 status;
+ if( on_nugget_changed( event, "ch3s3_view", &status ) )
+ _ent_list_set_visible( event->entity_list, status == 2 );
+
+ if( on_function_trigger( event, 0 ) )
{
- { "p1", KCOL_PRES "Yall have some explaining to do here.." },
- { "p2", KCOL_PRES "Every single power plant in the USA is currently offline" },
- { "p3", KCOL_PRES "And yet.." },
- { "p4", KCOL_PRES "There is no national emergency?" },
- { "p5", KCOL_PRES "Nothing is wrong!" },
- { "p6", KCOL_PRES "So where the hell is all this power coming from?" },
- { "p7", KCOL_PRES "We traced it back here, to you guys" },
- { "p8", KCOL_PRES "Now, please. Enlighten me." },
- { "p9", KCOL_PRES "How exactly are you powering all of America?" },
- { "p10", KCOL_PRES "From this one tiny establishment?" },
- { "m1", KCOL_MIKE "Look, this is gonna be a tough one to explain mate" },
- { "m2", KCOL_MIKE "And to be honest I don't really get it myself" },
- { "p11", KCOL_PRES "Do your best!" },
- { "m3", KCOL_MIKE "Mr. President, we saw you take JC," },
- { "m4", KCOL_MIKE "Didn't he explain it to you already?" },
- { "p12", KCOL_PRES "JC JC.." },
- { "p13", KCOL_PRES "Ah! John Cockroach.." },
- { "p14", KCOL_PRES "Of course. He's a friend of yours?" },
- { "m5", KCOL_MIKE "Yeah.. I'm an intern at his wood company." },
- { "m6", KCOL_MIKE "And this is just a friend of ours here." },
- { "p15", KCOL_PRES "So what you're telling me is, and what he told me is," },
- { "p16", KCOL_PRES "Three random people, from a wood company," },
- { "p17", KCOL_PRES "in Tasmania, Australia" },
- { "p18", KCOL_PRES "just happen to have nuclear fusion" },
- { "m7", KCOL_MIKE "Yeah I guess.." },
- { "p19", KCOL_PRES "Man I cannot believe that old guy was telling the truth this whole time" },
- { "m8", KCOL_MIKE "Thats what I've been saying!" },
- { "p20", KCOL_PRES "The world don't make sense any more" },
- { "p21", KCOL_PRES "Well! Fortunately for you lot," },
- { "p22", KCOL_PRES "you're coming with us!" },
- { "p23", KCOL_PRES "We're sending you to Cambodia." },
- { "m9", KCOL_MIKE "What!?" },
- { "m10", KCOL_MIKE "Can he even do that?" },
- { "p24", KCOL_PRES "Yes I can. Now, get in." },
- { NULL, NULL },
- };
- static const struct generic_cutscene cutscene =
+ if( on_nugget_once( event, "ch3s3_view" ) )
+ {
+ _skaterift_script_nugget_set( "unlock_valley", 1 );
+
+ static const struct cs_subtitle EN[] =
+ {
+ { "p1", KCOL_PRES "Yall have some explaining to do here.." },
+ { "p2", KCOL_PRES "Every single power plant in the USA is currently offline" },
+ { "p3", KCOL_PRES "And yet.." },
+ { "p4", KCOL_PRES "There is no national emergency?" },
+ { "p5", KCOL_PRES "Nothing is wrong!" },
+ { "p6", KCOL_PRES "So where the hell is all this power coming from?" },
+ { "p7", KCOL_PRES "We traced it back here, to you guys" },
+ { "p8", KCOL_PRES "Now, please. Enlighten me." },
+ { "p9", KCOL_PRES "How exactly are you powering all of America?" },
+ { "p10", KCOL_PRES "From this one tiny establishment?" },
+ { "m1", KCOL_MIKE "Look, this is gonna be a tough one to explain mate" },
+ { "m2", KCOL_MIKE "And to be honest I don't really get it myself" },
+ { "p11", KCOL_PRES "Do your best!" },
+ { "m3", KCOL_MIKE "Mr. President, we saw you take JC," },
+ { "m4", KCOL_MIKE "Didn't he explain it to you already?" },
+ { "p12", KCOL_PRES "JC JC.." },
+ { "p13", KCOL_PRES "Ah! John Cockroach.." },
+ { "p14", KCOL_PRES "Of course. He's a friend of yours?" },
+ { "m5", KCOL_MIKE "Yeah.. I'm an intern at his wood company." },
+ { "m6", KCOL_MIKE "And this is just a friend of ours here." },
+ { "p15", KCOL_PRES "So what you're telling me is, and what he told me is," },
+ { "p16", KCOL_PRES "Three random people, from a wood company," },
+ { "p17", KCOL_PRES "in Tasmania, Australia" },
+ { "p18", KCOL_PRES "just happen to have nuclear fusion" },
+ { "m7", KCOL_MIKE "Yeah I guess.." },
+ { "p19", KCOL_PRES "Man I cannot believe that old guy was telling the truth this whole time" },
+ { "m8", KCOL_MIKE "Thats what I've been saying!" },
+ { "p20", KCOL_PRES "The world don't make sense any more" },
+ { "p21", KCOL_PRES "Well! Fortunately for you lot," },
+ { "p22", KCOL_PRES "you're coming with us!" },
+ { "p23", KCOL_PRES "We're sending you to Cambodia." },
+ { "m9", KCOL_MIKE "What!?" },
+ { "m10", KCOL_MIKE "Can he even do that?" },
+ { "p24", KCOL_PRES "Yes I can. Now, get in." },
+ { NULL, NULL },
+ };
+ _cutscene_load_and_play( "metascenes/ch3s3.ms", EN, 1 );
+ waiter->go = 1;
+ }
+ }
+ if( event->type == k_escript_event_update )
{
- .metascene_path = "metascenes/ch3s3.ms",
- .freeze_player = 1,
- .subtitles = EN,
- };
- optional_video_wrapper( &cutscene, "ch3s3_view", 0, event );
-#endif
+ if( waiter->go )
+ {
+ if( _cutscene.state == k_cutscene_state_none )
+ {
+ waiter->go = 0;
+ skaterift_load_world_command( 1, (const char *[]){ "sr002-local-dev_hub" } );
+ }
+ }
+ }
return 1;
}