Jump to content


Photo

Halo 4's Coding Language

Halo 4

  • Please log in to reply
2 replies to this topic

#1 Slightly Live

Slightly Live

    Forward Unto Dawn

  • Veteran
  • 460 posts
  • Xbox LIVE:Slightly Live
  • PSN:ForwardUntoD
  • Steam:iwasdani
  • Location:Ireland

Posted 07 February 2013 - 11:35 AM

Taken from a link posted on HBO.

//SPAWN THE EVENT
script dormant field_the_event()
		sleep_until(volume_test_players (tv_field_the_event), 1);
	   
		if game_difficulty_get_real() == "legendary" then
				ai_place (field_event_phantom);
				dprint ("an advanced sniper party is lost, finding a safe place to land...");
		else
				dprint ("an advanced sniper party found their target");
		end
 
end
 
script command_script field_the_event_squad()
		object_set_variant (ai_vehicle_get( ai_current_actor ), ("no_turrets") );
		cs_ignore_obstacles (TRUE);
		cs_vehicle_speed (0.4);
	   
		cs_fly_by (ps_field_event.p0);
	   
		sleep (30*3);
	   
		cs_fly_by (ps_field_event.p1);
		cs_fly_by (ps_field_event.p2);
		cs_fly_to_and_face (ps_field_event.p3, ps_field_event.p5);
	   
		f_load_phantom (field_event_phantom, right, sq_field_the_event_01, sq_field_the_event_02, none, none);
		f_load_phantom (field_event_phantom, left, sq_field_the_event_03, sq_field_the_event_04, none, none);
	   
		sleep (30*2);
	   
		f_unload_phantom (field_event_phantom, right);
		f_unload_phantom (field_event_phantom, left);
	   
		sleep (30*2);
	   
		wake (f_test_field_event_dead);
	   
		cs_fly_to_and_face (ps_field_event.p3, ps_field_event.p2);
	   
		cs_vehicle_speed (0.6);
	   
		cs_fly_to (ps_phantom_01.p2);
		cs_fly_by (ps_phantom_01.p3);
 
  cs_vehicle_speed (1);
   
  cs_fly_by (ps_phantom_01.p4);
  cs_fly_by (ps_phantom_01.p5);
  dprint ("SCALING");
  object_set_scale( ai_vehicle_get( ai_current_actor ), 0.01, 300 );
 
  cs_fly_by (ps_phantom_01.p6);
 
		object_destroy( ai_vehicle_get( ai_current_actor ) );
 
end
 
script dormant f_test_field_event_dead()
		dprint ("waiting for event death");
		sleep_until (
				ai_living_count (sq_field_the_event_01) <= 0 and
				ai_living_count (sq_field_the_event_02) <= 0 and
				ai_living_count (sq_field_the_event_03) <= 0 and
				ai_living_count (sq_field_the_event_04) <= 0 and
				volume_test_players_all (tv_event_test)
				, 1);  
				dprint ("an elite team of snipers has met their end");
	   
		if
				ai_living_count (sq_field_the_event_01) <= 0 and
				ai_living_count (sq_field_the_event_02) <= 0 and
				ai_living_count (sq_field_the_event_03) <= 0 and
				ai_living_count (sq_field_the_event_04) <= 0 and
				volume_test_players_all (tv_event_test)
		then
				dprint ("rejoice and be glad, for your reward is great...");
				object_create (gpe_event_crate_01);
				object_create (gpe_event_crate_02);
				object_create (gpe_event_crate_03);
				object_create (gpe_event_crate_04);
		else
				dprint ("for cowardice, your only reward will be death...");
		end
			   
end


#2 Kinetic

Kinetic

    is Algebraic.

  • Veteran
  • 3,695 posts
  • PSN:DocKinetic
  • Steam:dockinetic

Posted 07 February 2013 - 03:21 PM

What I am looking at here?

#3 Slightly Live

Slightly Live

    Forward Unto Dawn

  • Veteran
  • 460 posts
  • Xbox LIVE:Slightly Live
  • PSN:ForwardUntoD
  • Steam:iwasdani
  • Location:Ireland

Posted 08 February 2013 - 07:55 AM

It's the code from an Easter Egg on the level Requiem. I've never seen examples of the game's scripting language before and thought it was cool.



Also tagged with one or more of these keywords: Halo 4

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

IPB Skin By Virteq