diff --git a/Items.bb b/Items.bb index b4c13572..6844f054 100644 --- a/Items.bb +++ b/Items.bb @@ -144,7 +144,7 @@ Function InitItemTemplates() it = CreateItemTemplate("Document SCP-049", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc049.jpg", 0.003) : it\sound = 0 it = CreateItemTemplate("Document SCP-096", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc096.jpg", 0.003) : it\sound = 0 it = CreateItemTemplate("Document SCP-008", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc008.jpg", 0.003) : it\sound = 0 - it = CreateItemTemplate("Document SCP-012", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc012.jpg", 0.003) : it\sound = 0 + it = CreateItemTemplate("Document SCP-012", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc012.jpg", 0.003) : it\sound = 0 it = CreateItemTemplate("Document SCP-500", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc500.png", 0.003) : it\sound = 0 it = CreateItemTemplate("Document SCP-714", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc714.jpg", 0.003) : it\sound = 0 it = CreateItemTemplate("Document SCP-513", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc513.jpg", 0.003) : it\sound = 0 @@ -154,9 +154,9 @@ Function InitItemTemplates() it = CreateItemTemplate("Document SCP-966", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc966.jpg", 0.003) : it\sound = 0 it = CreateItemTemplate("Document SCP-970", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc970.jpg", 0.003) : it\sound = 0 it = CreateItemTemplate("Document SCP-1048", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1048.jpg", 0.003) : it\sound = 0 - it = CreateItemTemplate("Document SCP-1123", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1123.jpg", 0.003) : it\sound = 0 - it = CreateItemTemplate("Document SCP-1162", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1162.jpg", 0.003) : it\sound = 0 - it = CreateItemTemplate("Document SCP-1499", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1499.png", 0.003) : it\sound = 0 + it = CreateItemTemplate("Document SCP-1123", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1123.jpg", 0.003) : it\sound = 0 + it = CreateItemTemplate("Document SCP-1162", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1162.jpg", 0.003) : it\sound = 0 + it = CreateItemTemplate("Document SCP-1499", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1499.png", 0.003) : it\sound = 0 it = CreateItemTemplate("Incident Report SCP-1048-A", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1048a.jpg", 0.003) : it\sound = 0 it = CreateItemTemplate("Drawing", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc1048.jpg", 0.003) : it\sound = 0 @@ -173,9 +173,9 @@ Function InitItemTemplates() it = CreateItemTemplate("Journal Page", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\docGonzales.jpg", 0.0025) : it\sound = 0 - it = CreateItemTemplate("Log #1", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\f4.jpg", 0.004, "GFX\items\f4.jpg") : it\sound = 0 - it = CreateItemTemplate("Log #2", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\f5.jpg", 0.004, "GFX\items\f4.jpg") : it\sound = 0 - it = CreateItemTemplate("Log #3", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\f6.jpg", 0.004, "GFX\items\f4.jpg") : it\sound = 0 + it = CreateItemTemplate("Log #1", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\f4.jpg", 0.0017, "GFX\items\f4.jpg") : it\sound = 0 + it = CreateItemTemplate("Log #2", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\f5.jpg", 0.0017, "GFX\items\f4.jpg") : it\sound = 0 + it = CreateItemTemplate("Log #3", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\f6.jpg", 0.0017, "GFX\items\f4.jpg") : it\sound = 0 it = CreateItemTemplate("Strange Note", "paper", "GFX\items\paper.x", "GFX\items\INVnote.jpg", "GFX\items\docStrange.jpg", 0.0025, "GFX\items\notetexture.jpg") : it\sound = 0 @@ -214,7 +214,7 @@ Function InitItemTemplates() it = CreateItemTemplate("Empty Cup", "emptycup", "GFX\items\cup.x", "GFX\items\INVcup.jpg", "", 0.04) : it\sound = 2 - it = CreateItemTemplate("SCP-500-01", "scp500", "GFX\items\pill.b3d", "GFX\items\INVpill.jpg", "", 0.0001) : it\sound = 2 + it = CreateItemTemplate("SCP-500-01", "scp500", "GFX\items\pill.b3d", "GFX\items\INVpill.jpg", "", 0.0001) : it\sound = 2 EntityColor it\obj,255,0,0 it = CreateItemTemplate("First Aid Kit", "firstaid", "GFX\items\firstaid.x", "GFX\items\INVfirstaid.jpg", "", 0.05) @@ -280,11 +280,11 @@ Function InitItemTemplates() ;it = CreateItemTemplate("SCP-1074 Containment Notice", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc_arce.jpg", 0.003) : it\sound = 0 it = CreateItemTemplate("Night Vision Goggles", "supernv", "GFX\items\NVG.b3d", "GFX\items\INVsupernightvision.jpg", "", 0.02) : it\sound = 2 - it = CreateItemTemplate("Night Vision Goggles", "nvgoggles", "GFX\items\NVG.b3d", "GFX\items\INVnightvision.jpg", "", 0.02) : it\sound = 2 - it = CreateItemTemplate("Night Vision Goggles", "finenvgoggles", "GFX\items\NVG.b3d", "GFX\items\INVveryfinenightvision.jpg", "", 0.02) : it\sound = 2 - - it = CreateItemTemplate("Syringe", "syringe", "GFX\items\Syringe\syringe.b3d", "GFX\items\Syringe\inv.png", "", 0.005) : it\sound = 2 - it = CreateItemTemplate("Syringe", "finesyringe", "GFX\items\Syringe\syringe.b3d", "GFX\items\Syringe\inv.png", "", 0.005) : it\sound = 2 + it = CreateItemTemplate("Night Vision Goggles", "nvgoggles", "GFX\items\NVG.b3d", "GFX\items\INVnightvision.jpg", "", 0.02) : it\sound = 2 + it = CreateItemTemplate("Night Vision Goggles", "finenvgoggles", "GFX\items\NVG.b3d", "GFX\items\INVveryfinenightvision.jpg", "", 0.02) : it\sound = 2 + + it = CreateItemTemplate("Syringe", "syringe", "GFX\items\Syringe\syringe.b3d", "GFX\items\Syringe\inv.png", "", 0.005) : it\sound = 2 + it = CreateItemTemplate("Syringe", "finesyringe", "GFX\items\Syringe\syringe.b3d", "GFX\items\Syringe\inv.png", "", 0.005) : it\sound = 2 it = CreateItemTemplate("Syringe", "veryfinesyringe", "GFX\items\Syringe\syringe.b3d", "GFX\items\Syringe\inv.png", "", 0.005) : it\sound = 2 ;......... @@ -297,23 +297,23 @@ Function InitItemTemplates() it = CreateItemTemplate("Disciplinary Hearing DH-S-4137-17092", "oldpaper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\dh.s", 0.003) : it\sound = 0 it = CreateItemTemplate("Coin", "coin", "GFX\items\key.b3d", "GFX\items\INVcoin.jpg", "", 0.0005, "GFX\items\coin.png","",0,1+2+8) : it\sound = 3 it = CreateItemTemplate("Movie Ticket", "ticket", "GFX\items\key.b3d", "GFX\items\INVticket.jpg", "GFX\items\ticket.png", 0.002, "GFX\items\tickettexture.png","",0,1+2+8) : it\sound = 0 - CreateItemTemplate("Old Badge", "badge", "GFX\items\badge.x", "GFX\items\INVoldbadge.jpg", "GFX\items\badge2.png", 0.0001, "GFX\items\badge2_tex.png","",0,1+2+8) - - it = CreateItemTemplate("Quarter","25ct", "GFX\items\key.b3d", "GFX\items\INVcoin.jpg", "", 0.0005, "GFX\items\coin.png","",0,1+2+8) : it\sound = 3 + CreateItemTemplate("Old Badge", "badge", "GFX\items\badge.x", "GFX\items\INVoldbadge.jpg", "GFX\items\badge2.png", 0.0001, "GFX\items\badge2_tex.png","",0,1+2+8) + + it = CreateItemTemplate("Quarter","25ct", "GFX\items\key.b3d", "GFX\items\INVcoin.jpg", "", 0.0005, "GFX\items\coin.png","",0,1+2+8) : it\sound = 3 it = CreateItemTemplate("Wallet","wallet", "GFX\items\wallet.b3d", "GFX\items\INVwallet.jpg", "", 0.0005,"","",1) : it\sound = 2 - - CreateItemTemplate("SCP-427","scp427","GFX\items\427.b3d","GFX\items\INVscp427.jpg", "", 0.001) - it = CreateItemTemplate("Upgraded pill", "scp500death", "GFX\items\pill.b3d", "GFX\items\INVpill.jpg", "", 0.0001) : it\sound = 2 - EntityColor it\obj,255,0,0 - it = CreateItemTemplate("Pill", "pill", "GFX\items\pill.b3d", "GFX\items\INVpillwhite.jpg", "", 0.0001) : it\sound = 2 - EntityColor it\obj,255,255,255 - - it = CreateItemTemplate("Sticky Note", "paper", "GFX\items\note.x", "GFX\items\INVnote2.jpg", "GFX\items\note682.jpg", 0.0025) : it\sound = 0 - it = CreateItemTemplate("The Modular Site Project", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\docMSP.jpg", 0.003) : it\sound = 0 - - it = CreateItemTemplate("Research Sector-02 Scheme", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\docmap.jpg", 0.003) : it\sound = 0 - - it = CreateItemTemplate("Document SCP-427", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc427.jpg", 0.003) : it\sound = 0 + + CreateItemTemplate("SCP-427","scp427","GFX\items\427.b3d","GFX\items\INVscp427.jpg", "", 0.001) + it = CreateItemTemplate("Upgraded pill", "scp500death", "GFX\items\pill.b3d", "GFX\items\INVpill.jpg", "", 0.0001) : it\sound = 2 + EntityColor it\obj,255,0,0 + it = CreateItemTemplate("Pill", "pill", "GFX\items\pill.b3d", "GFX\items\INVpillwhite.jpg", "", 0.0001) : it\sound = 2 + EntityColor it\obj,255,255,255 + + it = CreateItemTemplate("Sticky Note", "paper", "GFX\items\note.x", "GFX\items\INVnote2.jpg", "GFX\items\note682.jpg", 0.0025) : it\sound = 0 + it = CreateItemTemplate("The Modular Site Project", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\docMSP.jpg", 0.003) : it\sound = 0 + + it = CreateItemTemplate("Research Sector-02 Scheme", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\docmap.jpg", 0.003) : it\sound = 0 + + it = CreateItemTemplate("Document SCP-427", "paper", "GFX\items\paper.x", "GFX\items\INVpaper.jpg", "GFX\items\doc427.jpg", 0.003) : it\sound = 0 For it = Each ItemTemplates If (it\tex<>0) Then @@ -378,6 +378,7 @@ Function CreateItem.Items(name$, tempname$, x#, y#, z#, r%=0,g%=0,b%=0,a#=1.0,in i\name = it\name ShowEntity i\collider ShowEntity i\model + Exit EndIf EndIf Next @@ -393,6 +394,8 @@ Function CreateItem.Items(name$, tempname$, x#, y#, z#, r%=0,g%=0,b%=0,a#=1.0,in i\DropSpeed = 0.0 If tempname = "cup" Then + i\state = 1.0 + i\r=r i\g=g i\b=b @@ -419,9 +422,9 @@ Function CreateItem.Items(name$, tempname$, x#, y#, z#, r%=0,g%=0,b%=0,a#=1.0,in If (tempname="clipboard") And (invSlots=0) Then invSlots = 10 SetAnimTime i\model,17.0 - i\invimg = i\itemtemplate\invimg2 - ElseIf (tempname="wallet") And (invSlots=0) Then - invSlots = 10 + i\invimg = i\itemtemplate\invimg2 + ElseIf (tempname="wallet") And (invSlots=0) Then + invSlots = 10 SetAnimTime i\model,0.0 EndIf @@ -440,11 +443,11 @@ Function RemoveItem(i.Items) FreeEntity(i\model) : FreeEntity(i\collider) : i\collider = 0 For n% = 0 To MaxItemAmount - 1 - If Inventory(n) = i - DebugLog "Removed "+i\itemtemplate\name+" from slot "+n - Inventory(n) = Null - ItemAmount = ItemAmount-1 - Exit + If Inventory(n) = i + DebugLog "Removed "+i\itemtemplate\name+" from slot "+n + Inventory(n) = Null + ItemAmount = ItemAmount-1 + Exit EndIf Next If SelectedItem = i Then @@ -460,8 +463,8 @@ Function RemoveItem(i.Items) Case "scp714" Wearing714 = False Case "scp1499","super1499" - Wearing1499 = False - Case "scp427" + Wearing1499 = False + Case "scp427" I_427\Using = False End Select @@ -477,138 +480,138 @@ Function RemoveItem(i.Items) End Function -Function UpdateItems() - CatchErrors("Uncaught (UpdateItems)") - Local n, i.Items, i2.Items - Local xtemp#, ytemp#, ztemp# - Local temp%, np.NPCs - Local pick% - - Local HideDist = HideDistance*0.5 - Local deletedItem% = False - - ClosestItem = Null - For i.Items = Each Items - i\Dropped = 0 - - If (Not i\Picked) Then - If i\disttimer < MilliSecs2() Then - i\dist = EntityDistance(Camera, i\collider) - i\disttimer = MilliSecs2() + 700 - If i\dist < HideDist Then ShowEntity i\collider - EndIf - - If i\dist < HideDist Then - ShowEntity i\collider - - If i\dist < 1.2 Then - If ClosestItem = Null Then - If EntityInView(i\model, Camera) Then - If EntityVisible(i\collider,Camera) Then - ClosestItem = i - EndIf - EndIf - ElseIf ClosestItem = i Or i\dist < EntityDistance(Camera, ClosestItem\collider) Then - If EntityInView(i\model, Camera) Then - If EntityVisible(i\collider,Camera) Then - ClosestItem = i - EndIf - EndIf - EndIf - EndIf - - If EntityCollided(i\collider, HIT_MAP) Then - i\DropSpeed = 0 - i\xspeed = 0.0 - i\zspeed = 0.0 - Else - If ShouldEntitiesFall - pick = LinePick(EntityX(i\collider),EntityY(i\collider),EntityZ(i\collider),0,-10,0) - If pick - i\DropSpeed = i\DropSpeed - 0.0004 * FPSfactor - TranslateEntity i\collider, i\xspeed*FPSfactor, i\DropSpeed * FPSfactor, i\zspeed*FPSfactor - If i\WontColl Then ResetEntity(i\collider) - Else - i\DropSpeed = 0 - i\xspeed = 0.0 - i\zspeed = 0.0 - EndIf - Else - i\DropSpeed = 0 - i\xspeed = 0.0 - i\zspeed = 0.0 - EndIf - EndIf - - If i\disti2 And (Not i2\Picked) And i2\dist "room2storage" Then - xtemp = xtemp*(0.07-ed) - ztemp = ztemp*(0.07-ed) - - While Abs(xtemp)+Abs(ztemp)<0.001 - xtemp = xtemp+Rnd(-0.002,0.002) - ztemp = ztemp+Rnd(-0.002,0.002) - Wend - - TranslateEntity i2\collider,xtemp,0,ztemp - TranslateEntity i\collider,-xtemp,0,-ztemp - EndIf - EndIf - EndIf - Next - EndIf - - If EntityY(i\collider) < - 35.0 Then DebugLog "remove: " + i\itemtemplate\name:RemoveItem(i):deletedItem=True - Else - HideEntity i\collider - EndIf - Else - i\DropSpeed = 0 - i\xspeed = 0.0 - i\zspeed = 0.0 - EndIf - - If Not deletedItem Then - CatchErrors(Chr(34)+i\itemtemplate\name+Chr(34)+" item") - EndIf - deletedItem = False - Next - - If ClosestItem <> Null Then - ;DrawHandIcon = True - - If MouseHit1 Then PickItem(ClosestItem) - EndIf - +Function UpdateItems() + CatchErrors("Uncaught (UpdateItems)") + Local n, i.Items, i2.Items + Local xtemp#, ytemp#, ztemp# + Local temp%, np.NPCs + Local pick% + + Local HideDist = HideDistance*0.5 + Local deletedItem% = False + + ClosestItem = Null + For i.Items = Each Items + i\Dropped = 0 + + If (Not i\Picked) Then + If i\disttimer < MilliSecs2() Then + i\dist = EntityDistance(Camera, i\collider) + i\disttimer = MilliSecs2() + 700 + If i\dist < HideDist Then ShowEntity i\collider + EndIf + + If i\dist < HideDist Then + ShowEntity i\collider + + If i\dist < 1.2 Then + If ClosestItem = Null Then + If EntityInView(i\model, Camera) Then + If EntityVisible(i\collider,Camera) Then + ClosestItem = i + EndIf + EndIf + ElseIf ClosestItem = i Or i\dist < EntityDistance(Camera, ClosestItem\collider) Then + If EntityInView(i\model, Camera) Then + If EntityVisible(i\collider,Camera) Then + ClosestItem = i + EndIf + EndIf + EndIf + EndIf + + If EntityCollided(i\collider, HIT_MAP) Then + i\DropSpeed = 0 + i\xspeed = 0.0 + i\zspeed = 0.0 + Else + If ShouldEntitiesFall + pick = LinePick(EntityX(i\collider),EntityY(i\collider),EntityZ(i\collider),0,-10,0) + If pick + i\DropSpeed = i\DropSpeed - 0.0004 * FPSfactor + TranslateEntity i\collider, i\xspeed*FPSfactor, i\DropSpeed * FPSfactor, i\zspeed*FPSfactor + If i\WontColl Then ResetEntity(i\collider) + Else + i\DropSpeed = 0 + i\xspeed = 0.0 + i\zspeed = 0.0 + EndIf + Else + i\DropSpeed = 0 + i\xspeed = 0.0 + i\zspeed = 0.0 + EndIf + EndIf + + If i\disti2 And (Not i2\Picked) And i2\dist "room2storage" Then + xtemp = xtemp*(0.07-ed) + ztemp = ztemp*(0.07-ed) + + While Abs(xtemp)+Abs(ztemp)<0.001 + xtemp = xtemp+Rnd(-0.002,0.002) + ztemp = ztemp+Rnd(-0.002,0.002) + Wend + + TranslateEntity i2\collider,xtemp,0,ztemp + TranslateEntity i\collider,-xtemp,0,-ztemp + EndIf + EndIf + EndIf + Next + EndIf + + If EntityY(i\collider) < - 35.0 Then DebugLog "remove: " + i\itemtemplate\name:RemoveItem(i):deletedItem=True + Else + HideEntity i\collider + EndIf + Else + i\DropSpeed = 0 + i\xspeed = 0.0 + i\zspeed = 0.0 + EndIf + + If Not deletedItem Then + CatchErrors(Chr(34)+i\itemtemplate\name+Chr(34)+" item") + EndIf + deletedItem = False + Next + + If ClosestItem <> Null Then + ;DrawHandIcon = True + + If MouseHit1 Then PickItem(ClosestItem) + EndIf + End Function Function PickItem(item.Items) - Local n% = 0 + Local n% = 0 Local canpickitem = True - Local fullINV% = True - - For n% = 0 To MaxItemAmount - 1 - If Inventory(n)=Null - fullINV = False - Exit - EndIf - Next - - If WearingHazmat > 0 Then - Msg = "You cannot pick up any items while wearing a hazmat suit." - MsgTimer = 70*5 - Return - EndIf + Local fullINV% = True + + For n% = 0 To MaxItemAmount - 1 + If Inventory(n)=Null + fullINV = False + Exit + EndIf + Next + + If WearingHazmat > 0 Then + Msg = "You cannot pick up any items while wearing a hazmat suit." + MsgTimer = 70*5 + Return + EndIf CatchErrors("Uncaught (PickItem)") If (Not fullINV) Then @@ -618,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 " @@ -630,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 @@ -639,11 +640,10 @@ Function PickItem(item.Items) Exit EndIf Next - EndIf - + EndIf + 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 " @@ -666,56 +666,56 @@ Function PickItem(item.Items) Case "navigator", "nav" If item\itemtemplate\name = "S-NAV Navigator Ultimate" Then GiveAchievement(AchvSNAV) Case "hazmatsuit", "hazmatsuit2", "hazmatsuit3" - canpickitem = True - For z% = 0 To MaxItemAmount - 1 - If Inventory(z) <> Null Then - If Inventory(z)\itemtemplate\tempname="hazmatsuit" Or Inventory(z)\itemtemplate\tempname="hazmatsuit2" Or Inventory(z)\itemtemplate\tempname="hazmatsuit3" Then - canpickitem% = False - Exit - ElseIf Inventory(z)\itemtemplate\tempname="vest" Or Inventory(z)\itemtemplate\tempname="finevest" Then - canpickitem% = 2 - Exit - EndIf - EndIf - Next - - If canpickitem=False Then - Msg = "You are not able to wear two hazmat suits at the same time." - MsgTimer = 70 * 5 - Return - ElseIf canpickitem=2 Then - Msg = "You are not able to wear a vest and a hazmat suit at the same time." - MsgTimer = 70 * 5 - Return - Else - ;TakeOffStuff(1+16) - SelectedItem = item + canpickitem = True + For z% = 0 To MaxItemAmount - 1 + If Inventory(z) <> Null Then + If Inventory(z)\itemtemplate\tempname="hazmatsuit" Or Inventory(z)\itemtemplate\tempname="hazmatsuit2" Or Inventory(z)\itemtemplate\tempname="hazmatsuit3" Then + canpickitem% = False + Exit + ElseIf Inventory(z)\itemtemplate\tempname="vest" Or Inventory(z)\itemtemplate\tempname="finevest" Then + canpickitem% = 2 + Exit + EndIf + EndIf + Next + + If canpickitem=False Then + Msg = "You are not able to wear two hazmat suits at the same time." + MsgTimer = 70 * 5 + Return + ElseIf canpickitem=2 Then + Msg = "You are not able to wear a vest and a hazmat suit at the same time." + MsgTimer = 70 * 5 + Return + Else + ;TakeOffStuff(1+16) + SelectedItem = item EndIf - Case "vest","finevest" - canpickitem = True - For z% = 0 To MaxItemAmount - 1 - If Inventory(z) <> Null Then - If Inventory(z)\itemtemplate\tempname="vest" Or Inventory(z)\itemtemplate\tempname="finevest" Then - canpickitem% = False - Exit - ElseIf Inventory(z)\itemtemplate\tempname="hazmatsuit" Or Inventory(z)\itemtemplate\tempname="hazmatsuit2" Or Inventory(z)\itemtemplate\tempname="hazmatsuit3" Then - canpickitem% = 2 - Exit - EndIf - EndIf - Next - - If canpickitem=False Then - Msg = "You are not able to wear two vests at the same time." - MsgTimer = 70 * 5 - Return - ElseIf canpickitem=2 Then - Msg = "You are not able to wear a vest and a hazmat suit at the same time." - MsgTimer = 70 * 5 - Return - Else - ;TakeOffStuff(2) - SelectedItem = item + Case "vest","finevest" + canpickitem = True + For z% = 0 To MaxItemAmount - 1 + If Inventory(z) <> Null Then + If Inventory(z)\itemtemplate\tempname="vest" Or Inventory(z)\itemtemplate\tempname="finevest" Then + canpickitem% = False + Exit + ElseIf Inventory(z)\itemtemplate\tempname="hazmatsuit" Or Inventory(z)\itemtemplate\tempname="hazmatsuit2" Or Inventory(z)\itemtemplate\tempname="hazmatsuit3" Then + canpickitem% = 2 + Exit + EndIf + EndIf + Next + + If canpickitem=False Then + Msg = "You are not able to wear two vests at the same time." + MsgTimer = 70 * 5 + Return + ElseIf canpickitem=2 Then + Msg = "You are not able to wear a vest and a hazmat suit at the same time." + MsgTimer = 70 * 5 + Return + Else + ;TakeOffStuff(2) + SelectedItem = item EndIf End Select @@ -723,7 +723,7 @@ Function PickItem(item.Items) item\Picked = True item\Dropped = -1 - item\itemtemplate\found=True + item\itemtemplate\found=True ItemAmount = ItemAmount + 1 Inventory(n) = item @@ -739,15 +739,15 @@ Function PickItem(item.Items) End Function Function DropItem(item.Items,playdropsound%=True) - If WearingHazmat > 0 Then - Msg = "You cannot drop any items while wearing a hazmat suit." - MsgTimer = 70*5 - Return - EndIf - - CatchErrors("Uncaught (DropItem)") + If WearingHazmat > 0 Then + Msg = "You cannot drop any items while wearing a hazmat suit." + MsgTimer = 70*5 + Return + EndIf + + CatchErrors("Uncaught (DropItem)") If playdropsound Then - If item\itemtemplate\sound <> 66 Then PlaySound_Strict(PickSFX(item\itemtemplate\sound)) + If item\itemtemplate\sound <> 66 Then PlaySound_Strict(PickSFX(item\itemtemplate\sound)) EndIf item\Dropped = 1 @@ -762,7 +762,10 @@ Function DropItem(item.Items,playdropsound%=True) item\Picked = False For z% = 0 To MaxItemAmount - 1 - If Inventory(z) = item Then Inventory(z) = Null + If Inventory(z) = item Then + Inventory(z) = Null + Exit + EndIf Next Select item\itemtemplate\tempname Case "gasmask", "supergasmask", "gasmask3" @@ -780,108 +783,108 @@ Function DropItem(item.Items,playdropsound%=True) Case "scp714" Wearing714 = False Case "scp1499","super1499" - Wearing1499 = False - Case "scp427" + Wearing1499 = False + Case "scp427" I_427\Using = False End Select CatchErrors("DropItem") End Function - + ;Update any ailments inflicted by SCP-294 drinks. -Function Update294() - CatchErrors("Uncaught (Update294)") - - If CameraShakeTimer > 0 Then - CameraShakeTimer = CameraShakeTimer - (FPSfactor/70) - CameraShake = 2 - EndIf - - If VomitTimer > 0 Then - DebugLog VomitTimer - VomitTimer = VomitTimer - (FPSfactor/70) - - If (MilliSecs2() Mod 1600) < Rand(200, 400) Then - If BlurTimer = 0 Then BlurTimer = Rnd(10, 20)*70 - CameraShake = Rnd(0, 2) - EndIf - -; If (MilliSecs2() Mod 1000) < Rand(1200) Then - - If Rand(50) = 50 And (MilliSecs2() Mod 4000) < 200 Then PlaySound_Strict(CoughSFX(Rand(0,2))) - - ;Regurgitate when timer is below 10 seconds. (ew) - If VomitTimer < 10 And Rnd(0, 500 * VomitTimer) < 2 Then - If (Not ChannelPlaying(VomitCHN)) And (Not Regurgitate) Then - VomitCHN = PlaySound_Strict(LoadTempSound("SFX\SCP\294\Retch" + Rand(1, 2) + ".ogg")) - Regurgitate = MilliSecs2() + 50 - EndIf - EndIf - - If Regurgitate > MilliSecs2() And Regurgitate <> 0 Then - mouse_y_speed_1 = mouse_y_speed_1 + 1.0 - Else - Regurgitate = 0 - EndIf - - ElseIf VomitTimer < 0 Then ;vomit - VomitTimer = VomitTimer - (FPSfactor/70) - - If VomitTimer > -5 Then - If (MilliSecs2() Mod 400) < 50 Then CameraShake = 4 - mouse_x_speed_1 = 0.0 - Playable = False - Else - Playable = True - EndIf - - If (Not Vomit) Then - BlurTimer = 40 * 70 - VomitSFX = LoadSound_Strict("SFX\SCP\294\Vomit.ogg") - VomitCHN = PlaySound_Strict(VomitSFX) - PrevInjuries = Injuries - PrevBloodloss = Bloodloss - Injuries = 1.5 - Bloodloss = 70 - EyeIrritation = 9 * 70 - - pvt = CreatePivot() - PositionEntity(pvt, EntityX(Camera), EntityY(Collider) - 0.05, EntityZ(Camera)) - TurnEntity(pvt, 90, 0, 0) - EntityPick(pvt, 0.3) - de.decals = CreateDecal(5, PickedX(), PickedY() + 0.005, PickedZ(), 90, 180, 0) - de\Size = 0.001 : de\SizeChange = 0.001 : de\MaxSize = 0.6 : EntityAlpha(de\obj, 1.0) : EntityColor(de\obj, 0.0, Rnd(200, 255), 0.0) : ScaleSprite de\obj, de\size, de\size - FreeEntity pvt - Vomit = True - EndIf - - UpdateDecals() - - mouse_y_speed_1 = mouse_y_speed_1 + Max((1.0 + VomitTimer / 10), 0.0) - - If VomitTimer < -15 Then - FreeSound_Strict(VomitSFX) - VomitTimer = 0 - If KillTimer >= 0 Then - PlaySound_Strict(BreathSFX(0,0)) - EndIf - Injuries = PrevInjuries - Bloodloss = PrevBloodloss - Vomit = False - EndIf - EndIf - +Function Update294() + CatchErrors("Uncaught (Update294)") + + If CameraShakeTimer > 0 Then + CameraShakeTimer = Max(CameraShakeTimer - (FPSfactor/70), 0) + CameraShake = 2 + EndIf + + If VomitTimer > 0 Then + DebugLog VomitTimer + VomitTimer = VomitTimer - (FPSfactor/70) + + If (MilliSecs2() Mod 1600) < Rand(200, 400) Then + If BlurTimer = 0 Then BlurTimer = Rnd(10, 20)*70 + CameraShake = Rnd(0, 2) + EndIf + +; If (MilliSecs2() Mod 1000) < Rand(1200) Then + + If Rand(50) = 50 And (MilliSecs2() Mod 4000) < 200 Then PlaySound_Strict(CoughSFX(Rand(0,2))) + + ;Regurgitate when timer is below 10 seconds. (ew) + If VomitTimer < 10 And Rnd(0, 500 * VomitTimer) < 2 Then + If (Not ChannelPlaying(VomitCHN)) And (Not Regurgitate) Then + VomitCHN = PlaySound_Strict(LoadTempSound("SFX\SCP\294\Retch" + Rand(1, 2) + ".ogg")) + Regurgitate = MilliSecs2() + 50 + EndIf + EndIf + + If Regurgitate > MilliSecs2() And Regurgitate <> 0 Then + mouse_y_speed_1 = mouse_y_speed_1 + 1.0 + Else + Regurgitate = 0 + EndIf + + ElseIf VomitTimer < 0 Then ;vomit + VomitTimer = VomitTimer - (FPSfactor/70) + + If VomitTimer > -5 Then + If (MilliSecs2() Mod 400) < 50 Then CameraShake = 4 + mouse_x_speed_1 = 0.0 + Playable = False + Else + Playable = True + EndIf + + If (Not Vomit) Then + BlurTimer = 40 * 70 + VomitSFX = LoadSound_Strict("SFX\SCP\294\Vomit.ogg") + VomitCHN = PlaySound_Strict(VomitSFX) + PrevInjuries = Injuries + PrevBloodloss = Bloodloss + Injuries = 1.5 + Bloodloss = 70 + EyeIrritation = 9 * 70 + + pvt = CreatePivot() + PositionEntity(pvt, EntityX(Camera), EntityY(Collider) - 0.05, EntityZ(Camera)) + TurnEntity(pvt, 90, 0, 0) + EntityPick(pvt, 0.3) + de.decals = CreateDecal(5, PickedX(), PickedY() + 0.005, PickedZ(), 90, 180, 0) + de\Size = 0.001 : de\SizeChange = 0.001 : de\MaxSize = 0.6 : EntityAlpha(de\obj, 1.0) : EntityColor(de\obj, 0.0, Rnd(200, 255), 0.0) : ScaleSprite de\obj, de\size, de\size + FreeEntity pvt + Vomit = True + EndIf + + UpdateDecals() + + mouse_y_speed_1 = mouse_y_speed_1 + Max((1.0 + VomitTimer / 10), 0.0) + + If VomitTimer < -15 Then + FreeSound_Strict(VomitSFX) + VomitTimer = 0 + If KillTimer >= 0 Then + PlaySound_Strict(BreathSFX(0,0)) + EndIf + Injuries = PrevInjuries + Bloodloss = PrevBloodloss + Vomit = False + EndIf + EndIf + CatchErrors("Update294") End Function - - - - - - - - -;~IDEal Editor Parameters: -;~F#B#1E + + + + + + + + +;~IDEal Editor Parameters: +;~F#B#1E ;~C#Blitz3D \ No newline at end of file diff --git a/Main.bb b/Main.bb index 87e76297..b4ba7617 100644 --- a/Main.bb +++ b/Main.bb @@ -1,3 +1,4 @@ + ;SCP - Containment Breach ; The game is based on the works of the SCP Foundation community (http://www.scp-wiki.net/). @@ -46,7 +47,7 @@ Global VersionNumber$ = "1.3.11" Global CompatibleNumber$ = "1.3.11" ;Only change this if the version given isn't working with the current build version - ENDSHN Global MenuWhite%, MenuBlack% -Global ButtonSFX% +Global ButtonSFX% = LoadSound_Strict("SFX\Interact\Button.ogg") Global EnableSFXRelease% = GetINIInt(OptionFile, "audio", "sfx release") Global EnableSFXRelease_Prev% = EnableSFXRelease% @@ -60,7 +61,6 @@ Dim ArrowIMG(4) Global LauncherWidth%= Min(GetINIInt(OptionFile, "launcher", "launcher width"), 1024) Global LauncherHeight% = Min(GetINIInt(OptionFile, "launcher", "launcher height"), 768) Global LauncherEnabled% = GetINIInt(OptionFile, "launcher", "launcher enabled") -Global LauncherIMG% Global GraphicWidth% = GetINIInt(OptionFile, "options", "width") Global GraphicHeight% = GetINIInt(OptionFile, "options", "height") @@ -340,6 +340,8 @@ Global MsgTimer#, Msg$, DeathMSG$ Global AccessCode%, KeypadInput$, KeypadTimer#, KeypadMSG$ +Const HARPCODE% = 7816 + Global DrawHandIcon% Dim DrawArrowIcon%(4) @@ -3131,15 +3133,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 @@ -3241,12 +3241,6 @@ Repeat DrawGUI() - If EndingTimer < 0 Then - If SelectedEnding <> "" Then DrawEnding() - Else - DrawMenu() - EndIf - UpdateConsole() If PlayerRoom <> Null Then @@ -3258,6 +3252,7 @@ Repeat Msg = "Double click on the document to view it." MsgTimer=70*7 e\EventState3 = 50 + Exit EndIf EndIf EndIf @@ -3298,6 +3293,12 @@ Repeat Color 255, 255, 255 If ShowFPS Then AASetFont ConsoleFont : AAText 20, 20, "FPS: " + FPS : AASetFont Font1 + If EndingTimer < 0 Then + If SelectedEnding <> "" Then DrawEnding() + Else + DrawMenu() + EndIf + DrawQuickLoading() UpdateAchievementMsg() @@ -3531,7 +3532,7 @@ Function QuickLoadEvents() ;[End Block] Case "room205" ;[Block] - If e\EventState=0 Or e\room\Objects[0]=0 Then + If e\EventState=0 Or e\EventStr <> "loaddone" Then If e\EventStr = "load0" e\room\Objects[3] = LoadAnimMesh_Strict("GFX\npcs\205_demon1.b3d") QuickLoadPercent = 10 @@ -3648,8 +3649,6 @@ Function QuickLoadEvents() Local ch.Chunk For i = -2 To 0 Step 2 ch = CreateChunk(-1,x#*(i*2.5),EntityY(e\room\obj),z#,True) - Next - For i = -2 To 0 Step 2 ch = CreateChunk(-1,x#*(i*2.5),EntityY(e\room\obj),z#-40,True) Next e\EventState = 2.0 @@ -3786,8 +3785,11 @@ Function DrawEnding() Local roomamount = 0, roomsfound = 0 For r.Rooms = Each Rooms - roomamount = roomamount + 1 - roomsfound = roomsfound + r\found + Local RN$ = r\RoomTemplate\Name$ + If RN$ <> "dimension1499" And RN$ <> "gatea" And RN$ <> "pocketdimension" Then + roomamount = roomamount + 1 + roomsfound = roomsfound + r\found + EndIf Next Local docamount=0, docsfound=0 @@ -3799,7 +3801,7 @@ Function DrawEnding() Next Local scpsEncountered=1 - For i = 0 To 24 + For i = Achv008 To Achv1499 scpsEncountered = scpsEncountered+Achievements(i) Next @@ -4107,7 +4109,10 @@ Function MovePlayer() For i = 0 To MaxItemAmount-1 If Inventory(i)<>Null Then - If Inventory(i)\itemtemplate\tempname = "finevest" Then Stamina = Min(Stamina, 60) + If Inventory(i)\itemtemplate\tempname = "finevest" Then + Stamina = Min(Stamina, 60) + Exit + EndIf EndIf Next @@ -4156,33 +4161,27 @@ Function MovePlayer() If CurrStepSFX=0 Then temp = GetStepSound(Collider) - If Sprint = 1.0 Then + If Sprint = 2.5 Then PlayerSoundVolume = Max(4.0,PlayerSoundVolume) tempchn% = PlaySound_Strict(StepSFX(temp, 0, Rand(0, 7))) - ChannelVolume tempchn, (1.0-(Crouch*0.6))*SFXVolume# Else PlayerSoundVolume = Max(2.5-(Crouch*0.6),PlayerSoundVolume) tempchn% = PlaySound_Strict(StepSFX(temp, 1, Rand(0, 7))) - ChannelVolume tempchn, (1.0-(Crouch*0.6))*SFXVolume# End If ElseIf CurrStepSFX=1 tempchn% = PlaySound_Strict(Step2SFX(Rand(0, 2))) - ChannelVolume tempchn, (1.0-(Crouch*0.4))*SFXVolume# ElseIf CurrStepSFX=2 tempchn% = PlaySound_Strict(Step2SFX(Rand(3,5))) - ChannelVolume tempchn, (1.0-(Crouch*0.4))*SFXVolume# ElseIf CurrStepSFX=3 - If Sprint = 1.0 Then + If Sprint = 2.5 Then PlayerSoundVolume = Max(4.0,PlayerSoundVolume) tempchn% = PlaySound_Strict(StepSFX(0, 0, Rand(0, 7))) - ChannelVolume tempchn, (1.0-(Crouch*0.6))*SFXVolume# Else PlayerSoundVolume = Max(2.5-(Crouch*0.6),PlayerSoundVolume) tempchn% = PlaySound_Strict(StepSFX(0, 1, Rand(0, 7))) - ChannelVolume tempchn, (1.0-(Crouch*0.6))*SFXVolume# End If EndIf - + If tempchn <> 0 Then ChannelVolume tempchn, (1.0-(Crouch*0.6))*SFXVolume# EndIf EndIf Else ;noclip on @@ -4395,7 +4394,7 @@ Function MouseLook() Local up# = (Sin(Shake) / (20.0+CrouchState*20.0))*0.6;, side# = Cos(Shake / 2.0) / 35.0 Local roll# = Max(Min(Sin(Shake/2)*2.5*Min(Injuries+0.25,3.0),8.0),-8.0) - ;käännetään kameraa sivulle jos pelaaja on vammautunut + ;käännetään kameraa sivulle jos pelaaja on vammautunut ;RotateEntity Collider, EntityPitch(Collider), EntityYaw(Collider), Max(Min(up*30*Injuries,50),-50) PositionEntity Camera, EntityX(Collider), EntityY(Collider), EntityZ(Collider) RotateEntity Camera, 0, EntityYaw(Collider), roll*0.5 @@ -4472,7 +4471,7 @@ Function MouseLook() EndIf - ;pölyhiukkasia + ;pölyhiukkasia If ParticleAmount=2 If Rand(35) = 1 Then Local pvt% = CreatePivot() @@ -4569,10 +4568,10 @@ Function MouseLook() SCP1025state[i]=SCP1025state[i]+FPSfactor*0.0005 EndIf If SCP1025state[i]>20.0 Then - If SCP1025state[i]-FPSfactor<=20.0 Then Msg="The pain in your stomach is becoming unbearable." + If SCP1025state[i]-FPSfactor<=20.0 Then Msg="The pain in your stomach is becoming unbearable." : MsgTimer = 70*4 Stamina = Stamina - FPSfactor * 0.3 ElseIf SCP1025state[i]>10.0 - If SCP1025state[i]-FPSfactor<=10.0 Then Msg="Your stomach is aching." + If SCP1025state[i]-FPSfactor<=10.0 Then Msg="Your stomach is aching." : MsgTimer = 70*4 EndIf Case 4 ;asthma If Stamina < 35 Then @@ -4944,7 +4943,7 @@ Function DrawGUI() If SelectedDoor\Code = Str(AccessCode) Then GiveAchievement(AchvMaynard) - ElseIf SelectedDoor\Code = "7816" + ElseIf SelectedDoor\Code = Str(HARPCODE) GiveAchievement(AchvHarp) EndIf @@ -5066,7 +5065,7 @@ Function DrawGUI() spacing% = 35 x = GraphicWidth / 2 - (width * MaxItemAmount /2 + spacing * (MaxItemAmount / 2 - 1)) / 2 - y = GraphicHeight / 2 - (height * OtherSize /5 + spacing * (OtherSize / 5 - 1)) / 2;height + y = GraphicHeight / 2 - (height * OtherSize /5 + height * (OtherSize / 5 - 1)) / 2;height ItemAmount = 0 For n% = 0 To OtherSize - 1 @@ -5094,6 +5093,9 @@ Function DrawGUI() If OtherOpen\SecondInv[n] <> Null And SelectedItem <> OtherOpen\SecondInv[n] Then ;drawimage(OtherOpen\SecondInv[n].InvIMG, x + width / 2 - 32, y + height / 2 - 32) If isMouseOn Then + AASetFont Font1 + Color 0,0,0 + AAText(x + width / 2 + 1, y + height + spacing - 15 + 1, OtherOpen\SecondInv[n]\itemtemplate\name, True) Color 255, 255, 255 AAText(x + width / 2, y + height + spacing - 15, OtherOpen\SecondInv[n]\itemtemplate\name, True) If SelectedItem = Null Then @@ -5119,7 +5121,10 @@ Function DrawGUI() Else If isMouseOn And MouseHit1 Then For z% = 0 To OtherSize - 1 - If OtherOpen\SecondInv[z] = SelectedItem Then OtherOpen\SecondInv[z] = Null + If OtherOpen\SecondInv[z] = SelectedItem Then + OtherOpen\SecondInv[z] = Null + Exit + EndIf Next OtherOpen\SecondInv[n] = SelectedItem EndIf @@ -5173,7 +5178,10 @@ Function DrawGUI() SelectedItem\Picked = False For z% = 0 To OtherSize - 1 - If OtherOpen\SecondInv[z] = SelectedItem Then OtherOpen\SecondInv[z] = Null + If OtherOpen\SecondInv[z] = SelectedItem Then + OtherOpen\SecondInv[z] = Null + Exit + EndIf Next isEmpty=True @@ -5217,7 +5225,10 @@ Function DrawGUI() If PrevOtherOpen\SecondInv[MouseSlot] = Null Then For z% = 0 To OtherSize - 1 - If PrevOtherOpen\SecondInv[z] = SelectedItem Then PrevOtherOpen\SecondInv[z] = Null + If PrevOtherOpen\SecondInv[z] = SelectedItem Then + PrevOtherOpen\SecondInv[z] = Null + Exit + EndIf Next PrevOtherOpen\SecondInv[MouseSlot] = SelectedItem SelectedItem = Null @@ -5265,7 +5276,7 @@ Function DrawGUI() spacing% = 35 x = GraphicWidth / 2 - (width * MaxItemAmount /2 + spacing * (MaxItemAmount / 2 - 1)) / 2 - y = GraphicHeight / 2 - height + y = GraphicHeight / 2 - (height * MaxItemAmount /5 + height * (MaxItemAmount / 5 - 1)) / 2 ItemAmount = 0 For n% = 0 To MaxItemAmount - 1 @@ -5369,7 +5380,10 @@ Function DrawGUI() Else If isMouseOn And MouseHit1 Then For z% = 0 To MaxItemAmount - 1 - If Inventory(z) = SelectedItem Then Inventory(z) = Null + If Inventory(z) = SelectedItem Then + Inventory(z) = Null + Exit + EndIf Next Inventory(n) = SelectedItem End If @@ -5415,7 +5429,10 @@ Function DrawGUI() Else If Inventory(MouseSlot) = Null Then For z% = 0 To MaxItemAmount - 1 - If Inventory(z) = SelectedItem Then Inventory(z) = Null + If Inventory(z) = SelectedItem Then + Inventory(z) = Null + Exit + EndIf Next Inventory(MouseSlot) = SelectedItem SelectedItem = Null @@ -5441,6 +5458,7 @@ Function DrawGUI() If Inventory(ri) = SelectedItem Then Inventory(ri) = Null PlaySound_Strict(PickSFX(SelectedItem\itemtemplate\sound)) + Exit EndIf Next added = SelectedItem @@ -5485,6 +5503,7 @@ Function DrawGUI() If Inventory(ri) = SelectedItem Then Inventory(ri) = Null PlaySound_Strict(PickSFX(SelectedItem\itemtemplate\sound)) + Exit EndIf Next added = SelectedItem @@ -5693,7 +5712,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 " @@ -5706,7 +5724,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 @@ -5944,6 +5961,7 @@ Function DrawGUI() SelectedItem\itemtemplate\img = LoadImage_Strict("GFX\items\bn.it") SetBuffer ImageBuffer(SelectedItem\itemtemplate\img) Color 0,0,0 + AASetFont Font1 AAText 277, 469, AccessCode, True, True Color 255,255,255 SetBuffer BackBuffer() @@ -5997,22 +6015,22 @@ Function DrawGUI() Case "cup" ;[Block] If CanUseItem(False,False,True) - SelectedItem\name = Trim(Lower(SelectedItem\name)) - If Left(SelectedItem\name, Min(6,Len(SelectedItem\name))) = "cup of" Then - SelectedItem\name = Right(SelectedItem\name, Len(SelectedItem\name)-7) - ElseIf Left(SelectedItem\name, Min(8,Len(SelectedItem\name))) = "a cup of" - SelectedItem\name = Right(SelectedItem\name, Len(SelectedItem\name)-9) + strtemp = Trim(Lower(SelectedItem\name)) + If Left(strtemp, 6) = "cup of" Then + strtemp = Right(strtemp, Len(strtemp)-7) + ElseIf Left(strtemp, 8) = "a cup of" + strtemp = Right(strtemp, Len(strtemp)-9) EndIf - ;the state of refined items is more than 1.0 (fine setting increases it by 1, very fine doubles it) - x2 = (SelectedItem\state+1.0) - Local iniStr$ = "DATA\SCP-294.ini" - Local loc% = GetINISectionLocation(iniStr, SelectedItem\name) + Local loc% = GetINISectionLocation(iniStr, strtemp) ;Stop + strtemp = GetINIString2(iniStr, loc, "sound") + If strtemp <> "" Then PlaySound_Strict LoadTempSound(strtemp) + strtemp = GetINIString2(iniStr, loc, "message") If strtemp <> "" Then Msg = strtemp : MsgTimer = 70*6 @@ -6020,24 +6038,42 @@ Function DrawGUI() DeathMSG = GetINIString2(iniStr, loc, "deathmessage") If GetINIInt2(iniStr, loc, "lethal") Then Kill() EndIf - BlurTimer = GetINIInt2(iniStr, loc, "blur")*70;*temp - If VomitTimer = 0 Then VomitTimer = GetINIInt2(iniStr, loc, "vomit") - CameraShakeTimer = GetINIString2(iniStr, loc, "camerashake") - Injuries = Max(Injuries + GetINIInt2(iniStr, loc, "damage"),0);*temp - Bloodloss = Max(Bloodloss + GetINIInt2(iniStr, loc, "blood loss"),0);*temp - strtemp = GetINIString2(iniStr, loc, "sound") - If strtemp<>"" Then - PlaySound_Strict LoadTempSound(strtemp) + + BlurTimer = Max(BlurTimer + GetINIInt2(iniStr, loc, "blur")*70, 0);*temp + CameraShakeTimer = Max(CameraShakeTimer + GetINIString2(iniStr, loc, "camerashake"), 0) + + temp = GetINIInt2(iniStr, loc, "vomit")*70 + If temp > 0 Then + If VomitTimer = 0 Then + VomitTimer = temp + Else + VomitTimer = Min(VomitTimer, temp) + EndIf + EndIf + + temp = GetINIInt2(iniStr, loc, "deathtimer")*70 + If temp > 0 Then + If DeathTimer = 0 Then + DeathTimer = temp + Else + DeathTimer = Min(DeathTimer, temp) + EndIf EndIf - If GetINIInt2(iniStr, loc, "stomachache") Then SCP1025state[3]=1 - DeathTimer=GetINIInt2(iniStr, loc, "deathtimer")*70 + Injuries = Max(Injuries + GetINIInt2(iniStr, loc, "damage"), 0);*temp + Bloodloss = Max(Bloodloss + GetINIInt2(iniStr, loc, "blood loss"), 0);*temp - BlinkEffect = Float(GetINIString2(iniStr, loc, "blink effect", 1.0))*x2 - BlinkEffectTimer = Float(GetINIString2(iniStr, loc, "blink effect timer", 1.0))*x2 + If GetINIInt2(iniStr, loc, "stomachache") Then SCP1025state[3]=1 - StaminaEffect = Float(GetINIString2(iniStr, loc, "stamina effect", 1.0))*x2 - StaminaEffectTimer = Float(GetINIString2(iniStr, loc, "stamina effect timer", 1.0))*x2 + ;the state of refined drinks is more than 1.0 (fine setting increases it by 1, very fine doubles it) + strtemp = GetINIString2(iniStr, loc, "blink effect") + If strtemp <> "" Then BlinkEffect = Float(strtemp)^SelectedItem\state + strtemp = GetINIString2(iniStr, loc, "blink effect timer") + If strtemp <> "" Then BlinkEffectTimer = Float(strtemp)*SelectedItem\state + strtemp = GetINIString2(iniStr, loc, "stamina effect") + If strtemp <> "" Then StaminaEffect = Float(strtemp)^SelectedItem\state + strtemp = GetINIString2(iniStr, loc, "stamina effect timer") + If strtemp <> "" Then StaminaEffectTimer = Float(strtemp)*SelectedItem\state strtemp = GetINIString2(iniStr, loc, "refusemessage") If strtemp <> "" Then @@ -6191,7 +6227,7 @@ Function DrawGUI() DebugLog UserTrackName$(RadioState(0)) EndIf EndIf - Case 1 ;hälytyskanava + Case 1 ;hälytyskanava DebugLog RadioState(1) ResumeChannel(RadioCHN(1)) @@ -6407,7 +6443,7 @@ Function DrawGUI() If RadioCHN(Int(SelectedItem\state2)) <> 0 Then PauseChannel(RadioCHN(Int(SelectedItem\state2))) EndIf SelectedItem\state2 = i-2 - ;jos nykyistä kanavaa ollaan soitettu, laitetaan jatketaan toistoa samasta kohdasta + ;jos nykyistä kanavaa ollaan soitettu, laitetaan jatketaan toistoa samasta kohdasta If RadioCHN(SelectedItem\state2)<>0 Then ResumeChannel(RadioCHN(SelectedItem\state2)) EndIf Next @@ -7026,15 +7062,12 @@ Function DrawGUI() Default ;[Block] ;check if the item is an inventory-type object - If SelectedItem\invSlots>0 Then - DoubleClick = 0 - MouseHit1 = 0 - MouseDown1 = 0 - LastMouseHit1 = 0 - OtherOpen = SelectedItem - SelectedItem = Null - EndIf - + DoubleClick = 0 + MouseHit1 = 0 + MouseDown1 = 0 + LastMouseHit1 = 0 + If SelectedItem\invSlots>0 Then OtherOpen = SelectedItem + SelectedItem = Null ;[End Block] End Select @@ -7048,8 +7081,8 @@ Function DrawGUI() If IN2$ = "paper" Or IN2$ = "badge" Or IN2$ = "oldpaper" Or IN2$ = "ticket" Then If a_it\itemtemplate\img<>0 If a_it\itemtemplate\img <> SelectedItem\itemtemplate\img - FreeImage(a_it\itemtemplate\img) - a_it\itemtemplate\img = 0 + FreeImage(a_it\itemtemplate\img) : a_it\itemtemplate\img = 0 + Exit EndIf EndIf EndIf @@ -7536,6 +7569,9 @@ Function DrawMenu() Framelimit% = 19+(CurrFrameLimit*100.0) Color 255,255,0 AAText(x + 5 * MenuScale, y + 25 * MenuScale, Framelimit%+" FPS") + If MouseOn(x+150*MenuScale,y+30*MenuScale,100*MenuScale+14,20) + DrawOptionsTooltip(tx,ty,tw,th,"framelimit",Framelimit) + EndIf Else CurrFrameLimit# = 0.0 Framelimit = 0 @@ -7543,9 +7579,6 @@ Function DrawMenu() If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) DrawOptionsTooltip(tx,ty,tw,th,"framelimit",Framelimit) EndIf - If MouseOn(x+150*MenuScale,y+30*MenuScale,100*MenuScale+14,20) - DrawOptionsTooltip(tx,ty,tw,th,"framelimit",Framelimit) - EndIf y = y + 80*MenuScale @@ -8389,8 +8422,9 @@ Function InitNewGame() AccessCode = 0 For i = 0 To 3 - AccessCode = AccessCode + Rand(1,9)*(10^i) - Next + AccessCode = AccessCode + (Rand(1,9)*(10^i)) + Next + If AccessCode = HARPCODE Then AccessCode = AccessCode + 1 If SelectedMap = "" Then CreateMap() @@ -8431,7 +8465,11 @@ Function InitNewGame() For r.Rooms = Each Rooms For i = 0 To MaxRoomLights - If r\Lights[i]<>0 Then EntityParent(r\Lights[i],0) + If r\Lights[i]<>0 Then + EntityParent(r\Lights[i],0) + Else + Exit + EndIf Next If (Not r\RoomTemplate\DisableDecals) Then @@ -8486,6 +8524,11 @@ Function InitNewGame() Delete tw Next + Local ts.TempScreens + For ts.TempScreens = Each TempScreens + Delete ts + Next + TurnEntity(Collider, 0, Rand(160, 200), 0) ResetEntity Collider @@ -8581,6 +8624,16 @@ Function InitLoadGame() If rt\obj <> 0 Then FreeEntity(rt\obj) : rt\obj = 0 Next + Local tw.TempWayPoints + For tw.TempWayPoints = Each TempWayPoints + Delete tw + Next + + Local ts.TempScreens + For ts.TempScreens = Each TempScreens + Delete ts + Next + DropSpeed = 0.0 For e.Events = Each Events @@ -8589,13 +8642,8 @@ Function InitLoadGame() If e\EventState = 2 ;[Block] DrawLoading(91) - e\room\Objects[0] = CreatePlane() - Local planetex% = LoadTexture_Strict("GFX\map\dimension1499\grit3.jpg") - EntityTexture e\room\Objects[0],planetex% - FreeTexture planetex% - PositionEntity e\room\Objects[0],0,EntityY(e\room\obj),0 - EntityType e\room\Objects[0],HIT_MAP - ;EntityParent e\room\Objects[0],e\room\obj + e\room\Objects[0] = LoadMesh_Strict("GFX\map\dimension1499\1499plane.b3d") + HideEntity(e\room\Objects[0]) DrawLoading(92) NTF_1499Sky = sky_CreateSky("GFX\map\sky\1499sky") DrawLoading(93) @@ -8610,7 +8658,8 @@ Function InitLoadGame() z# = EntityZ(e\room\obj) Local ch.Chunk For i = -2 To 2 Step 2 - ch = CreateChunk(-1,x#*(i*2.5),EntityY(e\room\obj),z#) + ch = CreateChunk(-1,x#*(i*2.5),EntityY(e\room\obj),z#,True) + ch = CreateChunk(-1,x#*(i*2.5),EntityY(e\room\obj),z#-40,True) Next DrawLoading(98) UpdateChunks(e\room,15,False) @@ -9332,7 +9381,7 @@ End Function ;--------------------------------------- random ------------------------------------------------------- Function f2s$(n#, count%) - Return Left(n, Len(Int(n))+count+1) + Return Left(n, Len(Int(Str(n)))+count+1) End Function Function AnimateNPC(n.NPCs, start#, quit#, speed#, loop=True) @@ -9969,25 +10018,17 @@ Function Use914(item.Items, setting$, x#, y#, z#) d.Decals = CreateDecal(0, x, 8 * RoomScale + 0.010, z, 90, Rand(360), 0) d\Size = 0.2 : EntityAlpha(d\obj, 0.8) : ScaleSprite(d\obj, d\Size, d\Size) Case "1:1" - it2 = CreateItem("cup", "cup", x,y,z) + it2 = CreateItem("cup", "cup", x,y,z, 255-item\r,255-item\g,255-item\b,item\a) it2\name = item\name - it2\r = 255-item\r - it2\g = 255-item\g - it2\b = 255-item\b + it2\state = item\state Case "fine" - it2 = CreateItem("cup", "cup", x,y,z) + it2 = CreateItem("cup", "cup", x,y,z, Min(item\r*Rnd(0.9,1.1),255),Min(item\g*Rnd(0.9,1.1),255),Min(item\b*Rnd(0.9,1.1),255),item\a) it2\name = item\name - it2\state = 1.0 - it2\r = Min(item\r*Rnd(0.9,1.1),255) - it2\g = Min(item\g*Rnd(0.9,1.1),255) - it2\b = Min(item\b*Rnd(0.9,1.1),255) + it2\state = item\state+1.0 Case "very fine" - it2 = CreateItem("cup", "cup", x,y,z) + it2 = CreateItem("cup", "cup", x,y,z, Min(item\r*Rnd(0.5,1.5),255),Min(item\g*Rnd(0.5,1.5),255),Min(item\b*Rnd(0.5,1.5),255),item\a) it2\name = item\name - it2\state = Max(it2\state*2.0,2.0) - it2\r = Min(item\r*Rnd(0.5,1.5),255) - it2\g = Min(item\g*Rnd(0.5,1.5),255) - it2\b = Min(item\b*Rnd(0.5,1.5),255) + it2\state = item\state*2 If Rand(5)=1 Then ExplosionTimer = 135 EndIf @@ -10042,101 +10083,101 @@ Function Use294() temp = True If PlayerRoom\SoundCHN<>0 Then temp = False - AAText x+907, y+185, Input294, True,True + AAText x+905, y+185, Right(Input294,13), True,True If temp Then If MouseHit1 Then xtemp = Floor((ScaledMouseX()-x-228) / 35.5) ytemp = Floor((ScaledMouseY()-y-342) / 36.5) - If ytemp => 0 And ytemp < 5 Then - If xtemp => 0 And xtemp < 10 Then PlaySound_Strict ButtonSFX - EndIf - - strtemp = "" - temp = False - Select ytemp - Case 0 - strtemp = (xtemp + 1) Mod 10 - Case 1 - Select xtemp - Case 0 - strtemp = "Q" - Case 1 - strtemp = "W" - Case 2 - strtemp = "E" - Case 3 - strtemp = "R" - Case 4 - strtemp = "T" - Case 5 - strtemp = "Y" - Case 6 - strtemp = "U" - Case 7 - strtemp = "I" - Case 8 - strtemp = "O" - Case 9 - strtemp = "P" - End Select - Case 2 - Select xtemp - Case 0 - strtemp = "A" - Case 1 - strtemp = "S" - Case 2 - strtemp = "D" - Case 3 - strtemp = "F" - Case 4 - strtemp = "G" - Case 5 - strtemp = "H" - Case 6 - strtemp = "J" - Case 7 - strtemp = "K" - Case 8 - strtemp = "L" - Case 9 ;dispense - temp = True - End Select - Case 3 - Select xtemp + If ytemp => 0 And ytemp < 5 Then + If xtemp => 0 And xtemp < 10 Then + PlaySound_Strict ButtonSFX + + strtemp = "" + + Select ytemp Case 0 - strtemp = "Z" + strtemp = (xtemp + 1) Mod 10 Case 1 - strtemp = "X" + Select xtemp + Case 0 + strtemp = "Q" + Case 1 + strtemp = "W" + Case 2 + strtemp = "E" + Case 3 + strtemp = "R" + Case 4 + strtemp = "T" + Case 5 + strtemp = "Y" + Case 6 + strtemp = "U" + Case 7 + strtemp = "I" + Case 8 + strtemp = "O" + Case 9 + strtemp = "P" + End Select Case 2 - strtemp = "C" + Select xtemp + Case 0 + strtemp = "A" + Case 1 + strtemp = "S" + Case 2 + strtemp = "D" + Case 3 + strtemp = "F" + Case 4 + strtemp = "G" + Case 5 + strtemp = "H" + Case 6 + strtemp = "J" + Case 7 + strtemp = "K" + Case 8 + strtemp = "L" + Case 9 ;dispense + temp = True + End Select Case 3 - strtemp = "V" + Select xtemp + Case 0 + strtemp = "Z" + Case 1 + strtemp = "X" + Case 2 + strtemp = "C" + Case 3 + strtemp = "V" + Case 4 + strtemp = "B" + Case 5 + strtemp = "N" + Case 6 + strtemp = "M" + Case 7 + strtemp = "-" + Case 8 + strtemp = " " + Case 9 + Input294 = Left(Input294, Max(Len(Input294)-1,0)) + End Select Case 4 - strtemp = "B" - Case 5 - strtemp = "N" - Case 6 - strtemp = "M" - Case 7 - strtemp = "-" - Case 8 strtemp = " " - Case 9 - Input294 = Left(Input294, Max(Len(Input294)-1,0)) End Select - Case 4 - strtemp = " " - End Select + EndIf + EndIf Input294 = Input294 + strtemp - Input294 = Left(Input294, Min(Len(Input294),15)) - If temp And Input294<>"" Then ;dispense Input294 = Trim(Lower(Input294)) If Left(Input294, Min(7,Len(Input294))) = "cup of " Then @@ -10320,7 +10361,7 @@ Function UpdateMTF%() Local r.Rooms, n.NPCs Local dist#, i% - ;mtf ei vielä spawnannut, spawnataan jos pelaaja menee tarpeeksi lähelle gate b:tä + ;mtf ei vielä spawnannut, spawnataan jos pelaaja menee tarpeeksi lähelle gate b:tä If MTFtimer = 0 Then If Rand(30)=1 And PlayerRoom\RoomTemplate\Name$ <> "dimension1499" Then @@ -10636,11 +10677,11 @@ Function CircleToLineSegIsect% (cx#, cy#, r#, l1x#, l1y#, l2x#, l2y#) ;Palauttaa: ; True (1) kun: - ; Ympyrä [keskipiste = (cx, cy): säde = r] + ; Ympyrä [keskipiste = (cx, cy): säde = r] ; leikkaa janan, joka kulkee pisteiden (l1x, l1y) & (l2x, l2y) kaitta ; False (0) muulloin - ;Ympyrän keskipisteen ja (ainakin toisen) janan päätepisteen etäisyys < r + ;Ympyrän keskipisteen ja (ainakin toisen) janan päätepisteen etäisyys < r ;-> leikkaus If Distance(cx, cy, l1x, l1y) <= r Then Return True @@ -10650,7 +10691,7 @@ Function CircleToLineSegIsect% (cx#, cy#, r#, l1x#, l1y#, l2x#, l2y#) Return True EndIf - ;Vektorit (janan vektori ja vektorit janan päätepisteistä ympyrän keskipisteeseen) + ;Vektorit (janan vektori ja vektorit janan päätepisteistä ympyrän keskipisteeseen) Local SegVecX# = l2x - l1x Local SegVecY# = l2y - l1y @@ -10673,21 +10714,21 @@ Function CircleToLineSegIsect% (cx#, cy#, r#, l1x#, l1y#, l2x#, l2y#) Return False EndIf - ;Janan päätepisteiden kautta kulkevan suoran ;yhtälö; (ax + by + c = 0) + ;Janan päätepisteiden kautta kulkevan suoran ;yhtälö; (ax + by + c = 0) Local a# = (l2y - l1y) / (l2x - l1x) Local b# = -1 Local c# = -(l2y - l1y) / (l2x - l1x) * l1x + l1y - ;Ympyrän keskipisteen etäisyys suorasta + ;Ympyrän keskipisteen etäisyys suorasta Local d# = Abs(a * cx + b * cy + c) / Sqr(a * a + b * b) - ;Ympyrä on liian kaukana + ;Ympyrä on liian kaukana ;-> ei leikkausta If d > r Then Return False ;Local kateetin_pituus# = Cos(angle) * hyp - ;Jos päästään tänne saakka, ympyrä ja jana leikkaavat (tai ovat sisäkkäin) + ;Jos päästään tänne saakka, ympyrä ja jana leikkaavat (tai ovat sisäkkäin) Return True End Function @@ -10875,6 +10916,7 @@ Function UpdateINIFile$(filename$) For k.INIFile = Each INIFile If k\name = Lower(filename) Then file = k + Exit EndIf Next @@ -10902,6 +10944,7 @@ Function GetINIString$(file$, section$, parameter$, defaultvalue$="") For k.INIFile = Each INIFile If k\name = Lower(file) Then lfile = k + Exit EndIf Next @@ -11007,12 +11050,13 @@ Function GetINISectionLocation%(file$, section$) If Left(strtemp,1) = "[" Then strtemp$ = Lower(strtemp) Temp = Instr(strtemp, section) - If Temp>0 Then - If Mid(strtemp, Temp-1, 1)="[" Or Mid(strtemp, Temp-1, 1)="|" Then + While Temp>0 + If (Mid(strtemp, Temp-1, 1)="[" Or Mid(strtemp, Temp-1, 1)="|") And (Mid(strtemp, Temp+Len(section), 1)="]" Or Mid(strtemp, Temp+Len(section), 1)="|") Then CloseFile f Return n EndIf - EndIf + Temp = Instr(strtemp, section, Temp+Len(section)+1) + Wend EndIf Wend @@ -11808,8 +11852,8 @@ Function UpdateStreamSounds() EndIf If e\SoundCHN2<>0 And e\SoundCHN2_isStream Then StopStream_Strict(e\SoundCHN2) - e\SoundCHN = 0 - e\SoundCHN_isStream = 0 + e\SoundCHN2 = 0 + e\SoundCHN2_isStream = 0 EndIf Next EndIf @@ -11966,12 +12010,14 @@ Function CanUseItem(canUseWithHazmat%, canUseWithGasMask%, canUseWithEyewear%) Msg = "You can't use that item while wearing a hazmat suit." MsgTimer = 70*5 Return False - Else If (canUseWithGasMask = False And (WearingGasMask Or Wearing1499)) + ElseIf (canUseWithGasMask = False And (WearingGasMask Or Wearing1499)) Msg = "You can't use that item while wearing a gas mask." MsgTimer = 70*5 Return False - Else If (canUseWithEyewear = False And (WearingNightVision)) + ElseIf (canUseWithEyewear = False And (WearingNightVision)) Msg = "You can't use that item while wearing headgear." + MsgTimer = 70*5 + Return False EndIf Return True @@ -12070,18 +12116,8 @@ End Function + ;~IDEal Editor Parameters: -;~F#39#D8#177#17D#18D#241#2EC#2F5#315#329#32E#334#33A#340#346#34B#369#37F#394#39A -;~F#3A0#3A7#3AE#3BB#3C1#3C7#3CD#3D4#3E3#3EC#3F8#40A#423#43F#444#451#463#47E#485#48B -;~F#499#4AC#4B5#4BE#4E4#4F6#50D#519#525#538#53E#544#548#54E#553#572#581#590#596#5A5 -;~F#600#6A3#716#73A#7DC#7E9#8BC#959#972#980#9B2#A70#A7F#AB7#AD1#ADA#BB9#CFB#D0C#D43 -;~F#D6B#D7A#DA2#DCC#DE5#DF8#E28#E40#EF3#EFC#F13#F71#F9E#10E7#11D4#1365#14E9#1542#1571#158C -;~F#15A3#15B6#15C9#15DC#15EB#1607#160B#160F#1618#1633#1666#16C0#16CB#16D7#16E3#170E#171E#175D#176A#1777 -;~F#178C#18D1#18ED#18FD#190D#191A#1944#196A#1983#1A3C#1A96#1AAC#1AB8#1ACF#1ADA#1AE7#1AF1#1AFF#1B58#1BD2 -;~F#1C2C#1C67#1CB7#1E05#1E11#1ED3#1FAF#203D#20D9#2106#2137#224C#225E#227A#2284#2291#22B5#22F5#2335#2385 -;~F#23BE#23D2#23E7#23EB#240B#2413#243E#26A5#2763#27C2#281A#28C6#28D0#28D6#28E0#28EC#28F7#28FB#2936#293E -;~F#2946#294D#2954#2961#2967#2972#29B1#29C0#29DE#2A0C#2A13#2A26#2A3F#2A6C#2A77#2A7C#2A96#2AA2#2ABD#2B0F -;~F#2B1D#2B25#2B2D#2B59#2B62#2B8B#2B90#2B95#2B9A#2BA3#2BB4#2C59#2C67#2CD2#2CE4#2D03#2D12#2D29#2D4C#2D50 -;~F#2D54#2D82#2DA0#2DAB#2DD9#2DF7#2E42#2E5B#2E6A#2E7A#2E8A#2EC5 -;~B#11DC#1454#1BF2 +;~F#39#D8#DCD#162D#242C#2B2A +;~B#11E0#145E#1C07 ;~C#Blitz3D diff --git a/MapSystem.bb b/MapSystem.bb index b7cc13b6..d4872aff 100644 --- a/MapSystem.bb +++ b/MapSystem.bb @@ -825,21 +825,19 @@ Const branch_die_chance% = 18 Const max_deviation_distance% = 3 Const return_chance% = 27 Const center = 5 ;(gridsize-1) / 2 +Const min_door_pos% = 3, max_door_pos% = 7 Include "Drawportals.bb" Type Forest - Field TileMesh%[6] - Field DetailMesh%[6] - Field TileTexture%[10] + Field TileMesh%[ROOM4] ; 0 is unused + Field DetailMesh%[4] Field grid%[(gridsize*gridsize)+11] Field TileEntities%[(gridsize*gridsize)+1] Field Forest_Pivot% Field Door%[2] Field DetailEntities%[2] - - Field ID% End Type Function move_forward%(dir%,pathx%,pathy%,retval%=0) @@ -876,13 +874,11 @@ End Function Function GenForestGrid(fr.Forest) CatchErrors("Uncaught (GenForestGrid)") - fr\ID=LastForestID+1 - LastForestID=LastForestID+1 Local door1_pos%,door2_pos% Local i%,j% - door1_pos=Rand(3,7) - door2_pos=Rand(3,7) + door1_pos=Rand(min_door_pos,max_door_pos) + door2_pos=Rand(min_door_pos,max_door_pos) ;clear the grid For i=0 To gridsize-1 @@ -960,81 +956,102 @@ Function GenForestGrid(fr.Forest) ;attempt to create new branches Local new_y%,temp_y%,new_x% - Local branch_type%,branch_pos% + Local branch_pos% new_y=-3 ;used for counting off; branches will only be considered once every 4 units so as to avoid potentially too many branches While new_yrightmost Then rightmost=i EndIf Next If branch_pos=0 Then new_x=leftmost-1 Else new_x=rightmost+1 - ;before creating a branch make sure there are no 1's above or below - If (temp_y<>0 And fr\grid[((gridsize-1-temp_y+1)*gridsize)+new_x]=1) Or fr\grid[((gridsize-1-temp_y-1)*gridsize)+new_x]=1 Then - Exit ;break simply to stop creating the branch - EndIf - fr\grid[((gridsize-1-temp_y)*gridsize)+new_x]=branch_type ;make 4s so you don't confuse your branch for a path; will be changed later - If branch_pos=0 Then new_x=leftmost-2 Else new_x=rightmost+2 - fr\grid[((gridsize-1-temp_y)*gridsize)+new_x]=branch_type ;branch out twice to avoid creating an unwanted 2x2 path with the real path - i = 2 - While i=0 And new_x1 And fr\grid[((gridsize-1-temp_y+1)*gridsize)+new_x]<>1 Then + fr\grid[((gridsize-1-temp_y)*gridsize)+new_x]=-1 ;make -1s so you don't confuse your branch for a path; will be changed later + If branch_pos=0 Then + new_x=leftmost-2 Else - temp_y=temp_y+1 + new_x=rightmost+2 EndIf - - ;before creating a branch make sure there are no 1's above or below - n=((gridsize - 1 - temp_y + 1)*gridsize)+new_x - If n < gridsize-1 Then - If temp_y <> 0 And fr\grid[n]=1 Then Exit - EndIf - n=((gridsize - 1 - temp_y - 1)*gridsize)+new_x - If n>0 Then - If fr\grid[n]=1 Then Exit + ;before continuing the branch make sure it won't pass the border + If new_x>=0 And new_x=gridsize Or fr\grid[((gridsize-1-temp_y-1)*gridsize)+new_x]=1 Then Exit + + fr\grid[((gridsize-1-temp_y)*gridsize)+new_x]=-1 ;make -1s so you don't confuse your branch for a path; will be changed later + If temp_y>=gridsize-2 Then Exit + Wend EndIf - - ;If (temp_y <> 0 And fr\grid[((gridsize - 1 - temp_y + 1)*gridsize)+new_x]=1) Or fr\grid[((gridsize - 1 - temp_y - 1)*gridsize)+new_x] = 1 Then - ; Exit - ;EndIf - fr\grid[((gridsize-1-temp_y)*gridsize)+new_x]=branch_type ;make 4s so you don't confuse your branch for a path; will be changed later - If temp_y>=gridsize-2 Then Exit - Wend + EndIf EndIf Wend - ;change branches from 4s to 1s (they were 4s so that they didn't accidently create a 2x2 path unintentionally) - For i=0 To gridsize-1 + If 0 Then + Local x%, y% + Repeat + Cls() + i=gridsize-1 + For x=0 To gridsize-1 + For y=0 To gridsize-1 + If fr\grid[x+(y*gridsize)]=0 Then + Color(50,50,50) + Rect((i*32)*MenuScale,(y*32)*MenuScale,30*MenuScale,30*MenuScale) + Else + Color(255,255,255) + Rect((i*32)*MenuScale,(y*32)*MenuScale,30*MenuScale,30*MenuScale) + EndIf + Next + i=i-1 + Next + + i=gridsize-1 + For x=0 To gridsize-1 + For y=0 To gridsize-1 + If MouseOn((i*32)*MenuScale,(y*32)*MenuScale,32*MenuScale,32*MenuScale) Then + Color(255,0,0) + Else + Color(0,0,0) + EndIf + Text(((i*32)+2)*MenuScale,((y*32)+2)*MenuScale,fr\grid[x+(y*gridsize)]) + Next + i=i-1 + Next + Flip() + If Fullscreen Then DrawImage(CursorIMG,ScaledMouseX(),ScaledMouseY()) + Until (GetKey() <> 0 Or MouseHit(1)) + EndIf + + ;change branches from -1s to 1s + For i=1 To gridsize-2 For j=0 To gridsize-1 If fr\grid[(i*gridsize)+j]=-1 Then fr\grid[(i*gridsize)+j]=1 - ElseIf fr\grid[(i*gridsize)+j]=-2 - fr\grid[(i*gridsize)+j]=1 - ;ElseIf fr\grid[(i*gridsize)+j]=0 - EndIf Next Next @@ -1053,16 +1070,7 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) Local tempf1#,tempf2#,tempf3# Local i% - If fr\Forest_Pivot<>0 Then FreeEntity fr\Forest_Pivot : fr\Forest_Pivot=0 - For i%=0 To 3 - If fr\TileMesh[i]<>0 Then FreeEntity fr\TileMesh[i] : fr\TileMesh[i]=0 - Next - For i%=0 To 4 - If fr\DetailMesh[i]<>0 Then FreeEntity fr\DetailMesh[i] : fr\DetailMesh[i]=0 - Next - For i%=0 To 9 - If fr\TileTexture[i]<>0 Then FreeEntity fr\TileTexture[i] : fr\TileTexture[i]=0 - Next + DestroyForest(fr,False) fr\Forest_Pivot=CreatePivot() PositionEntity fr\Forest_Pivot,x,y,z,True @@ -1071,9 +1079,7 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) Local hmap[ROOM4], mask[ROOM4] Local GroundTexture = LoadTexture_Strict("GFX\map\forest\forestfloor.jpg") - ;TextureBlend GroundTexture, FE_ALPHACURRENT Local PathTexture = LoadTexture_Strict("GFX\map\forest\forestpath.jpg") - ;TextureBlend PathTexture, FE_ALPHACURRENT hmap[ROOM1]=LoadImage_Strict("GFX\map\forest\forest1h.png") mask[ROOM1]=LoadTexture_Strict("GFX\map\forest\forest1h_mask.png",1+2) @@ -1091,33 +1097,27 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) mask[ROOM4]=LoadTexture_Strict("GFX\map\forest\forest4h_mask.png",1+2) For i = ROOM1 To ROOM4 - ;TextureBlend mask[i], FE_ALPHAMODULATE - fr\TileMesh[i]=load_terrain(hmap[i],0.03,GroundTexture,PathTexture,mask[i]) Next ;detail meshes - ;fr\DetailMesh[0]=LoadMesh_strict("GFX\map\forest\detail\860_1_tree1.b3d") - ;fr\DetailMesh[1]=LoadMesh_strict("GFX\map\forest\detail\860_1_tree1_leaves.b3d") - fr\DetailMesh[1]=LoadMesh_Strict("GFX\map\forest\detail\treetest4.b3d");1.b3d) - ;EntityParent fr\DetailMesh[1],fr\DetailMesh[0] - fr\DetailMesh[2]=LoadMesh_Strict("GFX\map\forest\detail\rock.b3d") - fr\DetailMesh[3]=LoadMesh_Strict("GFX\map\forest\detail\rock2.b3d") - fr\DetailMesh[4]=LoadMesh_Strict("GFX\map\forest\detail\treetest5.b3d") - fr\DetailMesh[5]=LoadMesh_Strict("GFX\map\forest\wall.b3d") + fr\DetailMesh[0]=LoadMesh_Strict("GFX\map\forest\detail\treetest4.b3d");1.b3d) + fr\DetailMesh[1]=LoadMesh_Strict("GFX\map\forest\detail\rock.b3d") + fr\DetailMesh[2]=LoadMesh_Strict("GFX\map\forest\detail\treetest5.b3d") + fr\DetailMesh[3]=LoadRMesh("GFX\map\forest\wall.rmesh",Null) For i%=ROOM1 To ROOM4 HideEntity fr\TileMesh[i] Next - For i%=1 To 5 + For i%=0 To 3 HideEntity fr\DetailMesh[i] Next tempf3=MeshWidth(fr\TileMesh[ROOM1]) tempf1=tile_size/tempf3 - For tx%=1 To gridsize-1 - For ty%=1 To gridsize-1 + For tx%=0 To gridsize-1 + For ty%=1 To gridsize-2 If fr\grid[(ty*gridsize)+tx]=1 Then tile_type = 0 @@ -1185,16 +1185,6 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) If tile_type > 0 Then - Local itemPlaced[4] - ;2, 5, 8 - Local it.Items = Null - If (ty Mod 3)=2 And itemPlaced[Floor(ty/3)]=False Then - itemPlaced[Floor(ty/3)]=True - it.Items = CreateItem("Log #"+Int(Floor(ty/3)+1), "paper", 0,0.5,0) - EntityType(it\collider, HIT_ITEM) - EntityParent(it\collider, tile_entity) - EndIf - ;place trees and other details ;only placed on spots where the value of the heightmap is above 100 SetBuffer ImageBuffer(hmap[tile_type]) @@ -1207,12 +1197,12 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) If ColorRed()>Rand(100,260) Then Select Rand(0,7) Case 0,1,2,3,4,5,6 ;create a tree - detail_entity=CopyEntity(fr\DetailMesh[1]) + detail_entity=CopyEntity(fr\DetailMesh[0]) ;EntityType detail_entity,HIT_MAP tempf2=Rnd(0.25,0.4) For i = 0 To 3 - d=CopyEntity(fr\DetailMesh[4]) + d=CopyEntity(fr\DetailMesh[2]) ;ScaleEntity d,tempf2*1.1,tempf2,tempf2*1.1,True RotateEntity d, 0, 90*i+Rnd(-20,20), 0 EntityParent(d,detail_entity) @@ -1238,7 +1228,7 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) RotateEntity detail_entity,0.0,Rnd(360.0),0.0,True Case 6 ;add a stump - detail_entity=CopyEntity(fr\DetailMesh[4]) + detail_entity=CopyEntity(fr\DetailMesh[1]) ;EntityType detail_entity,HIT_MAP tempf2=Rnd(0.1,0.12) ScaleEntity detail_entity,tempf2,tempf2,tempf2,True @@ -1254,11 +1244,28 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) Next SetBuffer BackBuffer() + ScaleEntity tile_entity,tempf1,tempf1,tempf1 + + Local itemPlaced[4] + ;2, 5, 8 + Local it.Items = Null + If (ty Mod 3)=2 And itemPlaced[Floor(ty/3)]=False Then + itemPlaced[Floor(ty/3)]=True + If tile_type=ROOM1 Then + it.Items = CreateItem("Log #"+Int(Floor(ty/3)+1), "paper", 0.4,0.2,0) + ElseIf tile_type=ROOM2C + it.Items = CreateItem("Log #"+Int(Floor(ty/3)+1), "paper", 1.7,0.2,-0.4) + Else + it.Items = CreateItem("Log #"+Int(Floor(ty/3)+1), "paper", 0,0.2,0) + EndIf + EntityType(it\collider, HIT_ITEM) + EntityParent(it\collider, tile_entity) + EndIf + TurnEntity tile_entity, 0, angle, 0 PositionEntity tile_entity,x+(tx*tile_size),y,z+(ty*tile_size),True - ScaleEntity tile_entity,tempf1,tempf1,tempf1 EntityType tile_entity,HIT_MAP EntityFX tile_entity,1 EntityParent tile_entity,fr\Forest_Pivot @@ -1279,21 +1286,21 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) For i = 0 To 1 ty = ((gridsize-1)*i) - For tx = 1 To gridsize-1 + For tx = min_door_pos To max_door_pos If fr\grid[(ty*gridsize)+tx]=3 Then - fr\DetailEntities[i]=CopyEntity(fr\DetailMesh[5]) + fr\DetailEntities[i]=CopyEntity(fr\DetailMesh[3]) ScaleEntity fr\DetailEntities[i],RoomScale,RoomScale,RoomScale fr\Door[i] = CopyEntity(r\Objects[3]) - PositionEntity fr\Door[i],72*RoomScale,32.0*RoomScale,0,True + PositionEntity fr\Door[i],68*RoomScale,32.0*RoomScale,0,True RotateEntity fr\Door[i], 0,180,0 - ScaleEntity fr\Door[i],48*RoomScale,45*RoomScale,48*RoomScale,True + ScaleEntity fr\Door[i],46*RoomScale,44*RoomScale,46*RoomScale,True EntityParent fr\Door[i],fr\DetailEntities[i] ;SetAnimTime fr\Door[i], 0 frame = CopyEntity(r\Objects[2],fr\Door[i]) PositionEntity frame,0,32.0*RoomScale,0,True - ScaleEntity frame,48*RoomScale,45*RoomScale,48*RoomScale,True + ScaleEntity frame,45*RoomScale,44*RoomScale,80*RoomScale,True EntityParent frame,fr\DetailEntities[i] EntityType fr\DetailEntities[i],HIT_MAP @@ -1304,6 +1311,7 @@ Function PlaceForest(fr.Forest,x#,y#,z#,r.Rooms) RotateEntity fr\DetailEntities[i],0,180*i,0 EntityParent fr\DetailEntities[i],fr\Forest_Pivot + Exit EndIf Next Next @@ -1322,16 +1330,7 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) Local tempf1#,tempf2#,tempf3# Local i% - If fr\Forest_Pivot<>0 Then FreeEntity fr\Forest_Pivot : fr\Forest_Pivot=0 - For i%=0 To 3 - If fr\TileMesh[i]<>0 Then FreeEntity fr\TileMesh[i] : fr\TileMesh[i]=0 - Next - For i%=0 To 4 - If fr\DetailMesh[i]<>0 Then FreeEntity fr\DetailMesh[i] : fr\DetailMesh[i]=0 - Next - For i%=0 To 9 - If fr\TileTexture[i]<>0 Then FreeEntity fr\TileTexture[i] : fr\TileTexture[i]=0 - Next + DestroyForest(fr,False) fr\Forest_Pivot=CreatePivot() PositionEntity fr\Forest_Pivot,x,y,z,True @@ -1340,9 +1339,7 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) Local hmap[ROOM4], mask[ROOM4] Local GroundTexture = LoadTexture_Strict("GFX\map\forest\forestfloor.jpg") - ;TextureBlend GroundTexture, FE_ALPHACURRENT Local PathTexture = LoadTexture_Strict("GFX\map\forest\forestpath.jpg") - ;TextureBlend PathTexture, FE_ALPHACURRENT hmap[ROOM1]=LoadImage_Strict("GFX\map\forest\forest1h.png") mask[ROOM1]=LoadTexture_Strict("GFX\map\forest\forest1h_mask.png",1+2) @@ -1360,25 +1357,19 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) mask[ROOM4]=LoadTexture_Strict("GFX\map\forest\forest4h_mask.png",1+2) For i = ROOM1 To ROOM4 - ;TextureBlend mask[i], FE_ALPHAMODULATE - fr\TileMesh[i]=load_terrain(hmap[i],0.03,GroundTexture,PathTexture,mask[i]) Next ;detail meshes - ;fr\DetailMesh[0]=LoadMesh_strict("GFX\map\forest\detail\860_1_tree1.b3d") - ;fr\DetailMesh[1]=LoadMesh_strict("GFX\map\forest\detail\860_1_tree1_leaves.b3d") - fr\DetailMesh[1]=LoadMesh_Strict("GFX\map\forest\detail\treetest4.b3d");1.b3d) - ;EntityParent fr\DetailMesh[1],fr\DetailMesh[0] - fr\DetailMesh[2]=LoadMesh_Strict("GFX\map\forest\detail\rock.b3d") - fr\DetailMesh[3]=LoadMesh_Strict("GFX\map\forest\detail\rock2.b3d") - fr\DetailMesh[4]=LoadMesh_Strict("GFX\map\forest\detail\treetest5.b3d") - fr\DetailMesh[5]=LoadMesh_Strict("GFX\map\forest\wall.b3d") + fr\DetailMesh[0]=LoadMesh_Strict("GFX\map\forest\detail\treetest4.b3d");1.b3d) + fr\DetailMesh[1]=LoadMesh_Strict("GFX\map\forest\detail\rock.b3d") + fr\DetailMesh[2]=LoadMesh_Strict("GFX\map\forest\detail\treetest5.b3d") + fr\DetailMesh[3]=LoadRMesh("GFX\map\forest\wall.rmesh",Null) For i%=ROOM1 To ROOM4 HideEntity fr\TileMesh[i] Next - For i%=1 To 5 + For i%=0 To 3 HideEntity fr\DetailMesh[i] Next @@ -1406,16 +1397,6 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) If tile_type > 0 Then - Local itemPlaced[4] - ;2, 5, 8 - Local it.Items = Null - If (ty Mod 3)=2 And itemPlaced[Floor(ty/3)]=False Then - itemPlaced[Floor(ty/3)]=True - it.Items = CreateItem("Log #"+Int(Floor(ty/3)+1), "paper", 0,0.5,0) - EntityType(it\collider, HIT_ITEM) - EntityParent(it\collider, tile_entity) - EndIf - ;place trees and other details ;only placed on spots where the value of the heightmap is above 100 SetBuffer ImageBuffer(hmap[tile_type]) @@ -1429,12 +1410,12 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) detail_entity = 0 Select Rand(0,7) Case 0,1,2,3,4,5,6 ;create a tree - detail_entity=CopyEntity(fr\DetailMesh[1]) + detail_entity=CopyEntity(fr\DetailMesh[0]) ;EntityType detail_entity,HIT_MAP tempf2=Rnd(0.25,0.4) For i = 0 To 3 - d=CopyEntity(fr\DetailMesh[4]) + d=CopyEntity(fr\DetailMesh[2]) ;ScaleEntity d,tempf2*1.1,tempf2,tempf2*1.1,True RotateEntity d, 0, 90*i+Rnd(-20,20), 0 EntityParent(d,detail_entity) @@ -1460,7 +1441,7 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) RotateEntity detail_entity,0.0,Rnd(360.0),0.0,True Case 6 ;add a stump - detail_entity=CopyEntity(fr\DetailMesh[4]) + detail_entity=CopyEntity(fr\DetailMesh[1]) ;EntityType detail_entity,HIT_MAP tempf2=Rnd(0.1,0.12) ScaleEntity detail_entity,tempf2,tempf2,tempf2,True @@ -1478,13 +1459,30 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) Next SetBuffer BackBuffer() + ScaleEntity tile_entity,tempf1,tempf1,tempf1 + + Local itemPlaced[4] + ;2, 5, 8 + Local it.Items = Null + If (ty Mod 3)=2 And itemPlaced[Floor(ty/3)]=False Then + itemPlaced[Floor(ty/3)]=True + If tile_type=ROOM1 Then + it.Items = CreateItem("Log #"+Int(Floor(ty/3)+1), "paper", 0.4,0.2,0) + ElseIf tile_type=ROOM2C + it.Items = CreateItem("Log #"+Int(Floor(ty/3)+1), "paper", 1.7,0.2,-0.4) + Else + it.Items = CreateItem("Log #"+Int(Floor(ty/3)+1), "paper", 0,0.2,0) + EndIf + EntityType(it\collider, HIT_ITEM) + EntityParent(it\collider, tile_entity) + EndIf + TurnEntity tile_entity, 0, angle, 0 PositionEntity tile_entity,x+(tx*tile_size),y,z+(ty*tile_size),True DebugLog "tile_entity: "+(x+(tx*tile_size))+"|"+(y)+"|"+(z+(ty*tile_size)) - ScaleEntity tile_entity,tempf1,tempf1,tempf1 EntityType tile_entity,HIT_MAP EntityFX tile_entity,1 EntityParent tile_entity,fr\Forest_Pivot @@ -1500,18 +1498,18 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) If Ceil(fr\grid[(ty*gridsize)+tx]/4.0)=6 Then For i = 0 To 1 If fr\Door[i]=0 Then - fr\DetailEntities[i]=CopyEntity(fr\DetailMesh[5]) + fr\DetailEntities[i]=CopyEntity(fr\DetailMesh[3]) ScaleEntity fr\DetailEntities[i],RoomScale,RoomScale,RoomScale fr\Door[i] = CopyEntity(r\Objects[3]) - PositionEntity fr\Door[i],72*RoomScale,32.0*RoomScale,0,True + PositionEntity fr\Door[i],68*RoomScale,32.0*RoomScale,0,True RotateEntity fr\Door[i], 0,180,0 - ScaleEntity fr\Door[i],48*RoomScale,45*RoomScale,48*RoomScale,True + ScaleEntity fr\Door[i],46*RoomScale,44*RoomScale,46*RoomScale,True EntityParent fr\Door[i],fr\DetailEntities[i] Local frame = CopyEntity(r\Objects[2],fr\Door[i]) PositionEntity frame,0,32.0*RoomScale,0,True - ScaleEntity frame,48*RoomScale,45*RoomScale,48*RoomScale,True + ScaleEntity frame,45*RoomScale,44*RoomScale,80*RoomScale,True EntityParent frame,fr\DetailEntities[i] EntityType fr\DetailEntities[i],HIT_MAP @@ -1537,60 +1535,55 @@ Function PlaceForest_MapCreator(fr.Forest,x#,y#,z#,r.Rooms) CatchErrors("PlaceForest_MapCreator") End Function -Function DestroyForest(fr.Forest) +Function DestroyForest(fr.Forest, nullgrid%=True) CatchErrors("Uncaught (DestroyForest)") Local tx%,ty% For tx% = 0 To gridsize-1 For ty% = 0 To gridsize-1 If fr\TileEntities[tx+(ty*gridsize)]<>0 Then - FreeEntity fr\TileEntities[tx+(ty*gridsize)] - fr\TileEntities[tx+(ty*gridsize)] = 0 - fr\grid[tx+(ty*gridsize)] = 0 + FreeEntity fr\TileEntities[tx+(ty*gridsize)] : fr\TileEntities[tx+(ty*gridsize)] = 0 + If nullgrid Then fr\grid[tx+(ty*gridsize)] = 0 EndIf Next Next - If fr\Door[0]<>0 Then FreeEntity fr\Door[0] : fr\Door[0] = 0 - If fr\Door[1]<>0 Then FreeEntity fr\Door[1] : fr\Door[0] = 1 - If fr\DetailEntities[0]<>0 Then FreeEntity fr\DetailEntities[0] : fr\DetailEntities[0] = 0 - If fr\DetailEntities[1]<>0 Then FreeEntity fr\DetailEntities[1] : fr\DetailEntities[1] = 0 - + For i = 0 To 1 + If fr\Door[i]<>0 Then FreeEntity fr\Door[i] : fr\Door[i] = 0 + If fr\DetailEntities[i]<>0 Then FreeEntity fr\DetailEntities[i] : fr\DetailEntities[i] = 0 + Next If fr\Forest_Pivot<>0 Then FreeEntity fr\Forest_Pivot : fr\Forest_Pivot=0 - For i%=0 To 3 + For i%=ROOM1 To ROOM4 If fr\TileMesh[i]<>0 Then FreeEntity fr\TileMesh[i] : fr\TileMesh[i]=0 Next - For i%=0 To 4 + For i%=0 To 3 If fr\DetailMesh[i]<>0 Then FreeEntity fr\DetailMesh[i] : fr\DetailMesh[i]=0 Next - For i%=0 To 9 - If fr\TileTexture[i]<>0 Then FreeEntity fr\TileTexture[i] : fr\TileTexture[i]=0 - Next CatchErrors("DestroyForest") ;Delete fr End Function -Function UpdateForest(fr.Forest,ent%) +Function UpdateForest(fr.Forest) CatchErrors("Uncaught (UpdateForest)") ;local variables Local tx%,ty% - If Abs(EntityY(ent,True)-EntityY(fr\Forest_Pivot,True))<12.0 Then - For tx% = 0 To gridsize-1 - For ty% = 0 To gridsize-1 - If fr\TileEntities[tx+(ty*gridsize)]<>0 Then - If Abs(EntityX(ent,True)-EntityX(fr\TileEntities[tx+(ty*gridsize)],True))<20.0 Then - If Abs(EntityZ(ent,True)-EntityZ(fr\TileEntities[tx+(ty*gridsize)],True))<20.0 Then - ShowEntity fr\TileEntities[tx+(ty*gridsize)] - Else - HideEntity fr\TileEntities[tx+(ty*gridsize)] - EndIf + + For tx% = 0 To gridsize-1 + For ty% = 0 To gridsize-1 + If fr\TileEntities[tx+(ty*gridsize)]<>0 Then + If Abs(EntityX(Collider,True)-EntityX(fr\TileEntities[tx+(ty*gridsize)],True)) 0 Then StartPoint\parent = Null EndPoint\state = 2 @@ -6690,9 +6743,9 @@ Function UpdateLever(obj, locked=False) EndIf EndIf - If EntityPitch(obj,True) > 75 Then ;p��ll� + If EntityPitch(obj,True) > 75 Then ;p˜˜ll˜ If prevpitch =< 75 Then PlaySound2(LeverSFX, Camera, obj, 1.0) - ElseIf EntityPitch(obj,True) < -75 ;pois p��lt� + ElseIf EntityPitch(obj,True) < -75 ;pois p˜˜lt˜ If prevpitch => -75 Then PlaySound2(LeverSFX, Camera, obj, 1.0) EndIf EndIf @@ -6709,9 +6762,9 @@ Function UpdateLever(obj, locked=False) EndIf - If EntityPitch(obj,True) > 0 Then ;p��ll� + If EntityPitch(obj,True) > 0 Then ;p˜˜ll˜ Return True - Else ;pois p��lt� + Else ;pois p˜˜lt˜ Return False EndIf @@ -7479,7 +7532,7 @@ Function CreateMap() temp = Min(MapTemp(x + 1, y),1) + Min(MapTemp(x - 1, y),1) + Min(MapTemp(x, y + 1),1) + Min(MapTemp(x, y - 1),1) - Select temp ;viereisiss� ruuduissa olevien huoneiden m��r� + Select temp ;viereisiss˜ ruuduissa olevien huoneiden m˜˜r˜ Case 1 If MapRoomID(ROOM1) < MaxRooms And MapName(x,y) = "" Then If MapRoom(ROOM1, MapRoomID(ROOM1)) <> "" Then MapName(x, y) = MapRoom(ROOM1, MapRoomID(ROOM1)) @@ -8064,6 +8117,8 @@ Function UpdateRoomLights(cam%) ;This will make the lightsprites not glitch through the wall when they are rendered by the cameras EntityOrder r\LightSprites2[i],0 EndIf + Else + Exit EndIf Next EndIf @@ -8536,6 +8591,8 @@ Function AddLightCones(room.Rooms) PositionEntity room\LightConeSpark[i],EntityX(room\LightSpritesPivot[i],True),EntityY(room\LightSpritesPivot[i],True)+0.05,EntityZ(room\LightSpritesPivot[i],True),True EntityParent room\LightConeSpark[i],room\LightSpritesPivot[i] EndIf + Else + Exit EndIf Next @@ -8742,10 +8799,6 @@ End Function ;~IDEal Editor Parameters: -;~F#2#A#35#102#111#118#11F#126#13F#147#14F#2F4#304#315#33D#34B#35B#360#36B#413 -;~F#51E#53F#563#57F#58A#5C6#5D6#5FF#63B#643#658#6A7#6B1#136A#13EC#13F8#143D#1448#1459#145E -;~F#146D#1484#1505#150E#15D0#15ED#15F4#15FA#1608#162B#1650#1683#17CA#1803#1818#190C#19E1#19E6#19F6#1CA3 -;~F#1CC2#1CC9#1D2A#1DA6#1DD1#1DF2#1E05#1E1C#1E2F#1E36#1E6A#1E75#1E9D#1EFA#1F06#1F11#1F17#1F21#1F27#1F3D -;~F#1F51#1F6F -;~B#1230 +;~F#2#A#35#102#111#118#11F#126#13F#147#14F#143E#145F +;~B#1231 ;~C#Blitz3D \ No newline at end of file diff --git a/UpdateEvents.bb b/UpdateEvents.bb index f07f1f11..3895cef5 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 @@ -1504,6 +1567,7 @@ Function UpdateEvents() e\room\RoomDoors[1]\locked = True EndIf EndIf + Exit EndIf Next Else @@ -1522,6 +1586,7 @@ Function UpdateEvents() e\room\RoomDoors[1]\locked = True EndIf EndIf + Exit EndIf Next EndIf @@ -1738,6 +1803,7 @@ Function UpdateEvents() If (Inventory(i) <> Null) Then If (WearingNightVision = 1 And Inventory(i)\itemtemplate\tempname = "nvgoggles") Or (WearingNightVision = 2 And Inventory(i)\itemtemplate\tempname = "supernv") Or (WearingNightVision = 3 And Inventory(i)\itemtemplate\tempname = "finenvgoggles") Then Inventory(i)\state2 = 0 + Exit EndIf EndIf Next @@ -2921,7 +2987,7 @@ Function UpdateEvents() HideEntity e\room\Objects[4] EndIf - If Curr106\State < -10 And e\EventState = 0 Then + If Curr106\State <= -10 And e\EventState = 0 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)) < 300.0*RoomScale Then ;play the activation sound @@ -2957,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() @@ -2970,10 +3035,9 @@ Function UpdateEvents() e\room\NPC[0]\State = 3 EndIf - If Curr106\State < -10 Then + 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)) @@ -4585,7 +4649,7 @@ Function UpdateEvents() Select e\EventState Case 2 - i = Rand(MaxItemAmount) + i = Rand(0,MaxItemAmount-1) If Inventory(i)<>Null Then RemoveItem(Inventory(i)) Case 5 Injuries = Injuries + 0.3 @@ -6206,7 +6270,7 @@ Function UpdateEvents() Case "room205" ;[Block] If PlayerRoom = e\room Then - If e\EventState=0 Or e\room\Objects[0]=0 Then + If e\EventState=0 Or e\EventStr <> "loaddone" Then If e\EventStr = "" And QuickLoadPercent = -1 QuickLoadPercent = 0 QuickLoad_CurrEvent = e @@ -6425,7 +6489,7 @@ Function UpdateEvents() ;ShowEntity fr\DetailEntities[0] ;ShowEntity fr\DetailEntities[1] - UpdateForest(fr,Collider) + UpdateForest(fr) If e\EventStr = "" And QuickLoadPercent = -1 QuickLoadPercent = 0 @@ -6452,9 +6516,9 @@ Function UpdateEvents() EndIf If e\room\NPC[0]<>Null - If e\room\NPC[0]\State = 0 Or EntityDistance(Collider, e\room\NPC[0]\Collider)>20.0 Then + If e\room\NPC[0]\State = 0 Or EntityDistance(Collider, e\room\NPC[0]\Collider)>HideDistance Then e\EventState3 = e\EventState3 + (1+CurrSpeed)* FPSfactor - If (e\EventState3 Mod 500) < 10.0 And ((e\EventState3-FPSfactor) Mod 500) > 490.0 Then + If (e\EventState3 Mod 500) < 10.0 And ((e\EventState3-(1+CurrSpeed)*FPSfactor) Mod 500) > 490.0 Then ;If e\EventState3 > 3500 And Rnd(10000) 3000-(500*SelectedDifficulty\aggressiveNPCs) And Rnd(10000+(500*SelectedDifficulty\aggressiveNPCs)) < e\EventState3 e\room\NPC[0]\State=2 @@ -6478,7 +6542,7 @@ Function UpdateEvents() ;EndIf For i = 0 To 1 - If EntityDistance(fr\Door[i], Collider)<0.5 Then + If EntityDistance(fr\Door[i], Collider)<0.8 Then If EntityInView(fr\Door[i], Camera) Then DrawHandIcon = True If MouseHit1 Then @@ -6806,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 @@ -7460,6 +7523,7 @@ Function UpdateEvents() ElseIf EntityDistance(e\room\Objects[i], Camera) > 1.0 GrabbedEntity = 0 End If + Exit End If Next @@ -7828,17 +7892,15 @@ Function UpdateEvents() itemName = "Old Badge" End Select - Local itemExists% = False For it.Items = Each Items If (it\name = itemName) Then - itemExists = True e\EventState3 = 1.0 e\EventState = 0.0 Exit EndIf Next - If ((Not itemExists) And (Not isSlotEmpty)) Exit + If (Not isSlotEmpty) Then Exit Else If isSlotEmpty Then e\EventState3 = 2.0 @@ -8431,6 +8493,7 @@ Function UpdateEvents() Else EntityTexture e\room\Objects[21],e\room\Textures[1],6 EndIf + Exit EndIf Next ;[End Block] @@ -9226,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 @@ -9640,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 @@ -10174,9 +10243,6 @@ End Function ;~IDEal Editor Parameters: -;~F#1#14#29#13B#343#535#545#5B1#630#68D#6B4#6C2#6CC#6D9#8CA#8EB#93F#976#983#9BD -;~F#9CE#9EE#9F7#A01#A10#B0B#B2D#DE2#E29#E3F#E4B#E68#EB9#ED2#FA1#10A3#1123#113C#115B#11C6 -;~F#11D3#11EC#1284#1439#152D#1581#1633#16D4#1796#17A9#187A#18A7#18C4#18EB#191B#1941#1969#19BB#19F8#1A29 -;~F#1A3C#1AFD#1B6A#1B7D#1B8B#1BCF#1BF0#1CDE#1D53#1E50#1ED1#1F1F#1F24#1F73#1F79#213E -;~B#10D3#1DD1 +;~F#A13 +;~B#10D6#1DD5 ;~C#Blitz3D \ No newline at end of file