Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////// b5-3.sgs ///////
- include "b5-common";
- function LevelEnd()
- {
- level.nextLevel = "b5-4";
- }
- function HelpText_Enemies()
- {
- level.helptext.SetText( "Defeat enemies or sneak past them!\nPress #a(shoot) to shoot!", 1, 3 );
- }
- function Enemy1_Behavior(E)
- {
- for(;;)
- {
- E.i_speed = 0.4;
- E.patrol
- ([
- { action = "moveauto", pos = level.positions.room1a },
- { action = "wait", time = 3 },
- { action = "moveauto", pos = level.positions.room1b },
- { action = "wait", time = 3 },
- ]);
- E.fighter_behavior_1();
- }
- }
- function onLevelStart()
- {
- level.CreateEntity( "TPSPlayer" ).
- {
- position = level.positions.player_start,
- viewDir = vec3(-1,0,0),
- };
- level.FindEntity( "trig_end" ).SetupTrigger( true, LevelEnd );
- level.FindEntity( "trig_tip_enemies" ).SetupTrigger( -1, HelpText_Enemies );
- level.FindEntity( "enemy1" ).func = Enemy1_Behavior;
- }
- /////// b5-4.sgs ///////
- include "b5-common";
- function LevelEnd()
- {
- // level.nextLevel = "b5-5";
- }
- function Plat1_Behavior()
- {
- plat = level.FindEntity( "plat1" );
- for(;;)
- {
- plat.Open();
- sync( plat.ev_finished );
- yield 1;
- plat.Close();
- sync( plat.ev_finished );
- yield 1;
- }
- }
- function onLevelStart()
- {
- level.CreateEntity( "TPSPlayer" ).
- {
- position = level.positions.player_start,
- viewDir = vec3(0,-1,0),
- };
- level.FindEntity( "trig_end" ).SetupTrigger( true, LevelEnd );
- thread Plat1_Behavior();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement