diff --git a/Items.bb b/Items.bb index 929803025..755d04725 100644 --- a/Items.bb +++ b/Items.bb @@ -621,7 +621,6 @@ Function PickItem(item.Items) Case "1123" If Not (Wearing714 = 1) Then If PlayerRoom\RoomTemplate\Name <> "room1123" Then - ShowEntity Light LightFlash = 7 PlaySound_Strict(LoadTempSound("SFX\SCP\1123\Touch.ogg")) DeathMSG = "Subject D-9341 was shot dead after attempting to attack a member of Nine-Tailed Fox. Surveillance tapes show that the subject had been " @@ -633,7 +632,6 @@ Function PickItem(item.Items) For e.Events = Each Events If e\eventname = "room1123" Then If e\eventstate = 0 Then - ShowEntity Light LightFlash = 3 PlaySound_Strict(LoadTempSound("SFX\SCP\1123\Touch.ogg")) EndIf @@ -646,7 +644,6 @@ Function PickItem(item.Items) Return Case "killbat" - ShowEntity Light LightFlash = 1.0 PlaySound_Strict(IntroSFX(11)) DeathMSG = "Subject D-9341 found dead inside SCP-914's output booth next to what appears to be an ordinary nine-volt battery. The subject is covered in severe " diff --git a/Main.bb b/Main.bb index 0025cfcfe..6e0104d53 100644 --- a/Main.bb +++ b/Main.bb @@ -3132,15 +3132,13 @@ Repeat If LightFlash > 0 Then ShowEntity Light + EntityColor Light,255,255,255 EntityAlpha(Light, Max(Min(LightFlash + Rnd(-0.2, 0.2), 1.0), 0.0)) LightFlash = Max(LightFlash - (FPSfactor / 70.0), 0) Else HideEntity Light ;EntityAlpha(Light, LightFlash) EndIf - - EntityColor Light,255,255,255 - ;[End block] If KeyHit(KEY_INV) And VomitTimer >= 0 Then @@ -5713,7 +5711,6 @@ Function DrawGUI() ;[Block] If Not (Wearing714 = 1) Then If PlayerRoom\RoomTemplate\Name <> "room1123" Then - ShowEntity Light LightFlash = 7 PlaySound_Strict(LoadTempSound("SFX\SCP\1123\Touch.ogg")) DeathMSG = "Subject D-9341 was shot dead after attempting to attack a member of Nine-Tailed Fox. Surveillance tapes show that the subject had been " @@ -5726,7 +5723,6 @@ Function DrawGUI() For e.Events = Each Events If e\EventName = "room1123" Then If e\EventState = 0 Then - ShowEntity Light LightFlash = 3 PlaySound_Strict(LoadTempSound("SFX\SCP\1123\Touch.ogg")) EndIf diff --git a/MapSystem.bb b/MapSystem.bb index e0ef4ce91..9b11eec75 100644 --- a/MapSystem.bb +++ b/MapSystem.bb @@ -3984,6 +3984,42 @@ Function FillRoom(r.Rooms) de.Decals = CreateDecal(0, r\x + 456.0 * RoomScale, 0.005, r\z + 135.0 * RoomScale, 90, Rand(360), 0) EntityParent(de\obj, r\obj) + Local DecalID% + For i = 0 To 4 + Select i + Case 0 + xtemp = 4305 + ztemp = 1234.0 + DecalID = 4 + Case 1 + xtemp = 5190.0 + ztemp = 2270.0 + DecalID = 4 + Case 2 + xtemp = 5222.0 + ztemp = 1224.0 + DecalID = 4 + Case 3 + xtemp = 4320.0 + ztemp = 2000.0 + DecalID = 4 + Case 4 + xtemp = 4978.0 + ztemp = 1985.0 + DecalID = 6 + End Select + de = CreateDecal(DecalID, r\x + xtemp * RoomScale, r\y + 386.0 * RoomScale, r\z + ztemp * RoomScale, 90.0, 45.0, 0.0) + If i = 0 Then + de\Size = 0.44 + ElseIf i = 1 + de\Size = 1.2 + Else + de\Size = 0.54 + EndIf + de\Alpha = Rnd(0.8, 1.0) + ScaleSprite(de\OBJ, de\Size, de\Size) + Next + sc.SecurityCams = CreateSecurityCam(r\x - 336.0 * RoomScale, r\y + 352 * RoomScale, r\z + 48.0 * RoomScale, r, True) sc\angle = 270 sc\turn = 45 @@ -3996,21 +4032,13 @@ Function FillRoom(r.Rooms) EntityParent(sc\ScrObj, r\obj) r\Objects[2] = CreatePivot() - PositionEntity (r\Objects[2], EntityX(r\obj) + 40.0 * RoomScale, 460.0 * RoomScale, EntityZ(r\obj) + 1072.0 * RoomScale) + PositionEntity(r\Objects[2], EntityX(r\obj) - 200.0 * RoomScale, r\y + 440.0 * RoomScale, EntityZ(r\obj) + 1322.0 * RoomScale) r\Objects[3] = CreatePivot() - PositionEntity (r\Objects[3], EntityX(r\obj) - 80.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 526.0 * RoomScale) + PositionEntity(r\Objects[3], EntityX(r\obj) + 1000.0 * RoomScale, r\y + 120.0 * RoomScale, EntityZ(r\obj) + 666.0 * RoomScale) r\Objects[4] = CreatePivot() - PositionEntity (r\Objects[4], EntityX(r\obj) - 128.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 320.0 * RoomScale) - - r\Objects[5] = CreatePivot() - PositionEntity (r\Objects[5], EntityX(r\obj) + 660.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 526.0 * RoomScale) - r\Objects[6] = CreatePivot() - PositionEntity (r\Objects[6], EntityX(r\obj) + 700 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 320.0 * RoomScale) + PositionEntity(r\Objects[4], EntityX(r\obj) + 628.0 * RoomScale, r\y + 120.0 * RoomScale, EntityZ(r\obj) + 320.0 * RoomScale) - r\Objects[7] = CreatePivot() - PositionEntity (r\Objects[7], EntityX(r\obj) + 1472.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 912.0 * RoomScale) - - For i = 2 To 7 + For i = 2 To 4 EntityParent(r\Objects[i], r\obj) Next @@ -4408,13 +4436,39 @@ Function FillRoom(r.Rooms) de\Size = 1.2 ScaleSprite(de\obj, de\Size, de\Size) - For xtemp% = 0 To 1 - For ztemp% = 0 To 1 - de.Decals = CreateDecal(Rand(4, 6), r\x + 700.0 * RoomScale + xtemp * 700.0 * RoomScale + Rnd(-0.5, 0.5), Rnd(0.001, 0.0018), r\z + 600 * ztemp * RoomScale + Rnd(-0.5, 0.5), 90, Rnd(360), 0) - de\Size = Rnd(0.5, 0.8) - de\Alpha = Rnd(0.8, 1.0) - ScaleSprite(de\obj, de\Size, de\Size) - Next + For i = 0 To 4 + Select i + Case 0 + xtemp = 1472.0 + ztemp = 912.0 + DecalID = 4 + Case 1 + xtemp = 587.0 + ztemp = -70.0 + DecalID = 4 + Case 2 + xtemp = 1504.0 + ztemp = -80.0 + DecalID = 4 + Case 3 + xtemp = 602.0 + ztemp = 642.0 + DecalID = 4 + Case 4 + xtemp = 1260.0 + ztemp = 627.0 + DecalID = 6 + End Select + de = CreateDecal(DecalID, r\x + xtemp * RoomScale, r\y + 2.0 * RoomScale, r\z + ztemp * RoomScale, 90.0, 45.0, 0.0) + If i = 0 Then + de\Size = 1.2 + ElseIf i = 1 + de\Size = 0.44 + Else + de\Size = 0.54 + EndIf + de\Alpha = Rnd(0.8, 1.0) + ScaleSprite(de\OBJ, de\Size, de\Size) Next ;AddLight(r, r\x-224.0*RoomScale, r\y+640.0*RoomScale, r\z+128.0*RoomScale,2,2,200,200,200) @@ -4485,7 +4539,8 @@ Function FillRoom(r.Rooms) Next Next - CreateItem("Class D Orientation Leaflet", "paper", r\x-(2914+1024)*RoomScale, 170.0*RoomScale, r\z+40*RoomScale) + it = CreateItem("Class D Orientation Leaflet", "paper", r\x-(2914+1024)*RoomScale, 170.0*RoomScale, r\z+40*RoomScale) + EntityParent(it\Collider, r\obj) sc.SecurityCams = CreateSecurityCam(r\x - 4048.0 * RoomScale, r\y - 32.0 * RoomScale, r\z - 1232.0 * RoomScale, r, True) sc\angle = 270 @@ -4503,6 +4558,7 @@ Function FillRoom(r.Rooms) EntityPickMode r\Objects[9],2 r\Objects[10] = LoadMesh_Strict("GFX\map\intro_labels.b3d",r\obj) + PositionEntity(r\Objects[10], r\x, r\y - 15.0 * RoomScale, r\z, True) ;[End Block] Case "room2ccont" ;[Block] diff --git a/UpdateEvents.bb b/UpdateEvents.bb index ca041b65c..3895cef50 100644 --- a/UpdateEvents.bb +++ b/UpdateEvents.bb @@ -113,13 +113,11 @@ Function UpdateEvents() ;e\room\NPC[3]\Angle = 180 RotateEntity e\room\NPC[3]\Collider,0,90,0 SetNPCFrame(e\room\NPC[3], 286) : e\room\NPC[3]\State = 8 - MoveEntity e\room\NPC[3]\Collider,1,0,0 e\room\NPC[4] = CreateNPC(NPCtypeD, EntityX(e\room\Objects[3], True), 0.5, EntityZ(e\room\Objects[3], True)) ;PointEntity(e\room\NPC[4]\Collider, e\room\Objects[7]) SetNPCFrame(e\room\NPC[4], 19) : e\room\NPC[4]\State = 3 RotateEntity e\room\NPC[4]\Collider,0,270,0 - MoveEntity e\room\NPC[4]\Collider,0,0,2.65 e\room\NPC[5] = CreateNPC(NPCtypeD, EntityX(e\room\Objects[4], True), 0.5, EntityZ(e\room\Objects[4], True)) ChangeNPCTextureID(e\room\NPC[5],6) @@ -132,7 +130,6 @@ Function UpdateEvents() ;EntityTexture e\room\NPC[5]\obj, tex ;FreeTexture tex - MoveEntity e\room\NPC[5]\Collider,0.25,0,3.0 RotateEntity e\room\NPC[5]\Collider,0,0,0 x# = EntityX(e\room\obj, True)+3712*RoomScale @@ -371,9 +368,14 @@ Function UpdateEvents() NowPlaying = ShouldPlay PlaySound_Strict(IntroSFX(11)) - BlurTimer = 500 - ShowEntity Light - EntityAlpha(Light, 0.5) + LightFlash = 1 + BlurTimer = 1000 + + Playable = False + + CreateConsoleMsg("") + CreateConsoleMsg("WARNING! Using the console commands or teleporting away from the intro scene may cause bugs or crashing.", 255, 0, 0) + CreateConsoleMsg("") EndIf If e\EventState3 < 3 Then @@ -394,9 +396,6 @@ Function UpdateEvents() If e\EventState3-FPSfactor/30.0 < 12 And e\EventState3 > 12 Then PlaySound2(StepSFX(0,0,0), Camera, Collider, 8, 0.3) - ShowEntity Light - EntityAlpha(Light, 0.9-(e\EventState3/2.0)) - x = x + (EntityX(e\room\obj)-(3048.0+1024.0)*RoomScale - x) * Max((e\EventState3-10.0)/4.0,0.0) If e\EventState3 < 10 Then @@ -415,12 +414,11 @@ Function UpdateEvents() PositionEntity Collider, x, 0.302, z DropSpeed = 0 Else - HideEntity Light - PositionEntity Collider, EntityX(Collider), 0.302, EntityZ(Collider) ResetEntity Collider ShowEntity Collider DropSpeed = 0 + Playable = True e\EventState3 = 15 Msg = "Pick up the paper on the desk." MsgTimer=70*7 @@ -500,6 +498,10 @@ Function UpdateEvents() e\room\NPC[3]\PathStatus = FindPath(e\room\NPC[3],PlayerRoom\x-320*RoomScale, 0.3, PlayerRoom\z-704*RoomScale) e\room\NPC[4]\PathStatus = FindPath(e\room\NPC[4],PlayerRoom\x-320*RoomScale, 0.3, PlayerRoom\z-704*RoomScale) + e\room\RoomDoors[6]\locked = False + UseDoor(e\room\RoomDoors[6],False) + e\room\RoomDoors[6]\locked = True + e\EventState3 = 710 EndIf Else ;inside the cell @@ -553,10 +555,17 @@ Function UpdateEvents() If e\room\NPC[5]\State <> 11 If EntityDistance(e\room\NPC[3]\Collider,e\room\NPC[5]\Collider)>5.0 And EntityDistance(e\room\NPC[4]\Collider,e\room\NPC[5]\Collider) If EntityDistance(e\room\NPC[5]\Collider,Collider)<3.5 - e\room\NPC[5]\State = 11 - e\room\NPC[5]\State3 = 1 + For i = 3 To 5 + e\room\NPC[i]\State = 11 : e\room\NPC[i]\State3 = 1 : e\room\NPC[i]\Reload = 70*3 + + If i < 5 Then + If ChannelPlaying(e\room\NPC[i]\SoundChn) Then StopChannel(e\room\NPC[i]\SoundChn) + If e\room\NPC[i]\Sound <> 0 Then + FreeSound_Strict(e\room\NPC[i]\Sound) : e\room\NPC[i]\Sound = 0 + EndIf + EndIf + Next e\room\NPC[5]\SoundChn2 = PlaySound2(e\room\NPC[5]\Sound2,Camera,e\room\NPC[5]\Collider) - e\room\NPC[5]\Reload = 70*3 EndIf EndIf EndIf @@ -704,10 +713,17 @@ Function UpdateEvents() If e\room\NPC[5]\State <> 11 If EntityDistance(e\room\NPC[3]\Collider,e\room\NPC[5]\Collider)>5.0 And EntityDistance(e\room\NPC[4]\Collider,e\room\NPC[5]\Collider) If EntityDistance(e\room\NPC[5]\Collider,Collider)<3.5 - e\room\NPC[5]\State = 11 - e\room\NPC[5]\State3 = 1 + For i = 3 To 5 + e\room\NPC[i]\State = 11 : e\room\NPC[i]\State3 = 1 : e\room\NPC[i]\Reload = 70*3 + + If i < 5 Then + If ChannelPlaying(e\room\NPC[i]\SoundChn) Then StopChannel(e\room\NPC[i]\SoundChn) + If e\room\NPC[i]\Sound <> 0 Then + FreeSound_Strict(e\room\NPC[i]\Sound) : e\room\NPC[i]\Sound = 0 + EndIf + EndIf + Next e\room\NPC[5]\SoundChn2 = PlaySound2(e\room\NPC[5]\Sound2,Camera,e\room\NPC[5]\Collider) - e\room\NPC[5]\Reload = 70*3 EndIf EndIf EndIf @@ -863,6 +879,7 @@ Function UpdateEvents() UseDoor(e\room\RoomDoors[2],False) e\room\RoomDoors[2]\locked = True e\EventState3 = 910 + e\room\NPC[3]\State3 = 0 SetNPCFrame(e\room\NPC[3],608) EndIf EndIf @@ -870,21 +887,63 @@ Function UpdateEvents() EndIf EndIf Else - If e\room\NPC[3]\Frame <= 620.5 And e\room\NPC[3]\State = 8 Then - AnimateNPC(e\room\NPC[3],608,621,0.4,False) + If e\room\NPC[3]\State3 = 0 Then + If e\room\NPC[3]\Frame <= 620.5 And e\room\NPC[3]\State = 8 Then + AnimateNPC(e\room\NPC[3],608,621,0.4,False) + Else + e\room\NPC[3]\Angle = EntityYaw(e\room\NPC[3]\Collider) + e\room\NPC[3]\State3 = 1 + e\room\NPC[3]\State = 9 + e\room\NPC[4]\State = 9 + EndIf Else - e\room\NPC[3]\Angle = EntityYaw(e\room\NPC[3]\Collider) - e\room\NPC[3]\State = 9 - e\room\NPC[4]\State = 9 - If Distance(EntityX(Collider), EntityZ(Collider), EntityX(e\room\obj), EntityZ(e\room\obj)) < 4.0 Then - e\room\RoomDoors[2]\locked = False - UseDoor(e\room\RoomDoors[2],False) - e\room\RoomDoors[2]\locked = True - e\EventState3 = 0 - e\room\NPC[3]\State = 0 - e\room\NPC[4]\State = 0 - - UseDoor(e\room\RoomDoors[1],False) + If e\room\RoomDoors[2]\Open Then + temp = 1 + If SelectedItem <> Null Then temp = 3 + e\room\NPC[3]\State3 = Max(e\room\NPC[3]\State3+FPSfactor/temp,50) + If e\room\NPC[3]\State3 => 70*8 And e\room\NPC[3]\State3-FPSfactor/temp < 70*8 And e\room\NPC[3]\State=9 Then + If e\room\NPC[4]\SoundChn <> 0 Then + If ChannelPlaying(e\room\NPC[4]\SoundChn) Then StopChannel(e\room\NPC[4]\SoundChn) + EndIf + + If e\room\NPC[3]\State2 < 2 Then + FreeSound_Strict e\room\NPC[3]\Sound + e\room\NPC[3]\Sound = LoadSound_Strict("SFX\Room\Intro\Guard\Ulgrin\EscortRefuse"+Rand(1,2)+".ogg") + e\room\NPC[3]\SoundChn = PlaySound2(e\room\NPC[3]\Sound, Camera, e\room\NPC[3]\Collider) + e\room\NPC[3]\State3=50 + e\room\NPC[3]\State2=3 + ElseIf e\room\NPC[3]\State2=3 + FreeSound_Strict e\room\NPC[3]\Sound + e\room\NPC[3]\Sound = LoadSound_Strict("SFX\Room\Intro\Guard\Ulgrin\EscortPissedOff"+Rand(1,2)+".ogg") + e\room\NPC[3]\SoundChn = PlaySound2(e\room\NPC[3]\Sound, Camera, e\room\NPC[3]\Collider) + e\room\NPC[3]\State3=50 + e\room\NPC[3]\State2=4 + ElseIf e\room\NPC[3]\State2=4 + FreeSound_Strict e\room\NPC[3]\Sound + e\room\NPC[3]\Sound = LoadSound_Strict("SFX\Room\Intro\Guard\Ulgrin\EscortKill"+Rand(1,2)+".ogg") + e\room\NPC[3]\SoundChn = PlaySound2(e\room\NPC[3]\Sound, Camera, e\room\NPC[3]\Collider) + e\room\NPC[3]\State3 = 50+70*2.5 + e\room\NPC[3]\State2=5 + ElseIf e\room\NPC[3]\State2=5 + e\room\NPC[3]\State = 11 + e\room\NPC[4]\State = 11 + e\room\NPC[3]\State3 = 1 + e\room\NPC[4]\State3 = 1 + e\room\RoomDoors[2]\locked = False + UseDoor(e\room\RoomDoors[2],False) + e\room\RoomDoors[2]\locked = True + EndIf + EndIf + If Distance(EntityX(Collider), EntityZ(Collider), EntityX(e\room\obj), EntityZ(e\room\obj)) < 4.0 Then + e\room\RoomDoors[2]\locked = False + UseDoor(e\room\RoomDoors[2],False) + e\room\RoomDoors[2]\locked = True + e\EventState3 = 0 + e\room\NPC[3]\State = 0 + e\room\NPC[4]\State = 0 + + UseDoor(e\room\RoomDoors[1],False) + EndIf EndIf EndIf EndIf @@ -1084,6 +1143,11 @@ Function UpdateEvents() ElseIf e\EventState < 14000 ; player is inside the room e\EventState = Min(e\EventState + FPSfactor, 13000) + For i = 1 To 2 + PointEntity(e\room\NPC[i]\obj, e\room\Objects[5]) + RotateEntity(e\room\NPC[i]\Collider, 0, CurveValue(EntityYaw(e\room\NPC[i]\obj),EntityYaw(e\room\NPC[i]\Collider),15.0), 0) + Next + If e\EventState < 10300 Then PositionEntity(Collider, Max(EntityX(Collider), EntityX(e\room\obj) + 352.0 * RoomScale), EntityY(Collider), EntityZ(Collider)) End If @@ -1278,7 +1342,6 @@ Function UpdateEvents() CameraShake = 3 ElseIf e\EventState < 20300 ;lights on, the guard starts shooting at 173 PointEntity(e\room\NPC[0]\Collider, Curr173\Collider) - MoveEntity(e\room\NPC[0]\Collider, 0, 0, -0.002) e\room\NPC[0]\State = 2 UpdateSoundOrigin(e\room\NPC[0]\SoundChn,Camera,e\room\NPC[0]\Collider,20) If e\EventState > 20260 And e\EventState - FPSfactor < 20260 Then PlaySound_Strict(IntroSFX(12)) @@ -1383,7 +1446,7 @@ Function UpdateEvents() Else If KillTimer<0 Then - If e\room\NPC[3]\State = 1 Then + If e\room\NPC[3]\State = 1 Or e\room\NPC[3]\State = 11 Then LoadEventSound(e,"SFX\Room\Intro\Guard\Ulgrin\EscortTerminated.ogg") PlaySound_Strict e\Sound EndIf @@ -2960,7 +3023,6 @@ Function UpdateEvents() If KillTimer => 0 Then For i = 0 To 2 If Distance(EntityX(Collider),EntityZ(Collider),EntityX(e\room\Objects[i],True),EntityZ(e\room\Objects[i],True)) < 250.0*RoomScale Then - ShowEntity Light LightFlash = 0.4 CameraShake = 1.0 Kill() @@ -2976,7 +3038,6 @@ Function UpdateEvents() If Curr106\State <= -10 Then For i = 0 To 2 If Distance(EntityX(Curr106\Collider),EntityZ(Curr106\Collider),EntityX(e\room\Objects[i],True),EntityZ(e\room\Objects[i],True)) < 250.0*RoomScale Then - ShowEntity Light LightFlash = 0.3 If ParticleAmount > 0 For i = 0 To 5+(5*(ParticleAmount-1)) @@ -6809,7 +6870,6 @@ Function UpdateEvents() ElseIf e\EventState=7 PositionEntity Collider, EntityX(e\room\obj,True),0.3,EntityZ(e\room\obj,True),True ResetEntity Collider - ShowEntity Light LightFlash = 6 BlurTimer = 500 Injuries = PrevInjuries @@ -9229,6 +9289,10 @@ Function UpdateEndings() Delay 100 + CreateConsoleMsg("") + CreateConsoleMsg("WARNING! Teleporting away from this area may cause bugs or crashing.", 255, 0, 0) + CreateConsoleMsg("") + Sky = sky_CreateSky("GFX\map\sky\sky") RotateEntity Sky,0,e\room\angle-90,0 @@ -9643,7 +9707,9 @@ Function UpdateEndings() e\room\NPC[i]\State = (Not Contained106) Next - CreateConsoleMsg("WARNING! Teleporting away from this area may cause bugs or crashing.") + CreateConsoleMsg("") + CreateConsoleMsg("WARNING! Teleporting away from this area may cause bugs or crashing.", 255, 0, 0) + CreateConsoleMsg("") Sky = sky_CreateSky("GFX\map\sky\sky") RotateEntity Sky,0,e\room\angle,0