diff --git a/scenes/world/DynamicMap.tscn b/scenes/world/DynamicMap.tscn index 96eff60..f0d63b5 100644 --- a/scenes/world/DynamicMap.tscn +++ b/scenes/world/DynamicMap.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://bw0tk6ml7gayq"] +[gd_scene load_steps=7 format=3 uid="uid://bc46lc1tdvrio"] [ext_resource type="Script" path="res://src/DynamicMap.gd" id="1_mytgt"] [ext_resource type="Script" path="res://src/TempDebugCamera.gd" id="2_co6fy"] diff --git a/src/DynamicMap.gd b/src/DynamicMap.gd index 09ab282..298fab5 100644 --- a/src/DynamicMap.gd +++ b/src/DynamicMap.gd @@ -3,7 +3,7 @@ extends Node3D func _ready() -> void: #add_child(RMesh.LoadRMesh("GFX\\map\\gatea_opt.rmesh", RoomTemplate.new())) #B3D.Load("GFX\\npcs\\106_2.b3d") - add_child(B3D.Load("GFX\\apache.b3d")) + #add_child(B3D.Load("GFX\\apache.b3d")) #DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN) @@ -11,8 +11,8 @@ func _ready() -> void: #CreateMap() IntroEnabled = true - #LoadRoomTemplates("Data\\rooms.ini") - #CreateMap() + LoadRoomTemplates("Data/rooms.ini") + CreateMap() var IntroEnabled: bool var I_Zone: MapZones = MapZones.new() @@ -21,7 +21,6 @@ var RandomSeed: String = "" var MapWidth = Main.options.get("options").get("map size").to_int() var MapHeight = Main.options.get("options").get("map size").to_int() -const RoomScale = 8.0 / 2048.0 const HideDistance = 15.0 var MapTemp = Utils.Init2DArray(MapWidth + 1, MapHeight + 1, 0) @@ -42,6 +41,3666 @@ func CreateRoomTemplate(meshpath: String): return rt +var doors: Array = [] +var DoorTempID = 0 +func CreateDoor(lvl, x:float, y:float, z:float, angle:float, room:Room, dopen = false, big: int = 0, keycard: int = 0, code="", useCollisionMesh = false): + var parent + #var i: int + if room != null: + parent = room.obj + + var d2:Door + + var d = Door.new() + if big == 1: + d.obj = X.LoadModel("GFX/map/ContDoorLeft.x")#CopyEntity(BigDoorOBJ(0)) + d.obj.scale.x = 55 * Constants.RoomScale + d.obj.scale.y = 55 * Constants.RoomScale + d.obj.scale.z = 55 * Constants.RoomScale + d.obj2 = X.LoadModel("GFX/map/ContDoorRight.x")#CopyEntity(BigDoorOBJ(1)) + d.obj2.scale.x = 55 * Constants.RoomScale + d.obj2.scale.y = 55 * Constants.RoomScale + d.obj2.scale.z = 55 * Constants.RoomScale + + d.frameobj = X.LoadModel("GFX/map/doorcoll.x")#CopyEntity(DoorColl) ;CopyMesh + d.frameobj.scale.x = Constants.RoomScale + d.frameobj.scale.y = Constants.RoomScale + d.frameobj.scale.z = Constants.RoomScale + #EntityType d\frameobj, HIT_MAP + #EntityAlpha d\frameobj, 0.0 + elif big == 2: + d.obj = X.LoadModel("GFX/map/heavydoor1.x")#CopyEntity(HeavyDoorObj(0)) + d.obj.scale.x = Constants.RoomScale + d.obj.scale.y = Constants.RoomScale + d.obj.scale.z = Constants.RoomScale + d.obj2 = X.LoadModel("GFX/map/heavydoor2.x")#CopyEntity(HeavyDoorObj(1)) + d.obj2.scale.x = Constants.RoomScale + d.obj2.scale.y = Constants.RoomScale + d.obj2.scale.z = Constants.RoomScale + + d.frameobj = X.LoadModel("GFX/map/doorframe.x")#CopyEntity(DoorFrameOBJ) + elif big == 3: + print("TODO: ELEVATOR DOOR!") + #for d2 = Each Doors + #If d2 <> d And d2\dir = 3 Then + #d\obj = CopyEntity(d2\obj) + #d\obj2 = CopyEntity(d2\obj2) + #ScaleEntity d\obj, RoomScale, RoomScale, RoomScale + #ScaleEntity d\obj2, RoomScale, RoomScale, RoomScale + #Exit + #EndIf + #Next + #If d\obj=0 Then + #d\obj = LoadMesh_Strict("GFX\map\elevatordoor.b3d") + #d\obj2 = CopyEntity(d\obj) + #ScaleEntity d\obj, RoomScale, RoomScale, RoomScale + #ScaleEntity d\obj2, RoomScale, RoomScale, RoomScale + #EndIf + #d\frameobj = CopyEntity(DoorFrameOBJ) + else: + d.obj = X.LoadModel("GFX/map/door01.x")#CopyEntity(DoorOBJ) + d.obj.scale.x = (204.0 * Constants.RoomScale) / X.MeshWidth(d.obj) + d.obj.scale.y = 312.0 * Constants.RoomScale / X.MeshHeight(d.obj) + d.obj.scale.z = 16.0 * Constants.RoomScale / X.MeshDepth(d.obj) + + d.frameobj = X.LoadModel("GFX/map/doorframe.x")#CopyEntity(DoorFrameOBJ) + d.obj2 = X.LoadModel("GFX/map/door01.x")#CopyEntity(DoorOBJ) + + d.obj2.scale.x = (204.0 * Constants.RoomScale) / X.MeshWidth(d.obj) + d.obj2.scale.y = 312.0 * Constants.RoomScale / X.MeshHeight(d.obj) + d.obj2.scale.z = 16.0 * Constants.RoomScale / X.MeshDepth(d.obj) + #entityType d\obj2, HIT_MAP + + #scaleentity(d\obj, 0.1, 0.1, 0.1) + d.frameobj.position.x = x + d.frameobj.position.y = y + d.frameobj.position.z = z + d.frameobj.scale.x = Constants.RoomScale + d.frameobj.scale.y = Constants.RoomScale + d.frameobj.scale.z = Constants.RoomScale + #EntityPickMode d\frameobj,2 + #EntityType d\obj, HIT_MAP + #EntityType d\obj2, HIT_MAP + + d.ID = DoorTempID + DoorTempID += 1 + + d.KeyCard = keycard + d.Code = code + + d.Level = lvl + d.LevelDest = 66 + + for i in range(0, 2): + if code != "": + d.buttons[i] = X.LoadModel("GFX/map/ButtonCode.x")#CopyEntity(ButtonCodeOBJ) + # TODO: Fullbright this! + #EntityFX(d\buttons[i], 1) + else: + if keycard > 0: + d.buttons[i] = X.LoadModel("GFX/map/ButtonKeycard.x")#CopyEntity(ButtonKeyOBJ) + elif keycard < 0: + d.buttons[i] = X.LoadModel("GFX/map/ButtonScanner.x")#CopyEntity(ButtonScannerOBJ) + else: + d.buttons[i] = X.LoadModel("GFX/map/Button.x")#CopyEntity(ButtonOBJ) + + d.buttons[i].scale.x = 0.03 + d.buttons[i].scale.y = 0.03 + d.buttons[i].scale.z = 0.03 + + if big: + d.buttons[0].position.x = x - 432.0 * Constants.RoomScale + d.buttons[0].position.y = y + 0.7 + d.buttons[0].position.z = z + 192.0 * Constants.RoomScale + d.buttons[1].position.x = x + 432.0 * Constants.RoomScale + d.buttons[1].position.y = y + 0.7 + d.buttons[1].position.z = z - 192.0 * Constants.RoomScale + d.buttons[0].rotation.y = 90 + d.buttons[1].rotation.y = 270 + else: + d.buttons[0].position.x = x + 0.6 + d.buttons[0].position.y = y + 0.7 + d.buttons[0].position.z = z - 0.1 + d.buttons[1].position.x = x - 0.6 + d.buttons[1].position.y = y + 0.7 + d.buttons[1].position.z = z + 0.1 + d.buttons[1].rotation.y = 180 + + d.frameobj.add_child(d.buttons[0]) + d.frameobj.add_child(d.buttons[1]) + #EntityPickMode(d\buttons[0], 2) + #EntityPickMode(d\buttons[1], 2) + + d.obj.position.x = x + d.obj.position.y = y + d.obj.position.z = z + + d.obj.rotation.y = angle + d.frameobj.rotation.y = angle + + if d.obj2 != null: + d.obj2.position.x = x + d.obj2.position.y = y + d.obj2.position.z = z + + if big: + d.obj2.rotation.y = angle + else: + d.obj2.rotation.y = angle + 180 + + parent.add_child(d.obj2) + + parent.add_child(d.frameobj) + parent.add_child(d.obj) + + d.angle = angle + d.open = dopen + + #EntityPickMode(d\obj, 2) + #If d\obj2 <> 0 Then + #EntityPickMode(d\obj2, 2) + #EndIf + + #EntityPickMode d\frameobj,2 + + if d.open and not big and randi_range(1, 8) == 1: + d.AutoClose = true + d.dir = big + d.room = room + + d.MTFClose = true + + # TODO: Collision! + #if useCollisionMesh: + #for d2 in doors + #if d2.ID != d.ID: + #if d2.DoorHitOBJ != null: + #d.DoorHitOBJ = CopyEntity(d2\DoorHitOBJ,d\frameobj) + #EntityAlpha d\DoorHitOBJ,0.0 + #EntityFX d\DoorHitOBJ,1 + #EntityType d\DoorHitOBJ,HIT_MAP + #EntityColor d\DoorHitOBJ,255,0,0 + #HideEntity d\DoorHitOBJ + #break + #EndIf + #EndIf + #Next + #If d\DoorHitOBJ=0 Then + #d\DoorHitOBJ = LoadMesh_Strict("GFX\doorhit.b3d",d\frameobj) + #EntityAlpha d\DoorHitOBJ,0.0 + #EntityFX d\DoorHitOBJ,1 + #EntityType d\DoorHitOBJ,HIT_MAP + #EntityColor d\DoorHitOBJ,255,0,0 + #HideEntity d\DoorHitOBJ + + return d + +func FillRoom(r:Room): + #CatchErrors("Uncaught (FillRoom)") + #Local d.Doors, d2.Doors, sc.SecurityCams, de.Decals, r2.Rooms, sc2.SecurityCams + #Local it.Items, i% + var xtemp = 0.0 + var ytemp = 0.0 + var ztemp = 0.0 + + var t1#, Bump + var rn = r.RoomTemplate.Name + + if rn == "room860": + #[Block] + #the wooden door + r.Objects[2] = B3D.Load("GFX/map/forest/door_frame.b3d") + r.Objects[2].global_position.x = r.x + 184.0 * Constants.RoomScale + r.Objects[2].global_position.y = 0 + r.Objects[2].global_position.z = r.z + r.Objects[2].scale.x = 45.0 * Constants.RoomScale + r.Objects[2].scale.y = 45.0 * Constants.RoomScale + r.Objects[2].scale.z = 80.0 * Constants.RoomScale + r.obj.add_child(r.Objects[2]) + #EntityParent r\Objects[2],r\obj + # + #r\Objects[3] = LoadMesh_Strict("GFX\map\forest\door.b3d") + #PositionEntity r\Objects[3],r\x + 112.0 * RoomScale,0,r\z+0.05,True + #EntityType r\Objects[3], HIT_MAP + # + #ScaleEntity r\Objects[3],46.0*RoomScale,45.0*RoomScale,46.0*RoomScale,True + #EntityParent r\Objects[3],r\obj + # + #r\Objects[4] = CopyEntity(r\Objects[3]) + #PositionEntity r\Objects[4],r\x + 256.0 * RoomScale,0,r\z-0.05,True + #RotateEntity r\Objects[4], 0,180,0 + #ScaleEntity r\Objects[4],46.0*RoomScale,45.0*RoomScale,46.0*RoomScale,True + #EntityParent r\Objects[4],r\obj + # +#; ;DrawPortal stuff +#; Local dp.DrawPortal = CreateDrawPortal(r\x + 184.0 * RoomScale,164.25*RoomScale,r\z,0.0,0.0,0.0,328.5*RoomScale,328.5*RoomScale);,r\x,r\y+5.2,r\z,0.0,0.0,0.0) +#; r\dp=dp +#; EntityParent dp\portal,r\obj +#; +#; CameraClsColor dp\cam,98,133,162 +#; CameraRange dp\cam,RoomScale,8.0 +#; CameraFogRange dp\cam,0.5,8.0 +#; CameraFogColor dp\cam,98,133,162 +#; CameraFogMode dp\cam,1 + # + #;doors to observation booth + #d = CreateDoor(r\zone, r\x + 928.0 * RoomScale,0,r\z + 640.0 * RoomScale,0,r,False,False,False,"ABCD") + #d = CreateDoor(r\zone, r\x + 928.0 * RoomScale,0,r\z - 640.0 * RoomScale,0,r,True,False,False,"ABCD") + #d\AutoClose = False + # + #;doors to the room itself + #d = CreateDoor(r\zone, r\x+416.0*RoomScale,0,r\z - 640.0 * RoomScale,0,r,False,False,1) + #d = CreateDoor(r\zone, r\x+416.0*RoomScale,0,r\z + 640.0 * RoomScale,0,r,False,False,1) + # + #;the forest + #If I_Zone\HasCustomForest = False Then + #Local fr.Forest = New Forest + #r\fr=fr + #GenForestGrid(fr) + #PlaceForest(fr,r\x,r\y+30.0,r\z,r) + #EndIf + #;EntityParent fr\Forest_Pivot,r\obj + # +#; PositionEntity dp\cam,EntityX(fr\Door[0],True),r\y+31.0,EntityZ(fr\Door[0],True),True +#; dp\camyaw=EntityYaw(fr\Door[0],True) +#; RotateEntity dp\cam, 0, dp\camyaw, 0, True +#; MoveEntity dp\cam, 0,0,0.5 +#; +#; ;place the camera at the door +#; For xtemp=0 To -1;gridsize-1 +#; If fr\grid[xtemp+((gridsize-1)*gridsize)]=3 Then +#; PositionEntity dp\cam,r\x+(xtemp*8.0),r\y+30.5,r\z+((gridsize-2)*8.0)+0.2,True +#; ;make the camera point the right way +#; ytemp=CreatePivot(r\obj) +#; ztemp=CreatePivot() +#; PositionEntity ytemp,EntityX(dp\cam,True),EntityY(dp\cam,True),EntityZ(dp\cam,True),True +#; PositionEntity ztemp,EntityX(dp\cam,True),EntityY(dp\cam,True),EntityZ(dp\cam,True),True +#; TranslateEntity ztemp,0.0,0.0,-10.0,True +#; PointEntity ytemp,ztemp +#; dp\campitch=EntityPitch(ytemp) +#; dp\camyaw=EntityYaw(ytemp) +#; r\Objects[4]=ytemp : ytemp = 0 +#; FreeEntity ztemp : ztemp = 0 +#; EndIf +#; Next +#; +#; EntityParent dp\cam,fr\Forest_Pivot + # + #it = CreateItem("Document SCP-860-1", "paper", r\x + 672.0 * RoomScale, r\y + 176.0 * RoomScale, r\z + 335.0 * RoomScale) + #RotateEntity it\collider, 0, r\angle+10, 0 + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Document SCP-860", "paper", r\x + 1152.0 * RoomScale, r\y + 176.0 * RoomScale, r\z - 384.0 * RoomScale) + #RotateEntity it\collider, 0, r\angle+170, 0 + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "lockroom" + #;[Block] + #d = CreateDoor(r\zone, r\x - 736.0 * RoomScale, 0, r\z - 104.0 * RoomScale, 0, r, True) + #d\timer = 70 * 5 : d\AutoClose = False : d\open = False + # + #EntityParent(d\buttons[0], 0) + #PositionEntity(d\buttons[0], r\x - 288.0 * RoomScale, 0.7, r\z - 640.0 * RoomScale) + #EntityParent(d\buttons[0], r\obj) + # + #FreeEntity(d\buttons[1]) : d\buttons[1] = 0 + # + #d2 = CreateDoor(r\zone, r\x + 104.0 * RoomScale, 0, r\z + 736.0 * RoomScale, 270, r, True) + #d2\timer = 70 * 5 : d2\AutoClose = False: d2\open = False + #EntityParent(d2\buttons[0], 0) + #PositionEntity(d2\buttons[0], r\x + 640.0 * RoomScale, 0.7, r\z + 288.0 * RoomScale) + #RotateEntity (d2\buttons[0], 0, 90, 0) + #EntityParent(d2\buttons[0], r\obj) + # + #FreeEntity(d2\buttons[1]) : d2\buttons[1] = 0 + # + #d\LinkedDoor = d2 + #d2\LinkedDoor = d + # + #sc.SecurityCams = CreateSecurityCam(r\x - 688.0 * RoomScale, r\y + 384 * RoomScale, r\z + 688.0 * RoomScale, r, True) + #sc\angle = 45 + 180 + #sc\turn = 45 + #sc\ScrTexture = 1 + #EntityTexture sc\ScrObj, ScreenTexs[sc\ScrTexture] + # + #TurnEntity(sc\CameraObj, 40, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #PositionEntity(sc\ScrObj, r\x + 668 * RoomScale, 1.1, r\z - 96.0 * RoomScale) + #TurnEntity(sc\ScrObj, 0, 90, 0) + #EntityParent(sc\ScrObj, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x - 112.0 * RoomScale, r\y + 384 * RoomScale, r\z + 112.0 * RoomScale, r, True) + #sc\angle = 45 + #sc\turn = 45 + #sc\ScrTexture = 1 + #EntityTexture sc\ScrObj, ScreenTexs[sc\ScrTexture] + # + #TurnEntity(sc\CameraObj, 40, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #PositionEntity(sc\ScrObj, r\x + 96.0 * RoomScale, 1.1, r\z - 668.0 * RoomScale) + #EntityParent(sc\ScrObj, r\obj) + # + #Local em.Emitters = CreateEmitter(r\x - 175.0 * RoomScale, 370.0 * RoomScale, r\z + 656.0 * RoomScale, 0) + #TurnEntity(em\Obj, 90, 0, 0, True) + #EntityParent(em\Obj, r\obj) + #em\RandAngle = 20 + #em\Speed = 0.05 + #em\SizeChange = 0.007 + #em\Achange = -0.006 + #em\Gravity = -0.24 + # + #em.Emitters = CreateEmitter(r\x - 655.0 * RoomScale, 370.0 * RoomScale, r\z + 240.0 * RoomScale, 0) + #TurnEntity(em\Obj, 90, 0, 0, True) + #EntityParent(em\Obj, r\obj) + #em\RandAngle = 20 + #em\Speed = 0.05 + #em\SizeChange = 0.007 + #em\Achange = -0.006 + #em\Gravity = -0.24 + # + #;This needs more work + #;dem.DevilEmitters = CreateDevilEmitter(r\x-175.0*RoomScale,r\y+370.0*RoomScale,r\z+656.0*RoomScale,r,2) + #;dem\isDeconGas = True + #;dem.DevilEmitters = CreateDevilEmitter(r\x-655.0*RoomScale,r\y+370.0*RoomScale,r\z+240.0*RoomScale,r,2) + #;dem\isDeconGas = True + #;[End Block] + #Case "lockroom2" + #;[Block] + #For i = 0 To 5 + #de.Decals = CreateDecal(Rand(2,3), r\x+Rnd(-392,520)*RoomScale, 3.0*RoomScale+Rnd(0,0.001), r\z+Rnd(-392,520)*RoomScale,90,Rnd(360),0) + #de\Size = Rnd(0.3,0.6) + #ScaleSprite(de\obj, de\Size,de\Size) + #CreateDecal(Rand(15,16), r\x+Rnd(-392,520)*RoomScale, 3.0*RoomScale+Rnd(0,0.001), r\z+Rnd(-392,520)*RoomScale,90,Rnd(360),0) + #de\Size = Rnd(0.1,0.6) + #ScaleSprite(de\obj, de\Size,de\Size) + #CreateDecal(Rand(15,16), r\x+Rnd(-0.5,0.5), 3.0*RoomScale+Rnd(0,0.001), r\z+Rnd(-0.5,0.5),90,Rnd(360),0) + #de\Size = Rnd(0.1,0.6) + #ScaleSprite(de\obj, de\Size,de\Size) + #Next + # + #sc.SecurityCams = CreateSecurityCam(r\x + 512.0 * RoomScale, r\y + 384 * RoomScale, r\z + 384.0 * RoomScale, r, True) + #sc\angle = 45 + 90 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 40, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #PositionEntity(sc\ScrObj, r\x + 668 * RoomScale, 1.1, r\z - 96.0 * RoomScale) + #TurnEntity(sc\ScrObj, 0, 90, 0) + #EntityParent(sc\ScrObj, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x - 384.0 * RoomScale, r\y + 384 * RoomScale, r\z - 512.0 * RoomScale, r, True) + #sc\angle = 45 + 90 + 180 + #sc\turn = 45 + # + #TurnEntity(sc\CameraObj, 40, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #PositionEntity(sc\ScrObj, r\x + 96.0 * RoomScale, 1.1, r\z - 668.0 * RoomScale) + #EntityParent(sc\ScrObj, r\obj) + #;[End Block] + #Case "gatea" + #;[Block] + #r\RoomDoors[2] = CreateDoor(r\zone, r\x - 4064.0 * RoomScale, r\y-1280.0*RoomScale, r\z + 3952.0 * RoomScale, 0, r, False) + #r\RoomDoors[2]\AutoClose = False : r\RoomDoors[2]\open = False + # + #d2 = CreateDoor(r\zone, r\x, r\y, r\z - 1024.0 * RoomScale, 0, r, False) + #d2\AutoClose = False : d2\open = False : d2\locked = True + # + #d2 = CreateDoor(r\zone, r\x-1440*RoomScale, r\y-480.0*RoomScale, r\z + 2328.0 * RoomScale, 0, r, False, False, 2) + #If SelectedEnding = "A2" Then + #d2\AutoClose = False : d2\open = True : d2\locked = True + #Else + #d2\AutoClose = False : d2\open = False : d2\locked = False + #EndIf + #PositionEntity d2\buttons[0], r\x-1320.0*RoomScale, EntityY(d2\buttons[0],True), r\z + 2288.0*RoomScale, True + #PositionEntity d2\buttons[1], r\x-1584*RoomScale, EntityY(d2\buttons[0],True), r\z + 2488.0*RoomScale, True + #RotateEntity d2\buttons[1], 0, 90, 0, True + # + #d2 = CreateDoor(r\zone, r\x-1440*RoomScale, r\y-480.0*RoomScale, r\z + 4352.0 * RoomScale, 0, r, False, False, 2) + #If SelectedEnding = "A2" Then + #d2\AutoClose = False : d2\open = True : d2\locked = True + #Else + #d2\AutoClose = False : d2\open = False : d2\locked = False + #EndIf + #PositionEntity d2\buttons[0], r\x-1320.0*RoomScale, EntityY(d2\buttons[0],True), r\z + 4384.0*RoomScale, True + #RotateEntity d2\buttons[0], 0, 180, 0, True + #PositionEntity d2\buttons[1], r\x-1584.0*RoomScale, EntityY(d2\buttons[0],True), r\z + 4232.0*RoomScale, True + #RotateEntity d2\buttons[1], 0, 90, 0, True + # + #For r2.Rooms = Each Rooms + #If r2\RoomTemplate\Name = "exit1" Then + #r\Objects[1]=r2\Objects[1] + #r\Objects[2]=r2\Objects[2] + #ElseIf r2\RoomTemplate\Name = "gateaentrance" + #;ylempi hissi + #r\RoomDoors[1] = CreateDoor(0, r\x+1544.0*RoomScale, r\y, r\z-64.0*RoomScale, 90, r, False, 3) + #r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = False + #PositionEntity(r\RoomDoors[1]\buttons[0],r\x+1584*RoomScale, EntityY(r\RoomDoors[1]\buttons[0],True), r\z+80*RoomScale, True) + #PositionEntity(r\RoomDoors[1]\buttons[1],r\x+1456*RoomScale, EntityY(r\RoomDoors[1]\buttons[1],True), r\z-208*RoomScale, True) + #r2\Objects[1] = CreatePivot() + #PositionEntity(r2\Objects[1], r\x+1848.0*RoomScale, r\y+240.0*RoomScale, r\z-64.0*RoomScale, True) + #EntityParent r2\Objects[1], r\obj + #EndIf + #Next + # + #;106:n spawnpoint + #r\Objects[3]=CreatePivot() + #PositionEntity(r\Objects[3], r\x+1216.0*RoomScale, r\y, r\z+2112.0*RoomScale, True) + #EntityParent r\Objects[3], r\obj + # + #;sillan loppup�� + #r\Objects[4]=CreatePivot() + #PositionEntity(r\Objects[4], r\x, r\y+96.0*RoomScale, r\z+6400.0*RoomScale, True) + #EntityParent r\Objects[4], r\obj + # + #;vartiotorni 1 + #r\Objects[5]=CreatePivot() + #PositionEntity(r\Objects[5], r\x+1784.0*RoomScale, r\y+2124.0*RoomScale, r\z+4512.0*RoomScale, True) + #EntityParent r\Objects[5], r\obj + # + #;vartiotorni 2 + #r\Objects[6]=CreatePivot() + #PositionEntity(r\Objects[6], r\x-5048.0*RoomScale, r\y+1912.0*RoomScale, r\z+4656.0*RoomScale, True) + #EntityParent r\Objects[6], r\obj + # + #;sillan takareuna + #r\Objects[7]=CreatePivot() + #PositionEntity(r\Objects[7], r\x+1824.0*RoomScale, r\y+224.0*RoomScale, r\z+7056.0*RoomScale, True) + #EntityParent r\Objects[7], r\obj + # + #;sillan takareuna2 + #r\Objects[8]=CreatePivot() + #PositionEntity(r\Objects[8], r\x-1824.0*RoomScale, r\y+224.0*RoomScale, r\z+7056.0*RoomScale, True) + #EntityParent r\Objects[8], r\obj + # + #;"valopyssy" + #r\Objects[9]=CreatePivot() + #PositionEntity(r\Objects[9], r\x+2624.0*RoomScale, r\y+992.0*RoomScale, r\z+6157.0*RoomScale, True) + #EntityParent r\Objects[9], r\obj + #;objects[10] = valopyssyn yl�osa + # + #;tunnelin loppu + #r\Objects[11]=CreatePivot() + #PositionEntity(r\Objects[11], r\x-4064.0*RoomScale, r\y-1248.0*RoomScale, r\z-1696.0*RoomScale, True) + #EntityParent r\Objects[11], r\obj + # + #r\Objects[13]=LoadMesh_Strict("GFX\map\gateawall1.b3d",r\obj) + #PositionEntity(r\Objects[13], r\x-4308.0*RoomScale, r\y-1045.0*RoomScale, r\z+544.0*RoomScale, True) + #EntityColor r\Objects[13], 25,25,25 + #EntityType r\Objects[13],HIT_MAP + #;EntityFX(r\Objects[13],1) + # + #r\Objects[14]=LoadMesh_Strict("GFX\map\gateawall2.b3d",r\obj) + #PositionEntity(r\Objects[14], r\x-3820.0*RoomScale, r\y-1045.0*RoomScale, r\z+544.0*RoomScale, True) + #EntityColor r\Objects[14], 25,25,25 + #EntityType r\Objects[14],HIT_MAP + #;EntityFX(r\Objects[14],1) + # + #r\Objects[15]=CreatePivot(r\obj) + #PositionEntity(r\Objects[15], r\x-3568.0*RoomScale, r\y-1089.0*RoomScale, r\z+4944.0*RoomScale, True) + # + #r\Objects[16] = LoadMesh_Strict("GFX\map\gatea_hitbox1.b3d",r\obj) + #EntityPickMode r\Objects[16],2 + #EntityType r\Objects[16],HIT_MAP + #EntityAlpha r\Objects[16],0.0 + # + #;[End Block] + #Case "gateaentrance" + #;[Block] + #;alempi hissi + #r\RoomDoors[0] = CreateDoor(0, r\x+744.0*RoomScale, 0, r\z+512.0*RoomScale, 90, r, True, 3) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True + #PositionEntity(r\RoomDoors[0]\buttons[1],r\x+688*RoomScale, EntityY(r\RoomDoors[0]\buttons[1],True), r\z+368*RoomScale, True) + #PositionEntity(r\RoomDoors[0]\buttons[0],r\x+784*RoomScale, EntityY(r\RoomDoors[0]\buttons[0],True), r\z+656*RoomScale, True) + #r\Objects[0] = CreatePivot() + #PositionEntity(r\Objects[0], r\x+1048.0*RoomScale, 0, r\z+512.0*RoomScale, True) + #EntityParent r\Objects[0], r\obj + # + #r\RoomDoors[1] = CreateDoor(r\zone, r\x, 0, r\z - 360.0 * RoomScale, 0, r, False, True, 5) + #r\RoomDoors[1]\dir = 1 : r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = False + #PositionEntity(r\RoomDoors[1]\buttons[1], r\x+416*RoomScale, EntityY(r\RoomDoors[0]\buttons[1],True), r\z-576*RoomScale, True) + #RotateEntity r\RoomDoors[1]\buttons[1],0,r\angle-90,0,True + #PositionEntity(r\RoomDoors[1]\buttons[0], r\x, 20.0, r\z, True) + # + #;[End Block] + #Case "exit1" + #;[Block] + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x+4356.0*RoomScale, 9767.0*RoomScale, r\z+2588.0*RoomScale, True) + # + #r\RoomDoors[4] = CreateDoor(r\zone, r\x, 0, r\z - 320.0 * RoomScale, 0, r, False, True, 5) + #r\RoomDoors[4]\dir = 1 : r\RoomDoors[4]\AutoClose = False : r\RoomDoors[4]\open = False + #PositionEntity(r\RoomDoors[4]\buttons[1], r\x+352*RoomScale, 0.7, r\z-528*RoomScale, True) + #RotateEntity r\RoomDoors[4]\buttons[1],0,r\angle-90,0,True + #PositionEntity(r\RoomDoors[4]\buttons[0], r\x, 7.0, r\z, True) + # + #;k�yt�v�n takaosa + #r\Objects[3] = CreatePivot() + #PositionEntity(r\Objects[3], r\x-7680.0*RoomScale, 10992.0*RoomScale, r\z-27048.0*RoomScale, True) + #EntityParent r\Objects[3], r\obj + # + #;oikean puolen watchpoint 1 + #r\Objects[4] = CreatePivot() + #PositionEntity(r\Objects[4], r\x+5203.36*RoomScale, 12128.0*RoomScale, r\z-1739.19*RoomScale, True) + #EntityParent r\Objects[4], r\obj + #;oikean puolen watchpoint 2 + #r\Objects[5] = CreatePivot() + #PositionEntity(r\Objects[5], r\x+4363.02*RoomScale, 10536.0*RoomScale, r\z+2766.16*RoomScale, True) + #EntityParent r\Objects[5], r\obj + #;vasemman puolen watchpoint 1 + #r\Objects[6] = CreatePivot() + #PositionEntity(r\Objects[6], r\x+5192.0*RoomScale, 12192.0*RoomScale, r\z-1760.0*RoomScale, True) + #EntityParent r\Objects[6], r\obj + #;vasemman puolen watchpoint 2 + #r\Objects[7] = CreatePivot() + #PositionEntity(r\Objects[7], r\x+5192.0*RoomScale, 12192.0*RoomScale, r\z-4352.0*RoomScale, True) + #EntityParent r\Objects[7], r\obj + # + #;alempi hissi + #r\RoomDoors[0] = CreateDoor(0, r\x+720.0*RoomScale, 0, r\z+1432.0*RoomScale, 0, r, True, 3) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True + #MoveEntity r\RoomDoors[0]\buttons[0],0,0,22.0*RoomScale + #MoveEntity r\RoomDoors[0]\buttons[1],0,0,22.0*RoomScale + #r\Objects[8] = CreatePivot() + #PositionEntity(r\Objects[8], r\x+720.0*RoomScale, 0, r\z+1744.0*RoomScale, True) + #EntityParent r\Objects[8], r\obj + # + #;ylempi hissi + #r\RoomDoors[1] = CreateDoor(0, r\x-5424.0*RoomScale, 10784.0*RoomScale, r\z-1380.0*RoomScale, 0, r, False, 3) + #r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = False + #MoveEntity r\RoomDoors[1]\buttons[0],0,0,22.0*RoomScale + #MoveEntity r\RoomDoors[1]\buttons[1],0,0,22.0*RoomScale + #r\Objects[9] = CreatePivot() + #PositionEntity(r\Objects[9], r\x-5424.0*RoomScale, 10784.0*RoomScale, r\z-1068.0*RoomScale, True) + #EntityParent r\Objects[9], r\obj + # + #r\RoomDoors[2] = CreateDoor(0, r\x+4352.0*RoomScale, 10784.0*RoomScale, r\z-492.0*RoomScale, 0, r, False) + #r\RoomDoors[2]\AutoClose = False : r\RoomDoors[2]\open = False + # + #r\RoomDoors[3] = CreateDoor(0, r\x+4352.0*RoomScale, 10784.0*RoomScale, r\z+500.0*RoomScale, 0, r, False) + #r\RoomDoors[3]\AutoClose = False : r\RoomDoors[3]\open = False + # + #;walkway + #r\Objects[10] = CreatePivot() + #PositionEntity(r\Objects[10], r\x+4352.0*RoomScale, 10778.0*RoomScale, r\z+1344.0*RoomScale, True) + #EntityParent r\Objects[10], r\obj + # + #;"682" + #r\Objects[11] = CreatePivot() + #PositionEntity(r\Objects[11], r\x+2816.0*RoomScale, 11024.0*RoomScale, r\z-2816.0*RoomScale, True) + #EntityParent r\Objects[11], r\obj + # + #;r\Objects[12] = 682:n k�si + # + #;"valvomon" takaovi + #r\RoomDoors[5] = CreateDoor(0, r\x+3248.0*RoomScale, 9856.0*RoomScale, r\z+6400.0*RoomScale, 0, r, False, False, 0, "ABCD") + #r\RoomDoors[5]\AutoClose = False : r\RoomDoors[5]\open = False + # + #;"valvomon" etuovi + #d.Doors = CreateDoor(0, r\x+3072.0*RoomScale, 9856.0*RoomScale, r\z+5800.0*RoomScale, 90, r, False, False, 3) + #d\AutoClose = False : d\open = False + # + #r\Objects[14] = CreatePivot() + #PositionEntity(r\Objects[14], r\x+3536.0*RoomScale, 10256.0*RoomScale, r\z+5512.0*RoomScale, True) + #EntityParent r\Objects[14], r\obj + #r\Objects[15] = CreatePivot() + #PositionEntity(r\Objects[15], r\x+3536.0*RoomScale, 10256.0*RoomScale, r\z+5824.0*RoomScale, True) + #EntityParent r\Objects[15], r\obj + #r\Objects[16] = CreatePivot() + #PositionEntity(r\Objects[16], r\x+3856.0*RoomScale, 10256.0*RoomScale, r\z+5512.0*RoomScale, True) + #EntityParent r\Objects[16], r\obj + #r\Objects[17] = CreatePivot() + #PositionEntity(r\Objects[17], r\x+3856.0*RoomScale, 10256.0*RoomScale, r\z+5824.0*RoomScale, True) + #EntityParent r\Objects[17], r\obj + # + #;MTF:n spawnpoint + #r\Objects[18] = CreatePivot() + #;PositionEntity(r\Objects[18], r\x+3727.0*RoomScale, 10066.0*RoomScale, r\z+6623.0*RoomScale, True) + #PositionEntity(r\Objects[18], r\x+3250.0*RoomScale, 9896.0*RoomScale, r\z+6623.0*RoomScale, True) + #EntityParent r\Objects[18], r\obj + # + #;piste johon helikopterit pakenee nukea + #r\Objects[19] = CreatePivot() + #PositionEntity(r\Objects[19], r\x+3808.0*RoomScale, 12320.0*RoomScale, r\z-13568.0*RoomScale, True) + #EntityParent r\Objects[19], r\obj + # + #;[End Block] + #Case "roompj" + #;[Block] + #it = CreateItem("Document SCP-372", "paper", r\x + 800.0 * RoomScale, r\y + 176.0 * RoomScale, r\z + 1108.0 * RoomScale) + #RotateEntity it\collider, 0, r\angle, 0 + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Radio Transceiver", "radio", r\x + 800.0 * RoomScale, r\y + 112.0 * RoomScale, r\z + 944.0 * RoomScale) + #it\state = 80.0 + #EntityParent(it\collider, r\obj) + # + #r\Objects[3] = LoadMesh_Strict("GFX\map\372_hb.b3d",r\obj) + #EntityPickMode r\Objects[3],2 + #EntityType r\Objects[3],HIT_MAP + #EntityAlpha r\Objects[3],0.0 + # + #d = CreateDoor(r\zone,r\x,r\y,r\z-368.0*RoomScale,0,r,True,True,2) + #d\AutoClose = False + #PositionEntity (d\buttons[0], r\x - 496.0 * RoomScale, 0.7, r\z - 272.0 * RoomScale, True) + #TurnEntity(d\buttons[0], 0, 90, 0) + #;[End Block] + #Case "room079" + #;[Block] + #d = CreateDoor(r\zone, r\x, -448.0*RoomScale, r\z + 1136.0 * RoomScale, 0, r, False,True, 4) + #d\dir = 1 : d\AutoClose = False : d\open = False + #PositionEntity(d\buttons[1], r\x + 224.0 * RoomScale, -250*RoomScale, r\z + 918.0 * RoomScale, True) + #;TurnEntity(d\buttons[0],0,-90,0,True) + #PositionEntity(d\buttons[0], r\x - 240.0 * RoomScale, -250*RoomScale, r\z + 1366.0 * RoomScale, True) + #;TurnEntity(d\buttons[1],0, 90,0,True) + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x + 1456.0*RoomScale, -448.0*RoomScale, r\z + 976.0 * RoomScale, 0, r, False, True, 3) + #r\RoomDoors[0]\dir = 1 : r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = False + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x + 1760.0 * RoomScale, -250*RoomScale, r\z + 1236.0 * RoomScale, True) + #TurnEntity(r\RoomDoors[0]\buttons[0],0,-90-90,0,True) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 1760.0 * RoomScale, -240*RoomScale, r\z + 740.0 * RoomScale, True) + #TurnEntity(r\RoomDoors[0]\buttons[1],0, 90-90,0,True) + # + #CreateDoor(0, r\x + 1144.0*RoomScale, -448.0*RoomScale, r\z + 704.0 * RoomScale, 90, r, False, False, -1) + # + #r\Objects[0] = LoadAnimMesh_Strict("GFX\map\079.b3d") + #ScaleEntity(r\Objects[0], 1.3, 1.3, 1.3, True) + #PositionEntity (r\Objects[0], r\x + 1856.0*RoomScale, -560.0*RoomScale, r\z-672.0*RoomScale, True) + #EntityParent(r\Objects[0], r\obj) + #TurnEntity r\Objects[0],0,180,0,True + # + #r\Objects[1] = CreateSprite(r\Objects[0]) + #SpriteViewMode(r\Objects[1],2) + #PositionEntity(r\Objects[1], 0.082, 0.119, 0.010) + #ScaleSprite(r\Objects[1],0.18*0.5,0.145*0.5) + #TurnEntity(r\Objects[1],0,13.0,0) + #MoveEntity r\Objects[1], 0,0,-0.022 + #EntityTexture (r\Objects[1],OldAiPics(0)) + # + #HideEntity r\Objects[1] + # + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity (r\Objects[2], r\x + 1184.0*RoomScale, -448.0*RoomScale, r\z+1792.0*RoomScale, True) + # + #de.Decals = CreateDecal(3, r\x + 1184.0*RoomScale, -448.0*RoomScale+0.01, r\z+1792.0*RoomScale,90,Rnd(360),0) + #de\Size = 0.5 + #ScaleSprite(de\obj, de\Size,de\Size) + #EntityParent de\obj, r\obj + #;[End Block] + #Case "checkpoint1" + #;[Block] + #r\RoomDoors[0] = CreateDoor(0, r\x + 48.0*RoomScale, 0, r\z - 128.0 * RoomScale, 0, r, False, False, 3) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x - 152.0 * RoomScale, EntityY(r\RoomDoors[0]\buttons[0],True), r\z - 352.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x - 152.0 * RoomScale, EntityY(r\RoomDoors[0]\buttons[1],True), r\z + 96.0 * RoomScale, True) + # + #r\RoomDoors[1] = CreateDoor(0, r\x - 352.0*RoomScale, 0, r\z - 128.0 * RoomScale, 0, r, False, False, 3) + #;FreeEntity r\RoomDoors[1]\buttons[0] + #;FreeEntity r\RoomDoors[1]\buttons[1] + # + #r\RoomDoors[1]\LinkedDoor = r\RoomDoors[0] + #r\RoomDoors[0]\LinkedDoor = r\RoomDoors[1] + # + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity (r\Objects[0], r\x + 720.0*RoomScale, 120.0*RoomScale, r\z+333.0*RoomScale, True) + # + #r\RoomDoors[0]\timer = 70 * 5 + #r\RoomDoors[1]\timer = 70 * 5 + # + #sc.SecurityCams = CreateSecurityCam(r\x+192.0*RoomScale, r\y+704.0*RoomScale, r\z-960.0*RoomScale, r) + #sc\angle = 45 + #sc\turn = 0 + #TurnEntity(sc\CameraObj, 20, 0, 0) + # + #r\Objects[2] = CopyEntity(Monitor2,r\obj) + #ScaleEntity(r\Objects[2], 2.0, 2.0, 2.0) + #PositionEntity (r\Objects[2], r\x - 152.0*RoomScale, 384.0*RoomScale, r\z+124.0*RoomScale, True) + #RotateEntity (r\Objects[2],0,180,0) + #EntityFX r\Objects[2],1 + # + #r\Objects[3] = CopyEntity(Monitor2,r\obj) + #ScaleEntity(r\Objects[3], 2.0, 2.0, 2.0) + #PositionEntity (r\Objects[3], r\x - 152.0*RoomScale, 384.0*RoomScale, r\z-380.0*RoomScale, True) + #RotateEntity (r\Objects[3],0,0,0) + #EntityFX r\Objects[3],1 + # + #If MapTemp(Floor(r\x / 8.0),Floor(r\z /8.0)-1)=0 Then + #CreateDoor(r\zone, r\x, 0, r\z - 4.0, 0, r, 0, False, 0, "GEAR") + #EndIf + #;[End Block] + #Case "checkpoint2" + #;[Block] + #r\RoomDoors[0]= CreateDoor(0, r\x - 48.0*RoomScale, 0, r\z + 128.0 * RoomScale, 0, r, False, False, 5) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 152.0 * RoomScale, EntityY(r\RoomDoors[0]\buttons[0],True), r\z - 96.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x + 152.0 * RoomScale, EntityY(r\RoomDoors[0]\buttons[1],True), r\z + 352.0 * RoomScale, True) + # + #r\RoomDoors[1] = CreateDoor(0, r\x + 352.0*RoomScale, 0, r\z + 128.0 * RoomScale, 0, r, False, False, 5) + #;FreeEntity r\RoomDoors[1]\buttons[0] + #;FreeEntity r\RoomDoors[1]\buttons[1] + # + #r\RoomDoors[1]\LinkedDoor = r\RoomDoors[0] + #r\RoomDoors[0]\LinkedDoor = r\RoomDoors[1] + # + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity (r\Objects[0], r\x - 720.0*RoomScale, 120.0*RoomScale, r\z+464.0*RoomScale, True) + # + #r\Objects[2] = CopyEntity(Monitor3,r\obj) + #ScaleEntity(r\Objects[2], 2.0, 2.0, 2.0) + #PositionEntity (r\Objects[2], r\x + 152.0*RoomScale, 384.0*RoomScale, r\z+380.0*RoomScale, True) + #RotateEntity (r\Objects[2],0,180,0) + #EntityFX r\Objects[2],1 + # + #r\Objects[3] = CopyEntity(Monitor3,r\obj) + #ScaleEntity(r\Objects[3], 2.0, 2.0, 2.0) + #PositionEntity (r\Objects[3], r\x + 152.0*RoomScale, 384.0*RoomScale, r\z-124.0*RoomScale, True) + #RotateEntity (r\Objects[3],0,0,0) + #EntityFX r\Objects[3],1 + # + #r\RoomDoors[0]\timer = 70 * 5 + #r\RoomDoors[1]\timer = 70 * 5 + # + #If MapTemp(Floor(r\x / 8.0),Floor(r\z /8.0)-1)=0 Then + #CreateDoor(r\zone, r\x, 0, r\z - 4.0, 0, r, 0, False, 0, "GEAR") + #EndIf + #;[End Block] + #Case "room2pit" + #;[Block] + #i = 0 + #For xtemp% = -1 To 1 Step 2 + #For ztemp% = -1 To 1 + #em.Emitters = CreateEmitter(r\x + 202.0 * RoomScale * xtemp, 8.0 * RoomScale, r\z + 256.0 * RoomScale * ztemp, 0) + #em\RandAngle = 30 + #em\Speed = 0.0045 + #em\SizeChange = 0.007 + #em\Achange = -0.016 + #r\Objects[i] = em\Obj + #If i < 3 Then + #TurnEntity(em\Obj, 0, -90, 0, True) + #Else + #TurnEntity(em\Obj, 0, 90, 0, True) + #EndIf + #TurnEntity(em\Obj, -45, 0, 0, True) + #EntityParent(em\Obj, r\obj) + #i=i+1 + #Next + #Next + # + #r\Objects[6] = CreatePivot() + #PositionEntity(r\Objects[6], r\x + 640.0 * RoomScale, 8.0 * RoomScale, r\z - 896.0 * RoomScale) + #EntityParent(r\Objects[6], r\obj) + # + #r\Objects[7] = CreatePivot() + #PositionEntity(r\Objects[7], r\x - 864.0 * RoomScale, -400.0 * RoomScale, r\z - 632.0 * RoomScale) + #EntityParent(r\Objects[7],r\obj) + #;[End Block] + #Case "room2testroom2" + #;[Block] + #r\Objects[0] = CreatePivot() + #PositionEntity(r\Objects[0], r\x - 640.0 * RoomScale, 0.5, r\z - 912.0 * RoomScale) + #EntityParent(r\Objects[0], r\obj) + # + #r\Objects[1] = CreatePivot() + #PositionEntity(r\Objects[1], r\x - 669.0 * RoomScale, 0.5, r\z - 16.0 * RoomScale) ;r\x - 632 + #EntityParent(r\Objects[1], r\obj) + # + #Local Glasstex = LoadTexture_Strict("GFX\map\glass.png",1+2) + #r\Objects[2] = CreateSprite() + #EntityTexture(r\Objects[2],Glasstex) + #SpriteViewMode(r\Objects[2],2) + #ScaleSprite(r\Objects[2],182.0*RoomScale*0.5, 192.0*RoomScale*0.5) + #PositionEntity(r\Objects[2], r\x - 632.0 * RoomScale, 224.0*RoomScale, r\z - 208.0 * RoomScale) + #TurnEntity(r\Objects[2],0,180,0) + #EntityParent(r\Objects[2], r\obj) + #HideEntity (r\Objects[2]) + # + #FreeTexture Glasstex + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x - 240.0 * RoomScale, 0.0, r\z + 640.0 * RoomScale, 90, r, False, False, 1) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = False + # + #d = CreateDoor(r\zone, r\x - 512.0 * RoomScale, 0.0, r\z + 384.0 * RoomScale, 0, r, False, False) + #d\AutoClose = False : d\open = False + # + #;d = CreateDoor(r\zone, r\x - 816.0 * RoomScale, 0.0, r\z - 208.0 * RoomScale, 0, r, False, False) + #;d\AutoClose = False : d\open = False + #;FreeEntity(d\buttons[0]) : d\buttons[0]=0 + #;FreeEntity(d\buttons[1]) : d\buttons[1]=0 + # + #it = CreateItem("Level 2 Key Card", "key2", r\x - 914.0 * RoomScale, r\y + 137.0 * RoomScale, r\z + 61.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("S-NAV 300 Navigator", "nav", r\x - 312.0 * RoomScale, r\y + 264.0 * RoomScale, r\z + 176.0 * RoomScale) + #it\state = 20 : EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room3tunnel" + #;[Block] + # + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity (r\Objects[0], r\x - 190.0*RoomScale, 4.0*RoomScale, r\z+190.0*RoomScale, True) + # + #;[End Block] + #Case "room2toilets" + #;[Block] + #r\Objects[0] = CreatePivot() + #PositionEntity(r\Objects[0], r\x + 1040.0 * RoomScale, 192.0 * RoomScale, r\z) + #EntityParent(r\Objects[0], r\obj) + # + #r\Objects[1] = CreatePivot() + #;PositionEntity(r\Objects[1], r\x + 1270.0*RoomScale, 0.5, r\z+570.0*RoomScale) + #PositionEntity(r\Objects[1], r\x + 1530.0*RoomScale, 0.5, r\z+512.0*RoomScale) + #EntityParent(r\Objects[1], r\obj) + # + #r\Objects[2] = CreatePivot() + #PositionEntity(r\Objects[2], r\x + 1535.0*RoomScale, r\y+150.0*RoomScale, r\z+512.0*RoomScale) + #EntityParent(r\Objects[2], r\obj) + #;[End Block] + #Case "room2storage" + #;[Block] + #r\RoomDoors[0] = CreateDoor(r\zone, r\x - 1288.0 * RoomScale, 0, r\z, 270, r) + #r\RoomDoors[1] = CreateDoor(r\zone, r\x - 760.0 * RoomScale, 0, r\z, 270, r) + #r\RoomDoors[2] = CreateDoor(r\zone, r\x - 264.0 * RoomScale, 0, r\z, 270, r) + #r\RoomDoors[3] = CreateDoor(r\zone, r\x + 264.0 * RoomScale, 0, r\z, 270, r) + #r\RoomDoors[4] = CreateDoor(r\zone, r\x + 760.0 * RoomScale, 0, r\z, 270, r) + #r\RoomDoors[5] = CreateDoor(r\zone, r\x + 1288.0 * RoomScale, 0, r\z, 270, r) + # + #For i = 0 To 5 + #MoveEntity r\RoomDoors[i]\buttons[0], 0,0,-8.0 + #MoveEntity r\RoomDoors[i]\buttons[1], 0,0,-8.0 + #r\RoomDoors[i]\AutoClose = False : r\RoomDoors[i]\open = False + #Next + # + #it = CreateItem("Document SCP-939", "paper", r\x + 352.0 * RoomScale, r\y + 176.0 * RoomScale, r\z + 256.0 * RoomScale) + #RotateEntity it\collider, 0, r\angle+4, 0 + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("9V Battery", "bat", r\x + 352.0 * RoomScale, r\y + 112.0 * RoomScale, r\z + 448.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Empty Cup", "emptycup", r\x-672*RoomScale, 240*RoomScale, r\z+288.0*RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Level 1 Key Card", "key1", r\x - 672.0 * RoomScale, r\y + 240.0 * RoomScale, r\z + 224.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room2sroom" + #;[Block] + #d = CreateDoor(r\zone, r\x + 1440.0 * RoomScale, 224.0 * RoomScale, r\z + 32.0 * RoomScale, 90, r, False, False, 4) + #d\AutoClose = False : d\open = False + # + #it = CreateItem("Some SCP-420-J", "420", r\x + 1776.0 * RoomScale, r\y + 400.0 * RoomScale, r\z + 427.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Some SCP-420-J", "420", r\x + 1808.0 * RoomScale, r\y + 400.0 * RoomScale, r\z + 435.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Level 5 Key Card", "key5", r\x + 2232.0 * RoomScale, r\y + 392.0 * RoomScale, r\z + 387.0 * RoomScale) + #RotateEntity it\collider, 0, r\angle, 0, True + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Nuclear Device Document", "paper", r\x + 2248.0 * RoomScale, r\y + 440.0 * RoomScale, r\z + 372.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Radio Transceiver", "radio", r\x + 2240.0 * RoomScale, r\y + 320.0 * RoomScale, r\z + 128.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room2shaft" + #;[Block] + #d = CreateDoor(r\zone, r\x + 1552.0 * RoomScale, r\y, r\z + 552.0 * RoomScale, 0, r, False, False) + #PositionEntity(d\buttons[0], EntityX(d\buttons[0],True), EntityY(d\buttons[0],True), r\z + 518.0 * RoomScale, True) + #PositionEntity(d\buttons[1], EntityX(d\buttons[1],True), EntityY(d\buttons[1],True), r\z + 575.0 * RoomScale, True) + #d\AutoClose = False : d\open = False + # + #d = CreateDoor(r\zone, r\x + 256.0 * RoomScale, r\y, r\z + 744.0 * RoomScale, 90, r, False, False, 2) + #d\AutoClose = False : d\open = False + # + #it = CreateItem("Level 3 Key Card", "key3", r\x + 1119.0 * RoomScale, r\y + 233.0 * RoomScale, r\z + 494.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("First Aid Kit", "firstaid", r\x + 1035.0 * RoomScale, r\y + 145.0 * RoomScale, r\z + 56.0 * RoomScale) + #EntityParent(it\collider, r\obj) : RotateEntity(it\collider, 0, 90, 0) + # + #it = CreateItem("9V Battery", "bat", r\x + 1930.0 * RoomScale, r\y + 97.0 * RoomScale, r\z + 256.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #it = CreateItem("9V Battery", "bat", r\x + 1061.0 * RoomScale, r\y + 161.0 * RoomScale, r\z + 494.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("ReVision Eyedrops", "eyedrops", r\x + 1930.0*RoomScale, r\y + 225.0 * RoomScale, r\z + 128.0*RoomScale) + #EntityParent(it\collider, r\obj) + # + #;Player's position after leaving the pocket dimension + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity r\Objects[0],r\x+1560.0*RoomScale,r\y,r\z+250.0*RoomScale,True + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity r\Objects[1],r\x + 1344.0 * RoomScale, -752.0 * RoomScale,r\z - 384.0 * RoomScale,True + # + #de.Decals = CreateDecal(3, r\x + 1334.0*RoomScale, -796.0*RoomScale+0.01, r\z-220.0*RoomScale,90,Rnd(360),0) + #de\Size = 0.25 + #ScaleSprite(de\obj, de\Size,de\Size) + #EntityParent de\obj, r\obj + # + #r\Objects[2] = CreateButton(r\x + 1181.0 *RoomScale, r\y + 180.0 * RoomScale, r\z - 512.0 * RoomScale, 0, 270) + #EntityParent (r\Objects[2],r\obj) + #;[End Block] + #Case "room2poffices" + #;[Block] + #d = CreateDoor(r\zone, r\x + 240.0 * RoomScale, 0.0, r\z + 448.0 * RoomScale, 90, r, False, False, 0, Str(AccessCode)) + #PositionEntity(d\buttons[0], r\x + 248.0 * RoomScale, EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True),True) + #PositionEntity(d\buttons[1], r\x + 232.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True),True) + #d\AutoClose = False : d\open = False + # + #d = CreateDoor(r\zone, r\x - 496.0 * RoomScale, 0.0, r\z, 90, r, False, False, 0, "ABCD") + #PositionEntity(d\buttons[0], r\x - 488.0 * RoomScale, EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True),True) + #PositionEntity(d\buttons[1], r\x - 504.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True),True) + #d\AutoClose = False : d\open = False : d\locked = True + # + #d = CreateDoor(r\zone, r\x + 240.0 * RoomScale, 0.0, r\z - 576.0 * RoomScale, 90, r, False, False, 0, "7816") + #PositionEntity(d\buttons[0], r\x + 248.0 * RoomScale, EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True),True) + #PositionEntity(d\buttons[1], r\x + 232.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True),True) + #d\AutoClose = False : d\open = False + # + #it = CreateItem("Mysterious Note", "paper", r\x + 736.0 * RoomScale, r\y + 224.0 * RoomScale, r\z + 544.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #it = CreateItem("Ballistic Vest", "vest", r\x + 608.0 * RoomScale, r\y + 112.0 * RoomScale, r\z + 32.0 * RoomScale) + #EntityParent(it\collider, r\obj) : RotateEntity(it\collider, 0, 90, 0) + # + #it = CreateItem("Incident Report SCP-106-0204", "paper", r\x + 704.0 * RoomScale, r\y + 183.0 * RoomScale, r\z - 576.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #it = CreateItem("Journal Page", "paper", r\x + 912 * RoomScale, r\y + 176.0 * RoomScale, r\z - 160.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #it = CreateItem("First Aid Kit", "firstaid", r\x + 912.0 * RoomScale, r\y + 112.0 * RoomScale, r\z - 336.0 * RoomScale) + #EntityParent(it\collider, r\obj) : RotateEntity(it\collider, 0, 90, 0) + #;[End Block] + #Case "room2poffices2" + #;[Block] + #d = CreateDoor(r\zone, r\x + 240.0 * RoomScale, 0.0, r\z + 48.0 * RoomScale, 270, r, False, False, 3) + #PositionEntity(d\buttons[0], r\x + 224.0 * RoomScale, EntityY(d\buttons[0],True), r\z + 176.0 * RoomScale,True) + #PositionEntity(d\buttons[1], r\x + 256.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True),True) + #d\AutoClose = False : d\open = False + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x - 432.0 * RoomScale, 0.0, r\z, 90, r, False, False, 0, "1234") + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x - 416.0 * RoomScale, EntityY(r\RoomDoors[0]\buttons[0],True), r\z + 176.0 * RoomScale,True) + #FreeEntity r\RoomDoors[0]\buttons[1] : r\RoomDoors[0]\buttons[1] = 0 + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = False : r\RoomDoors[0]\locked = True + # + #de.Decals = CreateDecal(0, r\x - 808.0 * RoomScale, 0.005, r\z - 72.0 * RoomScale, 90, Rand(360), 0) + #EntityParent(de\obj, r\obj) + #de.Decals = CreateDecal(2, r\x - 808.0 * RoomScale, 0.01, r\z - 72.0 * RoomScale, 90, Rand(360), 0) + #de\Size = 0.3 : ScaleSprite(de\obj, de\Size, de\Size) : EntityParent(de\obj, r\obj) + # + #de.Decals = CreateDecal(0, r\x - 432.0 * RoomScale, 0.01, r\z, 90, Rand(360), 0) + #EntityParent(de\obj, r\obj) + # + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x - 808.0 * RoomScale, 1.0, r\z - 72.0 * RoomScale, True) + # + #it = CreateItem("Dr. L's Burnt Note", "paper", r\x - 688.0 * RoomScale, 1.0, r\z - 16.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Dr L's Burnt Note", "paper", r\x - 808.0 * RoomScale, 1.0, r\z - 72.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("The Modular Site Project", "paper", r\x + 622.0*RoomScale, r\y + 125.0*RoomScale, r\z - 73.0*RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room2elevator" + #;[Block] + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x+888.0*RoomScale, 240.0*RoomScale, r\z, True) + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x+1024.0*RoomScale-0.01, 120.0*RoomScale, r\z, True) + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x + 448.0 * RoomScale, 0.0, r\z, 90, r, False, 3) + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x + 416.0 * RoomScale, EntityY(r\RoomDoors[0]\buttons[1],True), r\z - 208.0 * RoomScale,True) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 480.0 * RoomScale, EntityY(r\RoomDoors[0]\buttons[0],True), r\z + 184.0 * RoomScale,True) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True : r\RoomDoors[0]\locked = True + #;[End Block] + #Case "room2cafeteria" + #;[Block] + #;scp-294 + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x+1847.0*RoomScale, -240.0*RoomScale, r\z-321*RoomScale, True) + #;"spawnpoint" for the cups + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x+1780.0*RoomScale, -248.0*RoomScale, r\z-276*RoomScale, True) + # + #it = CreateItem("cup", "cup", r\x-508.0*RoomScale, -187*RoomScale, r\z+284.0*RoomScale, 240,175,70) + #EntityParent(it\collider, r\obj) : it\name = "Cup of Orange Juice" + # + #it = CreateItem("cup", "cup", r\x+1412 * RoomScale, -187*RoomScale, r\z-716.0 * RoomScale, 87,62,45) + #EntityParent(it\collider, r\obj) : it\name = "Cup of Coffee" + # + #it = CreateItem("Empty Cup", "emptycup", r\x-540*RoomScale, -187*RoomScale, r\z+124.0*RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Quarter", "25ct", r\x-447.0*RoomScale, r\y-334.0*RoomScale, r\z+36.0*RoomScale) + #EntityParent(it\collider, r\obj) + #it = CreateItem("Quarter", "25ct", r\x+1409.0*RoomScale, r\y-334.0*RoomScale, r\z-732.0*RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room2nuke" + #;[Block] + #;"tuulikaapin" ovi + #d = CreateDoor(r\zone, r\x + 576.0 * RoomScale, 0.0, r\z + 152.0 * RoomScale, 90, r, False, False, 5) + #d\AutoClose = False : d\open = False + #PositionEntity(d\buttons[0], r\x + 602.0 * RoomScale, EntityY(d\buttons[0],True), r\z + 20.0 * RoomScale,True) + #PositionEntity(d\buttons[1], r\x + 550.0 * RoomScale, EntityY(d\buttons[1],True), r\z + 20.0 * RoomScale,True) + #FreeEntity d\obj2 : d\obj2 = 0 + # + #d = CreateDoor(r\zone, r\x - 544.0 * RoomScale, 1504.0*RoomScale, r\z + 738.0 * RoomScale, 90, r, False, False, 5) + #d\AutoClose = False : d\open = False + #PositionEntity(d\buttons[0], EntityX(d\buttons[0],True), EntityY(d\buttons[0],True), r\z + 608.0 * RoomScale,True) + #PositionEntity(d\buttons[1], EntityX(d\buttons[1],True), EntityY(d\buttons[1],True), r\z + 608.0 * RoomScale,True) + # + #;yl�kerran hissin ovi + #r\RoomDoors[0] = CreateDoor(r\zone, r\x + 1192.0 * RoomScale, 0.0, r\z, 90, r, True, 3) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True + #;yl�kerran hissi + #r\Objects[4] = CreatePivot() + #PositionEntity(r\Objects[4], r\x + 1496.0 * RoomScale, 240.0 * RoomScale, r\z) + #EntityParent(r\Objects[4], r\obj) + #;alakerran hissin ovi + #r\RoomDoors[1] = CreateDoor(r\zone, r\x + 680.0 * RoomScale, 1504.0 * RoomScale, r\z, 90, r, False, 3) + #r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = False + #;alakerran hissi + #r\Objects[5] = CreatePivot() + #PositionEntity(r\Objects[5], r\x + 984.0 * RoomScale, 1744.0 * RoomScale, r\z) + #EntityParent(r\Objects[5], r\obj) + # + #For n% = 0 To 1 + #r\Objects[n * 2] = CopyEntity(LeverBaseOBJ) + #r\Objects[n * 2 + 1] = CopyEntity(LeverOBJ) + #r\Levers[n] = r\Objects[n * 2 + 1] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[n * 2 + i], 0.04, 0.04, 0.04) + #PositionEntity (r\Objects[n * 2 + i], r\x - 975.0 * RoomScale, r\y + 1712.0 * RoomScale, r\z - (502.0-132.0*n) * RoomScale, True) + # + #EntityParent(r\Objects[n * 2 + i], r\obj) + #Next + #RotateEntity(r\Objects[n * 2], 0, -90-180, 0) + #RotateEntity(r\Objects[n * 2 + 1], 10, -90 - 180-180, 0) + # + #;EntityPickMode(r\Objects[n * 2 + 1], 2) + #EntityPickMode r\Objects[n * 2 + 1], 1, False + #EntityRadius r\Objects[n * 2 + 1], 0.1 + #;makecollbox(r\Objects[n * 2 + 1]) + #Next + # + #it = CreateItem("Nuclear Device Document", "paper", r\x - 768.0 * RoomScale, r\y + 1684.0 * RoomScale, r\z - 768.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Ballistic Vest", "vest", r\x - 944.0 * RoomScale, r\y + 1652.0 * RoomScale, r\z - 656.0 * RoomScale) + #EntityParent(it\collider, r\obj) : RotateEntity(it\collider, 0, -90, 0) + # + #sc.SecurityCams = CreateSecurityCam(r\x+624.0*RoomScale, r\y+1888.0*RoomScale, r\z-312.0*RoomScale, r) + #sc\angle = 90 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 20, 0, 0) + # + #r\Objects[6] = CreatePivot() + #PositionEntity r\Objects[6],r\x+1110.0*RoomScale,r\y+36.0*RoomScale,r\z-208.0*RoomScale + #EntityParent r\Objects[6],r\obj + #;[End Block] + #Case "room2tunnel" + #;[Block] + #r\Objects[0] = CreatePivot() + #PositionEntity(r\Objects[0], r\x + 2640.0 * RoomScale, -2496.0 * RoomScale, r\z + 400.0 * RoomScale) + #EntityParent(r\Objects[0], r\obj) + # + #r\Objects[1] = CreatePivot() + #PositionEntity(r\Objects[1], r\x - 4336.0 * RoomScale, -2496.0 * RoomScale, r\z - 2512.0 * RoomScale) + #EntityParent(r\Objects[1], r\obj) + # + #r\Objects[2] = CreatePivot() + #RotateEntity r\Objects[2],0.0,180.0,0.0,True + #PositionEntity(r\Objects[2], r\x + 552.0 * RoomScale, 240.0 * RoomScale, r\z + 656.0 * RoomScale) + #EntityParent(r\Objects[2], r\obj) +#; + #r\Objects[4] = CreatePivot() + #PositionEntity(r\Objects[4], r\x - 552.0 * RoomScale, 240.0 * RoomScale, r\z - 656.0 * RoomScale) + #EntityParent(r\Objects[4], r\obj) +#; + #r\RoomDoors[0] = CreateDoor(r\zone, r\x + 264.0 * RoomScale, 0.0, r\z + 656.0 * RoomScale, 90, r, True, 3) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x + 224.0 * RoomScale, 0.7, r\z + 480.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 304.0 * RoomScale, 0.7, r\z + 832.0 * RoomScale, True) + # + #r\RoomDoors[2] = CreateDoor(r\zone, r\x - 264.0 * RoomScale, 0.0, r\z - 656.0 * RoomScale, 90, r, True, 3) + #r\RoomDoors[2]\AutoClose = False : r\RoomDoors[2]\open = True + #PositionEntity(r\RoomDoors[2]\buttons[0], r\x - 224.0 * RoomScale, 0.7, r\z - 480.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[2]\buttons[1], r\x - 304.0 * RoomScale, 0.7, r\z - 832.0 * RoomScale, True) +#; + #temp = ((Int(AccessCode)*3) Mod 10000) + #If temp < 1000 Then temp = temp+1000 + #d.Doors = CreateDoor(0, r\x,r\y,r\z,0, r, False, True, False, temp) + #PositionEntity(d\buttons[0], r\x + 224.0 * RoomScale, r\y + 0.7, r\z - 384.0 * RoomScale, True) + #RotateEntity (d\buttons[0], 0,-90,0,True) + #PositionEntity(d\buttons[1], r\x - 224.0 * RoomScale, r\y + 0.7, r\z + 384.0 * RoomScale, True) + #RotateEntity (d\buttons[1], 0,90,0,True) + # + #de.Decals = CreateDecal(0, r\x + 64.0 * RoomScale, 0.005, r\z + 144.0 * RoomScale, 90, Rand(360), 0) + #EntityParent(de\obj, r\obj) + #it = CreateItem("Scorched Note", "paper", r\x + 64.0 * RoomScale, r\y +144.0 * RoomScale, r\z - 384.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "008" + #;[Block] + #;the container + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x + 292.0 * RoomScale, 130.0*RoomScale, r\z + 516.0 * RoomScale, True) + # + #;the lid of the container + #r\Objects[1] = LoadMesh_Strict("GFX\map\008_2.b3d") + #ScaleEntity r\Objects[1], RoomScale, RoomScale, RoomScale + #PositionEntity(r\Objects[1], r\x + 292 * RoomScale, 151 * RoomScale, r\z + 576.0 * RoomScale, 0) + #EntityParent(r\Objects[1], r\obj) + # + #RotateEntity(r\Objects[1],89,0,0,True) + # + #r\Levers[0] = r\Objects[1] + # + #Glasstex = LoadTexture_Strict("GFX\map\glass.png",1+2) + #r\Objects[2] = CreateSprite() + #EntityTexture(r\Objects[2],Glasstex) + #SpriteViewMode(r\Objects[2],2) + #ScaleSprite(r\Objects[2],256.0*RoomScale*0.5, 194.0*RoomScale*0.5) + #PositionEntity(r\Objects[2], r\x - 176.0 * RoomScale, 224.0*RoomScale, r\z + 448.0 * RoomScale) + #TurnEntity(r\Objects[2],0,90,0) + #EntityParent(r\Objects[2], r\obj) + # + #FreeTexture Glasstex + # + #;scp-173 spawnpoint + #r\Objects[3] = CreatePivot(r\obj) + #PositionEntity(r\Objects[3], r\x - 445.0 * RoomScale, 120.0*RoomScale, r\z + 544.0 * RoomScale, True) + # + #;scp-173 attack point + #r\Objects[4] = CreatePivot(r\obj) + #PositionEntity(r\Objects[4], r\x + 67.0 * RoomScale, 120.0*RoomScale, r\z + 464.0 * RoomScale, True) + # + #r\Objects[5] = CreateSprite() + #PositionEntity(r\Objects[5], r\x - 158 * RoomScale, 368 * RoomScale, r\z + 298.0 * RoomScale) + #ScaleSprite(r\Objects[5], 0.02, 0.02) + #EntityTexture(r\Objects[5], LightSpriteTex(1)) + #EntityBlend (r\Objects[5], 3) + #EntityParent(r\Objects[5], r\obj) + #HideEntity r\Objects[5] + # + #d = CreateDoor(r\zone, r\x + 296.0 * RoomScale, 0, r\z - 672.0 * RoomScale, 180, r, True, 0, 4) + #d\AutoClose = False + #PositionEntity (d\buttons[1], r\x + 164.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + #FreeEntity d\buttons[0] : d\buttons[0]=0 + #FreeEntity d\obj2 : d\obj2=0 + #r\RoomDoors[0] = d + # + #d2 = CreateDoor(r\zone, r\x + 296.0 * RoomScale, 0, r\z - 144.0 * RoomScale, 0, r, False) + #d2\AutoClose = False + #PositionEntity (d2\buttons[0], r\x + 432.0 * RoomScale, EntityY(d2\buttons[0],True), r\z - 480.0 * RoomScale, True) + #RotateEntity(d2\buttons[0], 0, -90, 0, True) + #PositionEntity (d2\buttons[1], r\x + 164.0 * RoomScale, EntityY(d2\buttons[0],True), r\z - 128.0 * RoomScale, True) + #FreeEntity d2\obj2 : d2\obj2=0 + #r\RoomDoors[1] = d2 + # + #d\LinkedDoor = d2 + #d2\LinkedDoor = d + # + #d = CreateDoor(r\zone, r\x - 384.0 * RoomScale, 0, r\z - 672.0 * RoomScale, 0, r, False, 0, 4) + #d\AutoClose = False : d\locked = True : r\RoomDoors[2]=d + # + # + #it = CreateItem("Hazmat Suit", "hazmatsuit", r\x - 76.0 * RoomScale, 0.5, r\z - 396.0 * RoomScale) + #EntityParent(it\collider, r\obj) : RotateEntity(it\collider, 0, 90, 0) + # + #it = CreateItem("Document SCP-008", "paper", r\x - 245.0 * RoomScale, r\y + 192.0 * RoomScale, r\z + 368.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #;spawnpoint for the scientist used in the "008 zombie scene" + #r\Objects[6] = CreatePivot(r\obj) + #PositionEntity(r\Objects[6], r\x + 160 * RoomScale, 672 * RoomScale, r\z - 384.0 * RoomScale, True) + #;spawnpoint for the player + #r\Objects[7] = CreatePivot(r\obj) + #PositionEntity(r\Objects[7], r\x, 672 * RoomScale, r\z + 352.0 * RoomScale, True) + # + #sc.SecurityCams = CreateSecurityCam(r\x+578.956*RoomScale, r\y+444.956*RoomScale, r\z+772.0*RoomScale, r) + #sc\angle = 135 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 20, 0, 0) + #;[End Block] + #Case "room035" + #;[Block] + #d = CreateDoor(r\zone, r\x - 296.0 * RoomScale, 0, r\z - 672.0 * RoomScale, 180, r, True, 0, 5) + #d\AutoClose = False : d\locked = True : r\RoomDoors[0]=d + #PositionEntity (d\buttons[1], r\x - 164.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + #FreeEntity d\buttons[0] : d\buttons[0]=0 + #FreeEntity d\obj2 : d\obj2=0 + # + #d2 = CreateDoor(r\zone, r\x - 296.0 * RoomScale, 0, r\z - 144.0 * RoomScale, 0, r, False) + #d2\AutoClose = False : d2\locked = True : r\RoomDoors[1]=d2 + #PositionEntity (d2\buttons[0], r\x - 432.0 * RoomScale, EntityY(d2\buttons[0],True), r\z - 480.0 * RoomScale, True) + #RotateEntity(d2\buttons[0], 0, 90, 0, True) + #FreeEntity d2\buttons[1] : d2\buttons[1]=0 + #FreeEntity d2\obj2 : d2\obj2=0 + # + #;door to the control room + #r\RoomDoors[2] = CreateDoor(r\zone, r\x + 384.0 * RoomScale, 0, r\z - 672.0 * RoomScale, 180, r, False, 0, 5) + #r\RoomDoors[2]\AutoClose = False + # + #;door to the storage room + #r\RoomDoors[3] = CreateDoor(0, r\x + 768.0 * RoomScale, 0, r\z +512.0 * RoomScale, 90, r, False, 0, 0, "5731") + #r\RoomDoors[3]\AutoClose = False + # + #d\LinkedDoor = d2 : d2\LinkedDoor = d + # + #For i = 0 To 1 + #r\Objects[i*2] = CopyEntity(LeverBaseOBJ) + #r\Objects[i*2+1] = CopyEntity(LeverOBJ) + # + #r\Levers[i] = r\Objects[i*2+1] + # + #For n% = 0 To 1 + #ScaleEntity(r\Objects[i*2+n], 0.04, 0.04, 0.04) + #PositionEntity (r\Objects[i*2+n], r\x + 210.0 * RoomScale, r\y + 224.0 * RoomScale, r\z - (208-i*76) * RoomScale, True) + # + #EntityParent(r\Objects[i*2+n], r\obj) + #Next + # + #RotateEntity(r\Objects[i*2], 0, -90-180, 0) + #RotateEntity(r\Objects[i*2+1], -80, -90, 0) + # + #EntityPickMode r\Objects[i*2+1], 1, False + #EntityRadius r\Objects[i*2+1], 0.1 + #Next + # + #;the control room + #r\Objects[3] = CreatePivot(r\obj) + #PositionEntity(r\Objects[3], r\x + 456 * RoomScale, 0.5, r\z + 400.0 * RoomScale, True) + # + #r\Objects[4] = CreatePivot(r\obj) + #PositionEntity(r\Objects[4], r\x - 576 * RoomScale, 0.5, r\z + 640.0 * RoomScale, True) + # + #For i = 0 To 1 + #em.Emitters = CreateEmitter(r\x - 272.0 * RoomScale, 10, r\z + (624.0-i*512) * RoomScale, 0) + #TurnEntity(em\Obj, 90, 0, 0, True) + #EntityParent(em\Obj, r\obj) + #em\RandAngle = 15 + #em\Speed = 0.05 + #em\SizeChange = 0.007 + #em\Achange = -0.006 + #em\Gravity = -0.24 + # + #r\Objects[5+i]=em\Obj + #Next + # + #;the corners of the cont chamber (needed to calculate whether the player is inside the chamber) + #r\Objects[7] = CreatePivot(r\obj) + #PositionEntity(r\Objects[7], r\x - 720 * RoomScale, 0.5, r\z + 880.0 * RoomScale, True) + #r\Objects[8] = CreatePivot(r\obj) + #PositionEntity(r\Objects[8], r\x + 176 * RoomScale, 0.5, r\z - 144.0 * RoomScale, True) + # + #it = CreateItem("SCP-035 Addendum", "paper", r\x + 248.0 * RoomScale, r\y + 220.0 * RoomScale, r\z + 576.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Radio Transceiver", "radio", r\x - 544.0 * RoomScale, 0.5, r\z + 704.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("SCP-500-01", "scp500", r\x + 1168*RoomScale, 224*RoomScale, r\z+576*RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Metal Panel", "scp148", r\x - 360 * RoomScale, 0.5, r\z + 644 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Document SCP-035", "paper", r\x + 1168.0 * RoomScale, 104.0 * RoomScale, r\z + 608.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room513" + #;[Block] + #d = CreateDoor(r\zone, r\x - 704.0 * RoomScale, 0, r\z + 304.0 * RoomScale, 0, r, False, 0, 2) + #d\AutoClose = False ;: d\buttons[0] = False + #PositionEntity (d\buttons[0], EntityX(d\buttons[0],True), EntityY(d\buttons[0],True), r\z + 288.0 * RoomScale, True) + #PositionEntity (d\buttons[1], EntityX(d\buttons[1],True), EntityY(d\buttons[1],True), r\z + 320.0 * RoomScale, True) + # + #sc.SecurityCams = CreateSecurityCam(r\x-312.0 * RoomScale, r\y + 414*RoomScale, r\z + 656*RoomScale, r) + #sc\FollowPlayer = True + # + #it = CreateItem("SCP-513", "scp513", r\x - 32.0 * RoomScale, r\y + 196.0 * RoomScale, r\z + 688.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Blood-stained Note", "paper", r\x + 736.0 * RoomScale,1.0, r\z + 48.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Document SCP-513", "paper", r\x - 480.0 * RoomScale, 104.0*RoomScale, r\z - 176.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room966" + #;[Block] + #d = CreateDoor(r\zone, r\x - 400.0 * RoomScale, 0, r\z, -90, r, False, False, 3) + #d = CreateDoor(r\zone, r\x, 0, r\z - 480.0 * RoomScale, 180, r, False, False, 3) + #;: d\buttons[0] = False + #;PositionEntity (d\buttons[0], EntityX(d\buttons[0],True), EntityY(d\buttons[0],True), r\z + 288.0 * RoomScale, True) + #;PositionEntity (d\buttons[1], EntityX(d\buttons[1],True), EntityY(d\buttons[1],True), r\z + 320.0 * RoomScale, True) + # + #sc.SecurityCams = CreateSecurityCam(r\x-312.0 * RoomScale, r\y + 414*RoomScale, r\z + 656*RoomScale, r) + #sc\angle = 225 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 20, 0, 0) + #;sc\FollowPlayer = True + # + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x, 0.5, r\z + 512.0 * RoomScale, True) + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x + 64.0 * RoomScale, 0.5, r\z - 640.0 * RoomScale, True) + # + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity(r\Objects[2], r\x, 0.5, r\z, True) + # + #r\Objects[3] = CreatePivot(r\obj) + #PositionEntity(r\Objects[3], r\x + 320.0 * RoomScale, 0.5, r\z + 704.0 * RoomScale, True) + # + #it = CreateItem("Night Vision Goggles", "nvgoggles", r\x + 320.0 * RoomScale, 0.5, r\z + 704.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #it\state = 300 + # + #;[End Block] + #Case "room3storage" + #;[Block] + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x, 240.0 * RoomScale, r\z + 752.0 * RoomScale, True) + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x + 5840.0 * RoomScale, -5392.0 * RoomScale, r\z + 1360.0 * RoomScale, True) + # + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity(r\Objects[2], r\x + 608.0 * RoomScale, 240.0 * RoomScale, r\z - 624.0 * RoomScale, True) + # + #r\Objects[3] = CreatePivot(r\obj) + #;PositionEntity(r\Objects[3], r\x + 720.0 * RoomScale, -5392.0 * RoomScale, r\z + 752.0 * RoomScale, True) + #PositionEntity(r\Objects[3], r\x - 456.0 * RoomScale, -5392.0 * RoomScale, r\z - 1136 * RoomScale, True) + # + #;"waypoints" # 1 + #r\Objects[4] = CreatePivot(r\obj) + #PositionEntity(r\Objects[4], r\x + 2128.0 * RoomScale, -5550.0 * RoomScale, r\z + 2048.0 * RoomScale, True) + # + #r\Objects[5] = CreatePivot(r\obj) + #PositionEntity(r\Objects[5], r\x + 2128.0 * RoomScale, -5550.0 * RoomScale, r\z - 1136.0 * RoomScale, True) + # + #r\Objects[6] = CreatePivot(r\obj) + #PositionEntity(r\Objects[6], r\x + 3824.0 * RoomScale, -5550.0 * RoomScale, r\z - 1168.0 * RoomScale, True) + # + #r\Objects[7] = CreatePivot(r\obj) + #PositionEntity(r\Objects[7], r\x + 3760.0 * RoomScale, -5550.0 * RoomScale, r\z + 2048.0 * RoomScale, True) + # + #r\Objects[8] = CreatePivot(r\obj) + #PositionEntity(r\Objects[8], r\x + 4848.0 * RoomScale, -5550.0 * RoomScale, r\z + 112.0 * RoomScale, True) + # + #;"waypoints" # 2 + #r\Objects[9] = CreatePivot(r\obj) + #PositionEntity(r\Objects[9], r\x + 592.0 * RoomScale, -5550.0 * RoomScale, r\z + 6352.0 * RoomScale, True) + # + #r\Objects[10] = CreatePivot(r\obj) + #PositionEntity(r\Objects[10], r\x + 2928.0 * RoomScale, -5550.0 * RoomScale, r\z + 6352.0 * RoomScale, True) + # + #r\Objects[11] = CreatePivot(r\obj) + #PositionEntity(r\Objects[11], r\x + 2928.0 * RoomScale, -5550.0 * RoomScale, r\z + 5200.0 * RoomScale, True) + # + #r\Objects[12] = CreatePivot(r\obj) + #PositionEntity(r\Objects[12], r\x + 592.0 * RoomScale, -5550.0 * RoomScale, r\z + 5200.0 * RoomScale, True) + # + #;"waypoints" # 3 + #r\Objects[13] = CreatePivot(r\obj) + #PositionEntity(r\Objects[13], r\x + 1136.0 * RoomScale, -5550.0 * RoomScale, r\z + 2944.0 * RoomScale, True) + # + #r\Objects[14] = CreatePivot(r\obj) + #PositionEntity(r\Objects[14], r\x + 1104.0 * RoomScale, -5550.0 * RoomScale, r\z + 1184.0 * RoomScale, True) + # + #r\Objects[15] = CreatePivot(r\obj) + #PositionEntity(r\Objects[15], r\x - 464.0 * RoomScale, -5550.0 * RoomScale, r\z + 1216.0 * RoomScale, True) + # + #r\Objects[16] = CreatePivot(r\obj) + #PositionEntity(r\Objects[16], r\x - 432.0 * RoomScale, -5550.0 * RoomScale, r\z + 2976.0 * RoomScale, True) + # + #r\Objects[20] = LoadMesh_Strict("GFX\map\room3storage_hb.b3d",r\obj) + #EntityPickMode r\Objects[20],2 + #EntityType r\Objects[20],HIT_MAP + #EntityAlpha r\Objects[20],0.0 + # + #;Doors + #r\RoomDoors[0] = CreateDoor(r\zone, r\x, 0.0, r\z + 448.0 * RoomScale, 0, r, True, 3) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x - 160.0 * RoomScale, 0.7, r\z + 480.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 160.0 * RoomScale, 0.7, r\z + 416.0 * RoomScale, True) + # + #r\RoomDoors[1] = CreateDoor(r\zone, r\x + 5840.0 * RoomScale, -5632.0 * RoomScale, r\z + 1048.0 * RoomScale, 0, r, False, 3) + #r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = False + #PositionEntity(r\RoomDoors[1]\buttons[0], r\x + 6000.0 * RoomScale, EntityY(r\RoomDoors[1]\buttons[0],True), r\z + 1008.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[1]\buttons[1], r\x + 5680.0 * RoomScale, EntityY(r\RoomDoors[1]\buttons[1],True), r\z + 1088.0 * RoomScale, True) + # + #r\RoomDoors[2] = CreateDoor(r\zone, r\x + 608.0 * RoomScale, 0.0, r\z - 312.0 * RoomScale, 0, r, True, 3) + #r\RoomDoors[2]\AutoClose = False : r\RoomDoors[2]\open = True + #PositionEntity(r\RoomDoors[2]\buttons[1], r\x + 448.0 * RoomScale, 0.7, r\z - 272.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[2]\buttons[0], r\x + 768.0 * RoomScale, 0.7, r\z - 352.0 * RoomScale, True) + # + #;r\RoomDoors[3] = CreateDoor(r\zone, r\x + 720.0 * RoomScale, -5632.0 * RoomScale, r\z + 1064.0 * RoomScale, 0, r, False) + #;PositionEntity(r\RoomDoors[3]\buttons[0], r\x + 896.0 * RoomScale, EntityY(r\RoomDoors[3]\buttons[0],True), r\z + 1024.0 * RoomScale, True) + #;PositionEntity(r\RoomDoors[3]\buttons[1], r\x + 544.0 * RoomScale, EntityY(r\RoomDoors[3]\buttons[1],True), r\z + 1104.0 * RoomScale, True) + #r\RoomDoors[3] = CreateDoor(r\zone, r\x - 456.0 * RoomScale, -5632.0 * RoomScale, r\z - 824.0 * RoomScale, 0, r, False, 3) + #r\RoomDoors[3]\AutoClose = False : r\RoomDoors[3]\open = False + #;X=+176 | Z=-40 + #PositionEntity r\RoomDoors[3]\buttons[0], r\x - 280.0*RoomScale, EntityY(r\RoomDoors[3]\buttons[0],True), r\z - 864.0 * RoomScale, True + #;X=-176 | Z=+40 + #PositionEntity r\RoomDoors[3]\buttons[1], r\x - 632.0*RoomScale, EntityY(r\RoomDoors[3]\buttons[1],True), r\z - 784.0 * RoomScale, True + # + #em.Emitters = CreateEmitter(r\x + 5218.0 * RoomScale, -5584.0*RoomScale, r\z - 600* RoomScale, 0) + #TurnEntity(em\Obj, 20, -100, 0, True) + #EntityParent(em\Obj, r\obj) : em\Room = r + #em\RandAngle = 15 : em\Speed = 0.03 + #em\SizeChange = 0.01 : em\Achange = -0.006 + #em\Gravity = -0.2 + # + #Select Rand(3) + #Case 1 + #x# = 2312 + #z#=-952 + #Case 2 + #x# = 3032 + #z#=1288 + #Case 3 + #x# = 2824 + #z#=2808 + #End Select + # + #it.Items = CreateItem("Black Severed Hand", "hand2", r\x + x*RoomScale, -5596.0*RoomScale+1.0, r\z+z*RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Night Vision Goggles", "nvgoggles", r\x + 1936.0 * RoomScale, r\y - 5496.0 * RoomScale, r\z - 944.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #it\state = 450 + # + #de.Decals = CreateDecal(3, r\x + x*RoomScale, -5632.0*RoomScale+0.01, r\z+z*RoomScale,90,Rnd(360),0) + #de\Size = 0.5 + #ScaleSprite(de\obj, de\Size,de\Size) + #EntityParent de\obj, r\obj + # + #;Objects [20],[21],[22],[23] + #For n% = 10 To 11 + #r\Objects[n * 2] = CopyEntity(LeverBaseOBJ) + #r\Objects[n * 2 + 1] = CopyEntity(LeverOBJ) + # + #r\Levers[n-10] = r\Objects[n * 2 + 1] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[n * 2 + i], 0.04, 0.04, 0.04) + #If n% = 10 + #;r\z+6578 + #PositionEntity r\Objects[n * 2 + i],r\x+3101*RoomScale,r\y-5461*RoomScale,r\z+6568*RoomScale,True + #Else + #;r\z+3174 + #PositionEntity r\Objects[n * 2 + i],r\x+1209*RoomScale,r\y-5461*RoomScale,r\z+3164*RoomScale,True + #EndIf + # + #EntityParent(r\Objects[n * 2 + i], r\obj) + #Next + #RotateEntity(r\Objects[n * 2], 0, 0, 0) + #RotateEntity(r\Objects[n * 2 + 1], -10, 0 - 180, 0) + # + #EntityPickMode r\Objects[n * 2 + 1], 1, False + #EntityRadius r\Objects[n * 2 + 1], 0.1 + #Next + # + #r\RoomDoors[4] = CreateDoor(r\zone,r\x+56*RoomScale,r\y-5632*RoomScale,r\z+6344*RoomScale,90,r,False,2) + #r\RoomDoors[4]\AutoClose = False : r\RoomDoors[4]\open = False + #For i = 0 To 1 + #FreeEntity r\RoomDoors[4]\buttons[i] : r\RoomDoors[4]\buttons[i] = 0 + #Next + # + #d = CreateDoor(r\zone,r\x+1157.0*RoomScale,r\y-5632.0*RoomScale,r\z+660.0*RoomScale,0,r,False,2) + #d\locked = True : d\open = False : d\AutoClose = False + #For i = 0 To 1 + #FreeEntity d\buttons[i] : d\buttons[i]=0 + #Next + # + #d = CreateDoor(r\zone,r\x+234.0*RoomScale,r\y-5632.0*RoomScale,r\z+5239.0*RoomScale,90,r,False,2) + #d\locked = True : d\open = False : d\AutoClose = False + #For i = 0 To 1 + #FreeEntity d\buttons[i] : d\buttons[i]=0 + #Next + # + #d = CreateDoor(r\zone,r\x+3446.0*RoomScale,r\y-5632.0*RoomScale,r\z+6369.0*RoomScale,90,r,False,2) + #d\locked = True : d\open = False : d\AutoClose = False + #For i = 0 To 1 + #FreeEntity d\buttons[i] : d\buttons[i]=0 + #Next + #;[End Block] + #Case "room049" + #;[Block] + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x + 640.0 * RoomScale, 240.0 * RoomScale, r\z + 656.0 * RoomScale, True) + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x + 3211.0 * RoomScale, -3280.0 * RoomScale, r\z + 1824.0 * RoomScale, True) + # + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity(r\Objects[2], r\x - 672.0 * RoomScale, 240.0 * RoomScale, r\z - 93.0 * RoomScale, True) + # + #r\Objects[3] = CreatePivot(r\obj) + #PositionEntity(r\Objects[3], r\x - 2766.0 * RoomScale, -3280.0 * RoomScale, r\z - 1277.0 * RoomScale, True) + # + #;zombie 1 + #r\Objects[4] = CreatePivot(r\obj) + #PositionEntity(r\Objects[4], r\x + 528.0 * RoomScale, -3440.0 * RoomScale, r\z + 96.0 * RoomScale, True) + #;zombie 2 + #r\Objects[5] = CreatePivot(r\obj) + #PositionEntity(r\Objects[5], r\x + 64.0 * RoomScale, -3440.0 * RoomScale, r\z - 1000.0 * RoomScale, True) + # + #For n% = 0 To 1 + #r\Objects[n * 2 + 6] = CopyEntity(LeverBaseOBJ) + #r\Objects[n * 2 + 7] = CopyEntity(LeverOBJ) + # + #r\Levers[n] = r\Objects[n * 2 + 7] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[n * 2 + 6 + i], 0.03, 0.03, 0.03) + # + #Select n + #Case 0 ;power feed + #PositionEntity (r\Objects[n * 2 + 6 + i], r\x + 852.0 * RoomScale, r\y - 3374.0 * RoomScale, r\z - 854.0 * RoomScale, True) + # + #Case 1 ;generator + #PositionEntity (r\Objects[n * 2 + 6 + i], r\x - 834.0 * RoomScale, r\y - 3400.0 * RoomScale, r\z + 1093.0 * RoomScale, True) + # + #End Select + # + #EntityParent(r\Objects[n * 2 + 6 + i], r\obj) + #Next + # + #RotateEntity(r\Objects[n*2+6], 0, 180+90*(Not n), 0) + #RotateEntity(r\Objects[n*2+7], 81-92*n, 90*(Not n), 0) + # + #EntityPickMode r\Objects[n * 2 + 7], 1, False + #EntityRadius r\Objects[n * 2 + 7], 0.1 + #Next + # + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x + 330.0 * RoomScale, 0.0, r\z + 656.0 * RoomScale, 90, r, True, 3) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x + 288.0 * RoomScale, 0.7, r\z + 512.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 368.0 * RoomScale, 0.7, r\z + 840.0 * RoomScale, True) + # + #r\RoomDoors[1] = CreateDoor(r\zone, r\x + 2898.0 * RoomScale, -3520.0 * RoomScale, r\z + 1824.0 * RoomScale, 90, r, False, 3) + #r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = False + #PositionEntity(r\RoomDoors[1]\buttons[1], r\x + 2881.0 * RoomScale, EntityY(r\RoomDoors[1]\buttons[1],True), r\z + 1663.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[1]\buttons[0], r\x + 2936.0 * RoomScale, EntityY(r\RoomDoors[1]\buttons[0],True), r\z + 2009.0 * RoomScale, True) + # + #r\RoomDoors[2] = CreateDoor(r\zone, r\x - 672.0 * RoomScale, 0.0, r\z - 408.0 * RoomScale, 0, r, True, 3) + #r\RoomDoors[2]\AutoClose = False : r\RoomDoors[2]\open = True + #PositionEntity(r\RoomDoors[2]\buttons[0], r\x - 487.0 * RoomScale, 0.7, r\z - 447.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[2]\buttons[1], r\x - 857.0 * RoomScale, 0.7, r\z - 369.0 * RoomScale, True) + # + #r\RoomDoors[3] = CreateDoor(r\zone, r\x - 2766.0 * RoomScale, -3520.0 * RoomScale, r\z - 1592.0 * RoomScale, 0, r, False, 3) + #r\RoomDoors[3]\AutoClose = False : r\RoomDoors[3]\open = False + #PositionEntity(r\RoomDoors[3]\buttons[0], r\x - 2581.0 * RoomScale, EntityY(r\RoomDoors[3]\buttons[0],True), r\z - 1631.0 * RoomScale, True) + #PositionEntity(r\RoomDoors[3]\buttons[1], r\x - 2951.0 * RoomScale, EntityY(r\RoomDoors[3]\buttons[1],True), r\z - 1553.0 * RoomScale, True) + # + #;For i = 0 To 3 + #; If (i Mod 2) = 1 + #; AssignElevatorObj(r\Objects[i],r\RoomDoors[i],2) + #; Else + #; AssignElevatorObj(r\Objects[i],r\RoomDoors[i],True) + #; EndIf + #;Next + # + #;storage room doors + #r\RoomDoors[4] = CreateDoor(r\zone, r\x + 272.0 * RoomScale, -3552.0 * RoomScale, r\z + 104.0 * RoomScale, 90, r, False) + #r\RoomDoors[4]\AutoClose = False : r\RoomDoors[4]\open = True : r\RoomDoors[4]\locked = True + #r\RoomDoors[5] = CreateDoor(r\zone, r\x + 264.0 * RoomScale, -3520.0 * RoomScale, r\z - 1824.0 * RoomScale, 90, r, False) + #r\RoomDoors[5]\AutoClose = False : r\RoomDoors[5]\open = True : r\RoomDoors[5]\locked = True + #r\RoomDoors[6] = CreateDoor(r\zone, r\x - 264.0 * RoomScale, -3520.0 * RoomScale, r\z + 1824.0 * RoomScale, 90, r, False) + #r\RoomDoors[6]\AutoClose = False : r\RoomDoors[6]\open = True : r\RoomDoors[6]\locked = True + # + #d.Doors = CreateDoor(0, r\x,0,r\z, 0, r, False, 2, -2) + # + #it = CreateItem("Document SCP-049", "paper", r\x - 608.0 * RoomScale, r\y - 3332.0 * RoomScale, r\z + 876.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Level 4 Key Card", "key4", r\x - 512.0 * RoomScale, r\y - 3412.0 * RoomScale, r\z + 864.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("First Aid Kit", "firstaid", r\x +385.0 * RoomScale, r\y - 3412.0 * RoomScale, r\z + 271.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #d = CreateDoor(r\zone,r\x-272.0*RoomScale,r\y-3552.0*RoomScale,r\z+98.0*RoomScale,90,r,True,True) + #d\AutoClose = False : d\open = True : d\MTFClose = False : d\locked = True + #For i = 0 To 1 + #FreeEntity(d\buttons[i]) : d\buttons[i]=0 + #Next + # + #d = CreateDoor(r\zone,r\x-2990.0*RoomScale,r\y-3520.0*RoomScale,r\z-1824.0*RoomScale,90,r,False,2) + #d\locked = True : d\DisableWaypoint = True + #d = CreateDoor(r\zone,r\x-896.0*RoomScale,r\y,r\z-640*RoomScale,90,r,False,2) + #d\locked = True : d\DisableWaypoint = True + # + #r\Objects[10] = CreatePivot(r\obj) + #PositionEntity r\Objects[10],r\x-832.0*RoomScale,r\y-3484.0*RoomScale,r\z+1572.0*RoomScale,True + # + #;Spawnpoint for the map layout document + #r\Objects[11] = CreatePivot(r\obj) + #PositionEntity r\Objects[11],r\x+2642.0*RoomScale,r\y-3516.0*RoomScale,r\z+1822.0*RoomScale,True + #r\Objects[12] = CreatePivot(r\obj) + #PositionEntity r\Objects[12],r\x-2666.0*RoomScale,r\y-3516.0*RoomScale,r\z-1792.0*RoomScale,True + #;[End Block] + #Case "room2_2" + #;[Block] + #For r2.Rooms = Each Rooms + #If r2<>r Then + #If r2\RoomTemplate\Name = "room2_2" Then + #r\Objects[0] = CopyEntity(r2\Objects[0]) ;don't load the mesh again + #Exit + #EndIf + #EndIf + #Next + #If r\Objects[0]=0 Then r\Objects[0] = LoadMesh_Strict("GFX\map\fan.b3d") + #ScaleEntity r\Objects[0], RoomScale, RoomScale, RoomScale + #PositionEntity(r\Objects[0], r\x - 248 * RoomScale, 528 * RoomScale, r\z, 0) + #EntityParent(r\Objects[0], r\obj) + #;[End Block] + #Case "room012" + #;[Block] + #d.Doors = CreateDoor(r\zone, r\x + 264.0 * RoomScale, 0.0, r\z + 672.0 * RoomScale, 270, r, False, False, 3) + #PositionEntity(d\buttons[0], r\x + 224.0 * RoomScale, EntityY(d\buttons[0],True), r\z + 540.0 * RoomScale, True) + #PositionEntity(d\buttons[1], r\x + 304.0 * RoomScale, EntityY(d\buttons[1],True), r\z + 840.0 * RoomScale, True) + #TurnEntity d\buttons[1],0,0,0,True + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x -512.0 * RoomScale, -768.0*RoomScale, r\z -336.0 * RoomScale, 0, r, False, False) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = False : r\RoomDoors[0]\locked = True + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 176.0 * RoomScale, -512.0*RoomScale, r\z - 364.0 * RoomScale, True) + #FreeEntity r\RoomDoors[0]\buttons[1] : r\RoomDoors[0]\buttons[1]=0 + # + #r\Objects[0] = CopyEntity(LeverBaseOBJ) + #r\Objects[1] = CopyEntity(LeverOBJ) + # + #r\Levers[0] = r\Objects[1] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[i], 0.04, 0.04, 0.04) + #PositionEntity (r\Objects[i], r\x + 240.0 * RoomScale, r\y - 512.0 * RoomScale, r\z - 364 * RoomScale, True) + # + #EntityParent(r\Objects[i], r\obj) + #Next + #;RotateEntity(r\Objects[0], 0, 0, 0) + #RotateEntity(r\Objects[1], 10, -180, 0) + # + #EntityPickMode r\Objects[1], 1, False + #EntityRadius r\Objects[1], 0.1 + # + #r\Objects[2] = LoadMesh_Strict("GFX\map\room012_2.b3d") + #ScaleEntity r\Objects[2], RoomScale, RoomScale, RoomScale + #PositionEntity(r\Objects[2], r\x - 360 * RoomScale, - 130 * RoomScale, r\z + 456.0 * RoomScale, 0) + #EntityParent(r\Objects[2], r\obj) + # + #r\Objects[3] = CreateSprite() + #PositionEntity(r\Objects[3], r\x - 43.5 * RoomScale, - 574 * RoomScale, r\z - 362.0 * RoomScale) + #ScaleSprite(r\Objects[3], 0.015, 0.015) + #EntityTexture(r\Objects[3], LightSpriteTex(1)) + #EntityBlend (r\Objects[3], 3) + #EntityParent(r\Objects[3], r\obj) + #HideEntity r\Objects[3] + # + #r\Objects[4] = LoadMesh_Strict("GFX\map\room012_3.b3d") + #tex=LoadTexture_Strict("GFX\map\scp-012_0.jpg") + #EntityTexture r\Objects[4],tex, 0,1 + #ScaleEntity r\Objects[4], RoomScale, RoomScale, RoomScale + #PositionEntity(r\Objects[4], r\x - 360 * RoomScale, - 130 * RoomScale, r\z + 456.0 * RoomScale, 0) + #EntityParent(r\Objects[4], r\Objects[2]) + # + #it = CreateItem("Document SCP-012", "paper", r\x - 56.0 * RoomScale, r\y - 576.0 * RoomScale, r\z - 408.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it.Items = CreateItem("Severed Hand", "hand", r\x - 784*RoomScale, -576*RoomScale+0.3, r\z+640*RoomScale) + #EntityParent(it\collider, r\obj) + # + #de.Decals = CreateDecal(3, r\x - 784*RoomScale, -768*RoomScale+0.01, r\z+640*RoomScale,90,Rnd(360),0) + #de\Size = 0.5 + #ScaleSprite(de\obj, de\Size,de\Size) + #EntityParent de\obj, r\obj + #;[End Block] + #Case "tunnel2" + #;[Block] + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x, 544.0 * RoomScale, r\z + 512.0 * RoomScale, True) + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x, 544.0 * RoomScale, r\z - 512.0 * RoomScale, True) + #;[End Block] + #Case "room2pipes" + #;[Block] + #r\Objects[0]= CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x + 368.0 * RoomScale, 0.0, r\z, True) + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x - 368.0 * RoomScale, 0.0, r\z, True) + # + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity(r\Objects[2], r\x + 224.0 * RoomScale - 0.005, 192.0 * RoomScale, r\z, True) + # + #r\Objects[3] = CreatePivot(r\obj) + #PositionEntity(r\Objects[3], r\x - 224.0 * RoomScale + 0.005, 192.0 * RoomScale, r\z, True) + #;[End Block] + #Case "room3pit" + #;[Block] + #em.Emitters = CreateEmitter(r\x + 512.0 * RoomScale, -76 * RoomScale, r\z - 688 * RoomScale, 0) + #TurnEntity(em\Obj, -90, 0, 0) + #EntityParent(em\Obj, r\obj) + #em\RandAngle = 55 + #em\Speed = 0.0005 + #em\Achange = -0.015 + #em\SizeChange = 0.007 + # + #em.Emitters = CreateEmitter(r\x - 512.0 * RoomScale, -76 * RoomScale, r\z - 688 * RoomScale, 0) + #TurnEntity(em\Obj, -90, 0, 0) + #EntityParent(em\Obj, r\obj) + #em\RandAngle = 55 + #em\Speed = 0.0005 + #em\Achange = -0.015 + #em\SizeChange = 0.007 + # + #r\Objects[0]= CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x + 704.0 * RoomScale, 112.0*RoomScale, r\z-416.0*RoomScale, True) + #;[End Block] + #Case "room2servers" + #;[Block] + #d.Doors = CreateDoor(0, r\x,0,r\z, 0, r, False, 2, False) + #d\locked = True + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x - 208.0 * RoomScale, 0.0, r\z - 736.0 * RoomScale, 90, r, True, False, False, "", True) + #r\RoomDoors[0]\AutoClose=False + #r\RoomDoors[1] = CreateDoor(r\zone, r\x - 208.0 * RoomScale, 0.0, r\z + 736.0 * RoomScale, 90, r, True, False, False, "", True) + #r\RoomDoors[1]\AutoClose=False + # + #r\RoomDoors[2] = CreateDoor(r\zone, r\x - 672.0 * RoomScale, 0.0, r\z - 1024.0 * RoomScale, 0, r, False, False, False, "GEAR") + #r\RoomDoors[2]\AutoClose=False : r\RoomDoors[2]\DisableWaypoint = True + #FreeEntity(r\RoomDoors[2]\buttons[0]) : r\RoomDoors[2]\buttons[0]=0 + #FreeEntity(r\RoomDoors[2]\buttons[1]) : r\RoomDoors[2]\buttons[1]=0 + # + #For n% = 0 To 2 + #r\Objects[n * 2] = CopyEntity(LeverBaseOBJ) + #r\Objects[n * 2 + 1] = CopyEntity(LeverOBJ) + # + #r\Levers[n] = r\Objects[n * 2 + 1] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[n * 2 + i], 0.03, 0.03, 0.03) + # + #Select n + #Case 0 ;power switch + #PositionEntity (r\Objects[n * 2 + i], r\x - 1260.0 * RoomScale, r\y + 234.0 * RoomScale, r\z + 750 * RoomScale, True) + #Case 1 ;generator fuel pump + #PositionEntity (r\Objects[n * 2 + i], r\x - 920.0 * RoomScale, r\y + 164.0 * RoomScale, r\z + 898 * RoomScale, True) + #Case 2 ;generator on/off + #PositionEntity (r\Objects[n * 2 + i], r\x - 837.0 * RoomScale, r\y + 152.0 * RoomScale, r\z + 886 * RoomScale, True) + #End Select + # + #EntityParent(r\Objects[n * 2 + i], r\obj) + #Next + #;RotateEntity(r\Objects[n * 2], 0, -90, 0) + #RotateEntity(r\Objects[n*2+1], 81, -180, 0) + # + #;EntityPickMode(r\Objects[n * 2 + 1], 2) + #EntityPickMode r\Objects[n * 2 + 1], 1, False + #EntityRadius r\Objects[n * 2 + 1], 0.1 + #;makecollbox(r\Objects[n * 2 + 1]) + #Next + # + #RotateEntity(r\Objects[2+1], -81, -180, 0) + #RotateEntity(r\Objects[4+1], -81, -180, 0) + # + #;096 spawnpoint +#; r\Objects[6]=CreatePivot(r\obj) +#; PositionEntity(r\Objects[6], r\x - 848*RoomScale, 0.5, r\z-576*RoomScale, True) + #r\Objects[6]=CreatePivot(r\obj) + #PositionEntity(r\Objects[6],r\x-320*RoomScale,0.5,r\z,True) + #;guard spawnpoint + #r\Objects[7]=CreatePivot(r\obj) + #PositionEntity(r\Objects[7], r\x - 1328.0 * RoomScale, 0.5, r\z + 528*RoomScale, True) + #;the point where the guard walks to + #r\Objects[8]=CreatePivot(r\obj) + #PositionEntity(r\Objects[8], r\x - 1376.0 * RoomScale, 0.5, r\z + 32*RoomScale, True) + # + #r\Objects[9]=CreatePivot(r\obj) + #PositionEntity(r\Objects[9], r\x - 848*RoomScale, 0.5, r\z+576*RoomScale, True) + #;[End Block] + #Case "room3servers" + #;[Block] + #it = CreateItem("9V Battery", "bat", r\x - 132.0 * RoomScale, r\y - 368.0 * RoomScale, r\z - 648.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #If Rand(2) = 1 Then + #it = CreateItem("9V Battery", "bat", r\x - 76.0 * RoomScale, r\y - 368.0 * RoomScale, r\z - 648.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #EndIf + #If Rand(2) = 1 Then + #it = CreateItem("9V Battery", "bat", r\x - 196.0 * RoomScale, r\y - 368.0 * RoomScale, r\z - 648.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #EndIf + # + #it = CreateItem("S-NAV 300 Navigator", "nav", r\x + 124.0 * RoomScale, r\y - 368.0 * RoomScale, r\z - 648.0 * RoomScale) + #it\state = 20 : EntityParent(it\collider, r\obj) + # + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x + 736.0 * RoomScale, -512.0 * RoomScale, r\z - 400.0 * RoomScale, True) + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x - 552.0 * RoomScale, -512.0 * RoomScale, r\z - 528.0 * RoomScale, True) + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity(r\Objects[2], r\x + 736.0 * RoomScale, -512.0 * RoomScale, r\z + 272.0 * RoomScale, True) + # + #r\Objects[3] = LoadMesh_Strict("GFX\npcs\duck_low_res.b3d") + #ScaleEntity(r\Objects[3], 0.07, 0.07, 0.07) + #tex = LoadTexture_Strict("GFX\npcs\duck2.png") + #EntityTexture r\Objects[3], tex + #PositionEntity (r\Objects[3], r\x + 928.0 * RoomScale, -640*RoomScale, r\z + 704.0 * RoomScale) + # + #EntityParent r\Objects[3], r\obj + #;[End Block] + #Case "room3servers2" + #;[Block] + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity(r\Objects[0], r\x - 504.0 * RoomScale, -512.0 * RoomScale, r\z + 271.0 * RoomScale, True) + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x + 628.0 * RoomScale, -512.0 * RoomScale, r\z + 271.0 * RoomScale, True) + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity(r\Objects[2], r\x - 532.0 * RoomScale, -512.0 * RoomScale, r\z - 877.0 * RoomScale, True) + # + #it = CreateItem("Document SCP-970", "paper", r\x + 960.0 * RoomScale, r\y - 448.0 * RoomScale, r\z + 251.0 * RoomScale) + #RotateEntity it\collider, 0, r\angle, 0 + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Gas Mask", "gasmask", r\x + 954.0 * RoomScale, r\y - 504.0 * RoomScale, r\z + 235.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "testroom" + #;[Block] + #For xtemp = 0 To 1 + #For ztemp = -1 To 1 + #r\Objects[xtemp * 3 + (ztemp + 1)] = CreatePivot() + #PositionEntity(r\Objects[xtemp * 3 + (ztemp + 1)], r\x + (-236.0 + 280.0 * xtemp) * RoomScale, -700.0 * RoomScale, r\z + 384.0 * ztemp * RoomScale) + #EntityParent(r\Objects[xtemp * 3 + (ztemp + 1)], r\obj) + #Next + #Next + # + #r\Objects[6] = CreatePivot() + #PositionEntity(r\Objects[6], r\x + 754.0 * RoomScale, r\y - 1248.0 * RoomScale, r\z) + #EntityParent(r\Objects[6], r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x + 744.0 * RoomScale, r\y - 856.0 * RoomScale, r\z + 236.0 * RoomScale, r) + #sc\FollowPlayer = True + # + #CreateDoor(0, r\x + 720.0 * RoomScale, 0, r\z, 0, r, False, 2, -1) + # + #CreateDoor(0, r\x - 624.0 * RoomScale, -1280.0 * RoomScale, r\z, 90, r, True) + # + #it = CreateItem("Document SCP-682", "paper", r\x + 656.0 * RoomScale, r\y - 1200.0 * RoomScale, r\z - 16.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room2closets" + #;[Block] + #it = CreateItem("Document SCP-1048", "paper", r\x + 736.0 * RoomScale, r\y + 176.0 * RoomScale, r\z + 736.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Gas Mask", "gasmask", r\x + 736.0 * RoomScale, r\y + 176.0 * RoomScale, r\z + 544.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("9V Battery", "bat", r\x + 736.0 * RoomScale, r\y + 176.0 * RoomScale, r\z - 448.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #If Rand(2) = 1 Then + #it = CreateItem("9V Battery", "bat", r\x + 730.0 * RoomScale, r\y + 176.0 * RoomScale, r\z - 496.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #EndIf + #If Rand(2) = 1 Then + #it = CreateItem("9V Battery", "bat", r\x + 740.0 * RoomScale, r\y + 176.0 * RoomScale, r\z - 560.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #EndIf + # + #it = CreateItem("Level 1 Key Card", "key1", r\x + 736.0 * RoomScale, r\y + 240.0 * RoomScale, r\z + 752.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #Local clipboard.Items = CreateItem("Clipboard","clipboard",r\x + 736.0 * RoomScale, r\y + 224.0 * RoomScale, r\z -480.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Incident Report SCP-1048-A", "paper",r\x + 736.0 * RoomScale, r\y + 224.0 * RoomScale, r\z -480.0 * RoomScale) + #;clipboard\SecondInv[0] = it + #HideEntity(it\collider) + # + #r\Objects[0]=CreatePivot(r\obj) + #PositionEntity r\Objects[0], r\x-1120*RoomScale, -256*RoomScale, r\z+896*RoomScale, True + #r\Objects[1]=CreatePivot(r\obj) + #PositionEntity r\Objects[1], r\x-1232*RoomScale, -256*RoomScale, r\z-160*RoomScale, True + # + #d.Doors = CreateDoor(0, r\x - 240.0 * RoomScale, 0.0, r\z, 90, r, False) + #PositionEntity(d\buttons[0], r\x - 230.0 * RoomScale, EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True), True) + #PositionEntity(d\buttons[1], r\x - 250.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + #d\open = False : d\AutoClose = False + # + #sc.SecurityCams = CreateSecurityCam(r\x, r\y + 704*RoomScale, r\z + 863*RoomScale, r) + #sc\angle = 180 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 20, 0, 0) + #;sc\FollowPlayer = True + #;[End Block] + #Case "room2offices" + #;[Block] + #it = CreateItem("Document SCP-106", "paper", r\x + 404.0 * RoomScale, r\y + 145.0 * RoomScale, r\z + 559.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Level 2 Key Card", "key2", r\x - 156.0 * RoomScale, r\y + 151.0 * RoomScale, r\z + 72.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("S-NAV 300 Navigator", "nav", r\x + 305.0 * RoomScale, r\y + 153.0 * RoomScale, r\z + 944.0 * RoomScale) + #it\state = 20 : EntityParent(it\collider, r\obj) + # + #it = CreateItem("Notification", "paper", r\x -137.0 * RoomScale, r\y + 153.0 * RoomScale, r\z + 464.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #w.waypoints = CreateWaypoint(r\x - 32.0 * RoomScale, r\y + 66.0 * RoomScale, r\z + 288.0 * RoomScale, Null, r) + #w2.waypoints = CreateWaypoint(r\x, r\y + 66.0 * RoomScale, r\z - 448.0 * RoomScale, Null, r) + #w\connected[0] = w2 : w\dist[0] = EntityDistance(w\obj, w2\obj) + #w2\connected[0] = w : w2\dist[0] = w\dist[0] + #;[End Block] + #Case "room2offices2" + #;[Block] + #it = CreateItem("Level 1 Key Card", "key1", r\x - 368.0 * RoomScale, r\y - 48.0 * RoomScale, r\z + 80.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Document SCP-895", "paper", r\x - 800.0 * RoomScale, r\y - 48.0 * RoomScale, r\z + 368.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #If Rand(2) = 1 Then + #it = CreateItem("Document SCP-860", "paper", r\x - 800.0 * RoomScale, r\y - 48.0 * RoomScale, r\z - 464.0 * RoomScale) + #Else + #it = CreateItem("SCP-093 Recovered Materials", "paper", r\x - 800.0 * RoomScale, r\y - 48.0 * RoomScale, r\z - 464.0 * RoomScale) + #EndIf + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("S-NAV 300 Navigator", "nav", r\x - 336.0 * RoomScale, r\y - 48.0 * RoomScale, r\z - 480.0 * RoomScale) + #it\state = 28 : EntityParent(it\collider, r\obj) + # + #r\Objects[0] = LoadMesh_Strict("GFX\npcs\duck_low_res.b3d") + #ScaleEntity(r\Objects[0], 0.07, 0.07, 0.07) + # + #EntityParent(r\Objects[0], r\obj) + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x-808.0 * RoomScale, -72.0 * RoomScale, r\z - 40.0 * RoomScale, True) + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity(r\Objects[2], r\x-488.0 * RoomScale, 160.0 * RoomScale, r\z + 700.0 * RoomScale, True) + #r\Objects[3] = CreatePivot(r\obj) + #PositionEntity(r\Objects[3], r\x-488.0 * RoomScale, 160.0 * RoomScale, r\z - 668.0 * RoomScale, True) + #r\Objects[4] = CreatePivot(r\obj) + #PositionEntity(r\Objects[4], r\x-572.0 * RoomScale, 350.0 * RoomScale, r\z - 4.0 * RoomScale, True) + # + #temp = Rand(1,4) + #PositionEntity(r\Objects[0], EntityX(r\Objects[temp],True),EntityY(r\Objects[temp],True),EntityZ(r\Objects[temp],True),True) + #;[End Block] + #Case "room2offices3" + #;[Block] + #If Rand(2)=1 Then + #it = CreateItem("Mobile Task Forces", "paper", r\x + 744.0 * RoomScale, r\y +240.0 * RoomScale, r\z + 944.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #Else + #it = CreateItem("Security Clearance Levels", "paper", r\x + 680.0 * RoomScale, r\y +240.0 * RoomScale, r\z + 944.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #EndIf + # + #it = CreateItem("Object Classes", "paper", r\x + 160.0 * RoomScale, r\y +240.0 * RoomScale, r\z + 568.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Document", "paper", r\x -1440.0 * RoomScale, r\y +624.0 * RoomScale, r\z + 152.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Radio Transceiver", "radio", r\x - 1184.0 * RoomScale, r\y + 480.0 * RoomScale, r\z - 800.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #For i = 0 To Rand(0,1) + #it = CreateItem("ReVision Eyedrops", "eyedrops", r\x - 1529.0*RoomScale, r\y + 563.0 * RoomScale, r\z - 572.0*RoomScale + i*0.05) + #EntityParent(it\collider, r\obj) + #Next + # + #it = CreateItem("9V Battery", "bat", r\x - 1545.0 * RoomScale, r\y + 603.0 * RoomScale, r\z - 372.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #If Rand(2) = 1 Then + #it = CreateItem("9V Battery", "bat", r\x - 1540.0 * RoomScale, r\y + 603.0 * RoomScale, r\z - 340.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #EndIf + #If Rand(2) = 1 Then + #it = CreateItem("9V Battery", "bat", r\x - 1529.0 * RoomScale, r\y + 603.0 * RoomScale, r\z - 308.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #EndIf + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x - 1056.0 * RoomScale, 384.0*RoomScale, r\z + 290.0 * RoomScale, 90, r, True) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True + #PositionEntity r\RoomDoors[0]\buttons[0], EntityX(r\RoomDoors[0]\buttons[0],True),EntityY(r\RoomDoors[0]\buttons[0],True),r\z + 161.0 * RoomScale,True + #PositionEntity r\RoomDoors[0]\buttons[1], EntityX(r\RoomDoors[0]\buttons[1],True),EntityY(r\RoomDoors[0]\buttons[1],True),r\z + 161.0 * RoomScale,True + #;[End Block] + #Case "start" + #;[Block] + #;the containment doors + #r\RoomDoors[1] = CreateDoor(r\zone, r\x + 4000.0 * RoomScale, 384.0*RoomScale, r\z + 1696.0 * RoomScale, 90, r, True, True) + #r\RoomDoors[1]\locked = False : r\RoomDoors[1]\AutoClose = False + #r\RoomDoors[1]\dir = 1 : r\RoomDoors[1]\open = True + #FreeEntity(r\RoomDoors[1]\buttons[0]) : r\RoomDoors[1]\buttons[0] = 0 + #FreeEntity(r\RoomDoors[1]\buttons[1]) : r\RoomDoors[1]\buttons[1] = 0 + #r\RoomDoors[1]\MTFClose = False + # + #r\RoomDoors[2] = CreateDoor(r\zone, r\x + 2704.0 * RoomScale, 384.0*RoomScale, r\z + 624.0 * RoomScale, 90, r, False) + #r\RoomDoors[2]\AutoClose = False : r\RoomDoors[2]\open = False + #FreeEntity(r\RoomDoors[2]\buttons[0]) : r\RoomDoors[2]\buttons[0] = 0 + #FreeEntity(r\RoomDoors[2]\buttons[1]) : r\RoomDoors[2]\buttons[1] = 0 + #r\RoomDoors[2]\MTFClose = False + # + #d.Doors = CreateDoor(r\zone, r\x + 1392.0 * RoomScale, 384.0*RoomScale, r\z + 64.0 * RoomScale, 90, r, True) + #d\AutoClose = False + #d\MTFClose = False + #d\locked = True + # + #d.Doors = CreateDoor(r\zone, r\x - 640.0 * RoomScale, 384.0*RoomScale, r\z + 64.0 * RoomScale, 90, r, False) + #d\locked = True : d\AutoClose = False + # + #d.Doors = CreateDoor(r\zone, r\x + 1280.0 * RoomScale, 384.0*RoomScale, r\z + 312.0 * RoomScale, 180, r, True) + #d\locked = True : d\AutoClose = False + #PositionEntity(d\buttons[0], r\x + 1120.0 * RoomScale, EntityY(d\buttons[0],True), r\z + 328.0 * RoomScale, True) + #PositionEntity(d\buttons[1], r\x + 1120.0 * RoomScale, EntityY(d\buttons[1],True), r\z + 296.0 * RoomScale, True) + #FreeEntity(d\obj2) : d\obj2=0 + #d\MTFClose = False + # + #d.Doors = CreateDoor(r\zone, r\x, 0, r\z + 1184.0 * RoomScale, 0, r, False) + #d\locked = True + # + #r\Objects[0] = LoadMesh_Strict("GFX\map\IntroDesk.b3d") + #ScaleEntity r\Objects[0], RoomScale, RoomScale ,RoomScale + #PositionEntity r\Objects[0], r\x + 272.0 * RoomScale, 0, r\z + 400.0 * RoomScale + #EntityParent r\Objects[0], r\obj + # + #de.Decals = CreateDecal(0, r\x + 272.0 * RoomScale, 0.005, r\z + 262.0 * RoomScale, 90, Rand(360), 0) + #EntityParent(de\obj, r\obj) + # + #r\Objects[1] = LoadMesh_Strict("GFX\map\IntroDrawer.b3d") + #ScaleEntity r\Objects[1], RoomScale, RoomScale ,RoomScale + #PositionEntity r\Objects[1], r\x + 448.0 * RoomScale, 0, r\z + 192.0 * RoomScale + #EntityParent r\Objects[1], r\obj + # + #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) + # + #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 + #sc\room = r + #TurnEntity(sc\CameraObj, 20, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #PositionEntity(sc\ScrObj, r\x + 1456 * RoomScale, 608 * RoomScale, r\z +352.0 * RoomScale) + #TurnEntity(sc\ScrObj, 0, 90, 0) + #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) + #r\Objects[3] = CreatePivot() + #PositionEntity (r\Objects[3], EntityX(r\obj) - 80.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 526.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) + # + #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 + #EntityParent(r\Objects[i], r\obj) + #Next + # + #;3384,510,2400 + #CreateDevilEmitter(r\x+3384.0*RoomScale,r\y+510.0*RoomScale,r\z+2400.0*RoomScale,r,1,4) + #;[End Block] + #Case "room2scps" + #;[Block] + #d.Doors = CreateDoor(r\zone, r\x + 264.0 * RoomScale, 0, r\z, 90, r, True, False, 3) + #d\AutoClose = False : d\open = False + #PositionEntity(d\buttons[0], r\x + 320.0 * RoomScale, EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True), True) + #PositionEntity(d\buttons[1], r\x + 224.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + # + #d.Doors = CreateDoor(r\zone, r\x - 264.0 * RoomScale, 0, r\z, 270, r, True, False, 3) + #d\AutoClose = False : d\open = False + #PositionEntity(d\buttons[0], r\x - 320.0 * RoomScale, EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True), True) + #PositionEntity(d\buttons[1], r\x - 224.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + # + #r\RoomDoors[1] = CreateDoor(r\zone, r\x-560.0 * RoomScale, 0, r\z - 272.0 * RoomScale, 0, r, True, False, 3) + #r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = False + # + #r\RoomDoors[2] = CreateDoor(r\zone, r\x + 560.0 * RoomScale, 0, r\z - 272.0 * RoomScale, 180, r, True, False, 3) + #r\RoomDoors[2]\AutoClose = False : r\RoomDoors[2]\open = False + # + #r\RoomDoors[3] = CreateDoor(r\zone, r\x + 560.0 * RoomScale, 0, r\z + 272.0 * RoomScale, 180, r, True, False, 3) + #r\RoomDoors[3]\AutoClose = False : r\RoomDoors[3]\open = False + # + #r\RoomDoors[4] = CreateDoor(r\zone, r\x-560.0 * RoomScale, 0, r\z + 272.0 * RoomScale, 0, r, True, False, 3) + #r\RoomDoors[4]\AutoClose = False : r\RoomDoors[4]\open = False + # + #it = CreateItem("SCP-714", "scp714", r\x - 552.0 * RoomScale, r\y + 220.0 * RoomScale, r\z - 760.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("SCP-1025", "scp1025", r\x + 552.0 * RoomScale, r\y + 224.0 * RoomScale, r\z - 758.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("SCP-860", "scp860", r\x + 568.0 * RoomScale, r\y + 178.0 * RoomScale, r\z + 760.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x + 560.0 * RoomScale, r\y + 386 * RoomScale, r\z - 416.0 * RoomScale, r) + #sc\angle = 180 : sc\turn = 30 + #TurnEntity(sc\CameraObj, 30, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x - 560.0 * RoomScale, r\y + 386 * RoomScale, r\z - 416.0 * RoomScale, r) + #sc\angle = 180 : sc\turn = 30 + #TurnEntity(sc\CameraObj, 30, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x + 560.0 * RoomScale, r\y + 386 * RoomScale, r\z + 480.0 * RoomScale, r) + #sc\angle = 0 : sc\turn = 30 + #TurnEntity(sc\CameraObj, 30, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x - 560.0 * RoomScale, r\y + 386 * RoomScale, r\z + 480.0 * RoomScale, r) + #sc\angle = 0 : sc\turn = 30 + #TurnEntity(sc\CameraObj, 30, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #it = CreateItem("Document SCP-714", "paper", r\x - 728.0 * RoomScale, r\y + 288.0 * RoomScale, r\z - 360.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Document SCP-427", "paper", r\x - 608.0 * RoomScale, r\y + 66.0 * RoomScale, r\z + 636.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #Local dx#,dy# + #For i = 0 To 14 + #Select i + #Case 0 + #dx# = -64.0 + #dz# = -516.0 + #Case 1 + #dx# = -96.0 + #dz# = -388.0 + #Case 2 + #dx# = -128.0 + #dz# = -292.0 + #Case 3 + #dx# = -128.0 + #dz# = -132.0 + #Case 4 + #dx# = -160.0 + #dz# = -36.0 + #Case 5 + #dx# = -192.0 + #dz# = 28.0 + #Case 6 + #dx# = -384.0 + #dz# = 28.0 + #Case 7 + #dx# = -448.0 + #dz# = 92.0 + #Case 8 + #dx# = -480.0 + #dz# = 124.0 + #Case 9 + #dx# = -512.0 + #dz# = 156.0 + #Case 10 + #dx# = -544.0 + #dz# = 220.0 + #Case 11 + #dx# = -544.0 + #dz# = 380.0 + #Case 12 + #dx# = -544.0 + #dz# = 476.0 + #Case 13 + #dx# = -544.0 + #dz# = 572.0 + #Case 14 + #dx# = -544.0 + #dz# = 636.0 + #End Select + #de.Decals = CreateDecal(Rand(15,16),r\x+dx#*RoomScale,0.005,r\z+dz#*RoomScale,90,Rand(360),0) + #If i > 10 Then + #de\Size = Rnd(0.2,0.25) + #Else + #de\Size = Rnd(0.1,0.17) + #EndIf + #EntityAlpha(de\obj, 1.0) : ScaleSprite(de\obj,de\Size,de\Size) + #EntityParent de\obj, r\obj + #Next + #;[End Block] + #Case "room205" + #;[Block] + #;d.Doors = CreateDoor(r\zone, r\x + 128.0 * RoomScale, 0, r\z + 640.0 *RoomScale, 90, r, True, False, 3) + #;d\AutoClose = False : d\open = False + #r\RoomDoors[1] = CreateDoor(r\zone, r\x + 128.0 * RoomScale, 0, r\z + 640.0 *RoomScale, 90, r, True, False, 3) + #r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = False + #;PositionEntity(d\buttons[0], r\x + 320.0 * RoomScale, EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True), True) + #;PositionEntity(d\buttons[1], r\x + 224.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x - 1392.0 * RoomScale, -128.0 * RoomScale, r\z - 384*RoomScale, 0, r, True, False, 3, "", True) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = False + #FreeEntity(r\RoomDoors[0]\buttons[0]) : r\RoomDoors[0]\buttons[0]=0 + #FreeEntity(r\RoomDoors[0]\buttons[1]) : r\RoomDoors[0]\buttons[1]=0 + # + #sc.SecurityCams = CreateSecurityCam(r\x - 1152.0 * RoomScale, r\y + 900.0 * RoomScale, r\z + 176.0 * RoomScale, r, True) + #sc\angle = 90 : sc\turn = 0 + #EntityParent(sc\obj, r\obj) + # + #sc\AllowSaving = False + #sc\RenderInterval = 0 + # + #EntityParent(sc\ScrObj, 0) + #PositionEntity(sc\ScrObj, r\x - 1716.0 * RoomScale, r\y + 160.0 * RoomScale, r\z + 176.0 * RoomScale, True) + #TurnEntity sc\ScrObj, 0, 90, 0 + #ScaleSprite sc\ScrObj, 896.0*0.5*RoomScale, 896.0*0.5*RoomScale + # + #EntityParent(sc\ScrObj, r\obj) + #;EntityBlend(sc\ScrObj, 2) + # + #CameraZoom (sc\Cam, 1.5) + # + #HideEntity sc\ScrOverlay + #HideEntity sc\MonitorObj + # + #r\Objects[0] = CreatePivot(r\obj) + #PositionEntity r\Objects[0], r\x - 1536.0 * RoomScale, r\y + 730.0 * RoomScale, r\z + 192.0 * RoomScale, True + #RotateEntity r\Objects[0], 0,-90,0,True + # + #r\Objects[1] = sc\ScrObj + # + #;[End Block] + #Case "endroom" + #;[Block] + #r\RoomDoors[0] = CreateDoor(r\zone, r\x, 0, r\z + 1136 * RoomScale, 0, r, False, True, 6) + #r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = False + #FreeEntity r\RoomDoors[0]\buttons[0] : r\RoomDoors[0]\buttons[0]=0 + #FreeEntity r\RoomDoors[0]\buttons[1] : r\RoomDoors[0]\buttons[1]=0 + #;[End Block] + #Case "endroomc" + #;[Block] + #d = CreateDoor(r\zone, r\x+1024*RoomScale, 0, r\z, 0, r, False, 2, False, "") + #d\open = False : d\AutoClose = False : d\locked = True + #;[End Block] + #Case "coffin" + #;[Block] + #d = CreateDoor(r\zone, r\x, 0, r\z - 448.0 * RoomScale, 0, r, False, True, 2) + #d\AutoClose = False : d\open = False + #PositionEntity(d\buttons[0], r\x - 384.0 * RoomScale, 0.7, r\z - 280.0 * RoomScale, True) + # + #sc.SecurityCams = CreateSecurityCam(r\x - 320.0 * RoomScale, r\y + 704 * RoomScale, r\z + 288.0 * RoomScale, r, True) + #sc\angle = 45 + 180 + #sc\turn = 45 + #sc\CoffinEffect = True + #TurnEntity(sc\CameraObj, 120, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #CoffinCam = sc + # + #PositionEntity(sc\ScrObj, r\x - 800 * RoomScale, 288.0 * RoomScale, r\z - 340.0 * RoomScale) + #EntityParent(sc\ScrObj, r\obj) + #TurnEntity(sc\ScrObj, 0, 180, 0) + # + #r\Objects[2] = CopyEntity(LeverBaseOBJ) + #r\Objects[3] = CopyEntity(LeverOBJ) + # + #r\Levers[0] = r\Objects[3] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[2 + i], 0.04, 0.04, 0.04) + #PositionEntity (r\Objects[2 + i], r\x - 800.0 * RoomScale, r\y + 180.0 * RoomScale, r\z - 336 * RoomScale, True) + # + #EntityParent(r\Objects[2 + i], r\obj) + #Next + #RotateEntity(r\Objects[2], 0, 180, 0) + #RotateEntity(r\Objects[3], 10, 0, 0) + # + #EntityPickMode r\Objects[3], 1, False + #EntityRadius r\Objects[3], 0.1 + # + #r\Objects[0] = CreatePivot() + #PositionEntity(r\Objects[0], r\x, -1320.0 * RoomScale, r\z + 2304.0 * RoomScale) + #EntityParent(r\Objects[0], r\obj) + # + #it = CreateItem("Document SCP-895", "paper", r\x - 688.0 * RoomScale, r\y + 133.0 * RoomScale, r\z - 304.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Level 3 Key Card", "key3", r\x + 240.0 * RoomScale, r\y -1456.0 * RoomScale, r\z + 2064.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Night Vision Goggles", "nvgoggles", r\x + 280.0 * RoomScale, r\y -1456.0 * RoomScale, r\z + 2164.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #it\state = 400 + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x + 96.0*RoomScale, -1532.0 * RoomScale, r\z + 2016.0 * RoomScale,True) + # + #;de.Decals = CreateDecal(0, r\x + 96.0*RoomScale, -1535.0 * RoomScale, r\z + 32.0 * RoomScale, 90, Rand(360), 0) + #;EntityParent de\obj, r\obj + #;[End Block] + #Case "room2tesla","room2tesla_lcz","room2tesla_hcz" + #;[Block] + #r\Objects[0] = CreatePivot() + #PositionEntity(r\Objects[0], r\x - 114.0 * RoomScale, 0.0, r\z) + #EntityParent(r\Objects[0], r\obj) + # + #r\Objects[1] = CreatePivot() + #PositionEntity(r\Objects[1], r\x + 114.0 * RoomScale, 0.0, r\z) + #EntityParent(r\Objects[1], r\obj) + # + #r\Objects[2] = CreatePivot() + #PositionEntity(r\Objects[2], r\x, 0.0, r\z) + #EntityParent(r\Objects[2], r\obj) + # + #r\Objects[3] = CreateSprite() + #EntityTexture (r\Objects[3], TeslaTexture) + #SpriteViewMode(r\Objects[3],2) + #;ScaleSprite (r\Objects[3],((512.0 * RoomScale)/2.0),((512.0 * RoomScale)/2.0)) + #EntityBlend (r\Objects[3], 3) + #EntityFX(r\Objects[3], 1 + 8 + 16) + # + #PositionEntity(r\Objects[3], r\x, 0.8, r\z) + # + #HideEntity r\Objects[3] + #EntityParent(r\Objects[3], r\obj) + # + #w.waypoints = CreateWaypoint(r\x, r\y + 66.0 * RoomScale, r\z + 292.0 * RoomScale, Null, r) + #w2.waypoints = CreateWaypoint(r\x, r\y + 66.0 * RoomScale, r\z - 284.0 * RoomScale, Null, r) + #w\connected[0] = w2 : w\dist[0] = EntityDistance(w\obj, w2\obj) + #w2\connected[0] = w : w2\dist[0] = w\dist[0] + # + #r\Objects[4] = CreateSprite() + #PositionEntity(r\Objects[4], r\x - 32 * RoomScale, 568 * RoomScale, r\z) + #ScaleSprite(r\Objects[4], 0.03, 0.03) + #EntityTexture(r\Objects[4], LightSpriteTex(1)) + #EntityBlend (r\Objects[4], 3) + #EntityParent(r\Objects[4], r\obj) + #HideEntity r\Objects[4] + # + #r\Objects[5] = CreatePivot() + #PositionEntity(r\Objects[5],r\x,0,r\z-800*RoomScale) + #EntityParent(r\Objects[5],r\obj) + # + #r\Objects[6] = CreatePivot() + #PositionEntity(r\Objects[6],r\x,0,r\z+800*RoomScale) + #EntityParent(r\Objects[6],r\obj) + # + #For r2.Rooms = Each Rooms + #If r2<>r Then + #If r2\RoomTemplate\Name = "room2tesla" Or r2\RoomTemplate\Name = "room2tesla_lcz" Or r2\RoomTemplate\Name = "room2tesla_hcz" Then + #r\Objects[7] = CopyEntity(r2\Objects[7],r\obj) ;don't load the mesh again + #Exit + #EndIf + #EndIf + #Next + #If r\Objects[7]=0 Then r\Objects[7] = LoadMesh_Strict("GFX\map\room2tesla_caution.b3d",r\obj) + #;[End Block] + #Case "room2doors" + #;[Block] + #d = CreateDoor(r\zone, r\x, 0, r\z + 528.0 * RoomScale, 0, r, True) + #d\AutoClose = False ;: d\buttons[0] = False + #PositionEntity (d\buttons[0], r\x - 832.0 * RoomScale, 0.7, r\z + 160.0 * RoomScale, True) + #PositionEntity (d\buttons[1], r\x + 160.0 * RoomScale, 0.7, r\z + 536.0 * RoomScale, True) + #;RotateEntity(d\buttons[1], 0, 90, 0, True) + # + #d2 = CreateDoor(r\zone, r\x, 0, r\z - 528.0 * RoomScale, 180, r, True) + #d2\AutoClose = False : FreeEntity (d2\buttons[0]) : d2\buttons[0] = 0 + #PositionEntity (d2\buttons[1], r\x +160.0 * RoomScale, 0.7, r\z - 536.0 * RoomScale, True) + #;RotateEntity(d2\buttons[1], 0, 90, 0, True) + # + #r\Objects[0] = CreatePivot() + #PositionEntity(r\Objects[0], r\x - 832.0 * RoomScale, 0.5, r\z) + #EntityParent(r\Objects[0], r\obj) + # + #d2\LinkedDoor = d : d\LinkedDoor = d2 + # + #d\open = False : d2\open = True + #;[End Block] + elif rn == "914": + #[Block] + #d = CreateDoor(r\zone, r\x, 0, r\z - 368.0 * RoomScale, 0, r, False, True, 2) + #d\dir = 1 : d\AutoClose = False : d\open = False + #PositionEntity (d\buttons[0], r\x - 496.0 * RoomScale, 0.7, r\z - 272.0 * RoomScale, True) + #TurnEntity(d\buttons[0], 0, 90, 0) + r.RoomDoors[2] = CreateDoor(r.zone, r.x, 0, r.z - 368.0 * Constants.RoomScale, 0, r, false, true, 2) + r.RoomDoors[2].dir = 1 + r.RoomDoors[2].AutoClose = false + r.RoomDoors[2].open = false + r.RoomDoors[2].buttons[0].global_position.x = r.x - 496.0 * Constants.RoomScale + r.RoomDoors[2].buttons[0].global_position.y = 0.7 + r.RoomDoors[2].buttons[0].global_position.z = r.z - 272.0 * Constants.RoomScale + r.RoomDoors[2].buttons[0].rotation.y += 90 + + r.Objects[0] = X.LoadModel("GFX/map/914key.x") + r.Objects[1] = X.LoadModel("GFX/map/914knob.x") + + for i in range(0, 2): + r.Objects[i].scale.x = Constants.RoomScale + r.Objects[i].scale.y = Constants.RoomScale + r.Objects[i].scale.z = Constants.RoomScale + #EntityPickMode(r\Objects[i], 2) + + r.Objects[0].position.x = r.x + r.Objects[0].position.y = r.y + 190.0 * Constants.RoomScale + r.Objects[0].position.z = r.z + 374.0 * Constants.RoomScale + r.Objects[1].position.x = r.x + r.Objects[1].position.y = r.y + 230.0 * Constants.RoomScale + r.Objects[1].position.z = r.z + 374.0 * Constants.RoomScale + r.obj.add_child(r.Objects[0]) + r.obj.add_child(r.Objects[1]) + + #d = CreateDoor(r\zone, r\x - 624.0 * RoomScale, 0.0, r\z + 528.0 * RoomScale, 180, r, True) + #FreeEntity (d\obj2) : d\obj2 = 0 + #FreeEntity (d\buttons[0]) : d\buttons[0] = 0 + #FreeEntity (d\buttons[1]) : d\buttons[1] = 0 + #d\dir = 4 + #r\RoomDoors[0] = d: d\AutoClose = False + # + #d = CreateDoor(r\zone, r\x + 816.0 * RoomScale, 0.0, r\z + 528.0 * RoomScale, 180, r, True) + #FreeEntity (d\obj2) : d\obj2 = 0 + #FreeEntity (d\buttons[0]) : d\buttons[0] = 0 + #FreeEntity (d\buttons[1]) : d\buttons[1] = 0 + #d\dir = 4 + #r\RoomDoors[1] = d : d\AutoClose = False + # + #r\Objects[2] = CreatePivot() + #r\Objects[3] = CreatePivot() + #PositionEntity(r\Objects[2], r\x - 712.0 * RoomScale, 0.5, r\z + 640.0 * RoomScale) + #PositionEntity(r\Objects[3], r\x + 728.0 * RoomScale, 0.5, r\z + 640.0 * RoomScale) + #EntityParent(r\Objects[2], r\obj) + #EntityParent(r\Objects[3], r\obj) + # + #it = CreateItem("Addendum: 5/14 Test Log", "paper", r\x +954.0 * RoomScale, r\y +228.0 * RoomScale, r\z + 127.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("First Aid Kit", "firstaid", r\x + 960.0 * RoomScale, r\y + 112.0 * RoomScale, r\z - 40.0 * RoomScale) + #EntityParent(it\collider, r\obj) : RotateEntity(it\collider, 0, 90, 0) + # + #it = CreateItem("Dr. L's Note", "paper", r\x - 928.0 * RoomScale, 160.0 * RoomScale, r\z - 160.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "173" + #;[Block] + #r\Objects[0] = CreatePivot() + #PositionEntity (r\Objects[0], EntityX(r\obj) + 40.0 * RoomScale, 460.0 * RoomScale, EntityZ(r\obj) + 1072.0 * RoomScale) + #r\Objects[1] = CreatePivot() + #PositionEntity (r\Objects[1], EntityX(r\obj) - 80.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 526.0 * RoomScale) + #r\Objects[2] = CreatePivot() + #PositionEntity (r\Objects[2], EntityX(r\obj) - 128.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 320.0 * RoomScale) + # + #r\Objects[3] = CreatePivot() + #PositionEntity (r\Objects[3], EntityX(r\obj) + 660.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 526.0 * RoomScale) + #r\Objects[4] = CreatePivot() + #PositionEntity (r\Objects[4], EntityX(r\obj) + 700 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 320.0 * RoomScale) + # + #r\Objects[5] = CreatePivot() + #PositionEntity (r\Objects[5], EntityX(r\obj) + 1472.0 * RoomScale, 100.0 * RoomScale, EntityZ(r\obj) + 912.0 * RoomScale) + # + #For i = 0 To 5 + #EntityParent(r\Objects[i], r\obj) + #Next + # + #r\RoomDoors[1] = CreateDoor(r\zone, EntityX(r\obj) + 288.0 * RoomScale, 0, EntityZ(r\obj) + 384.0 * RoomScale, 90, r, False, True) + #r\RoomDoors[1]\AutoClose = False ;: r\RoomDoors[1]\locked = True + #r\RoomDoors[1]\dir = 1 : r\RoomDoors[1]\open = False + # + #FreeEntity(r\RoomDoors[1]\buttons[0]) : r\RoomDoors[1]\buttons[0] = 0 + #FreeEntity(r\RoomDoors[1]\buttons[1]) : r\RoomDoors[1]\buttons[1] = 0 + # + #de.Decals = CreateDecal(Rand(4, 5), EntityX(r\Objects[5], True), 0.002, EntityZ(r\Objects[5], True), 90, Rnd(360), 0) + #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 + #Next + # + #;AddLight(r, r\x-224.0*RoomScale, r\y+640.0*RoomScale, r\z+128.0*RoomScale,2,2,200,200,200) + #;AddLight(r, r\x-1056.0*RoomScale, r\y+608.0*RoomScale, r\z+416.0*RoomScale,2,2,200,200,200) + # + #r\RoomDoors[2] = CreateDoor(r\zone, r\x - 1008.0 * RoomScale, 0, r\z - 688.0 * RoomScale, 90, r, True, False, False, "", True) + #r\RoomDoors[2]\AutoClose = False : r\RoomDoors[2]\open = False : r\RoomDoors[2]\locked = True + #FreeEntity(r\RoomDoors[2]\buttons[0]) : r\RoomDoors[2]\buttons[0] = 0 + #FreeEntity(r\RoomDoors[2]\buttons[1]) : r\RoomDoors[2]\buttons[1] = 0 + # + #r\RoomDoors[3] = CreateDoor(r\zone, r\x - 2320.0 * RoomScale, 0, r\z - 1248.0 * RoomScale, 90, r, True) + #r\RoomDoors[3]\AutoClose = False : r\RoomDoors[3]\open = True : r\RoomDoors[3]\locked = True + # + #r\RoomDoors[4] = CreateDoor(r\zone, r\x - 4352.0 * RoomScale, 0, r\z - 1248.0 * RoomScale, 90, r, True) + #r\RoomDoors[4]\AutoClose = False : r\RoomDoors[4]\open = True : r\RoomDoors[4]\locked = True + # + #;the door in the office below the walkway + #r\RoomDoors[7] = CreateDoor(r\zone, r\x - 3712.0 * RoomScale, -385*RoomScale, r\z - 128.0 * RoomScale, 0, r, True) + #r\RoomDoors[7]\AutoClose = False : r\RoomDoors[7]\open = True + # + #d.Doors = CreateDoor(r\zone, r\x - 3712 * RoomScale, -385*RoomScale, r\z - 2336 * RoomScale, 0, r, False) + #d\locked = True : d\DisableWaypoint = True + # + #;the door from the concrete tunnel to the large hall + #d.Doors = CreateDoor(r\zone, r\x - 6864 * RoomScale, 0, r\z - 1248 * RoomScale, 90, r, True) + #d\AutoClose = False + #d\locked = True + # + #;the locked door to the lower level of the hall + #d.Doors = CreateDoor(r\zone, r\x - 5856 * RoomScale, 0, r\z - 1504 * RoomScale, 0, r, False) + #d\locked = True : d\DisableWaypoint = True + # + #;the door to the staircase in the office room + #d.Doors = CreateDoor(r\zone, r\x - 2432 * RoomScale, 0, r\z - 1000 * RoomScale, 0, r, False) + #PositionEntity(d\buttons[0], r\x - 2592 * RoomScale, EntityY(d\buttons[0],True), r\z - 1016 * RoomScale, True) + #PositionEntity(d\buttons[1], r\x - 2592 * RoomScale, EntityY(d\buttons[0],True), r\z - 984 * RoomScale, True) + #d\locked = True : d\DisableWaypoint = True + # + #tex = LoadTexture_Strict("GFX\map\Door02.jpg") + #For ztemp = 0 To 1 + #d.Doors = CreateDoor(r\zone, r\x - 5760 * RoomScale, 0, r\z + (320+896*ztemp) * RoomScale, 0, r, False) + #d\locked = True + #d\DisableWaypoint = True + # + #d.Doors = CreateDoor(r\zone, r\x - 8288 * RoomScale, 0, r\z + (320+896*ztemp) * RoomScale, 0, r, False) + #d\locked = True + #If ztemp = 0 Then d\open = True Else d\DisableWaypoint = True + # + #For xtemp = 0 To 2 + #d.Doors = CreateDoor(r\zone, r\x - (7424.0-512.0*xtemp) * RoomScale, 0, r\z + (1008.0-480.0*ztemp) * RoomScale, 180*(Not ztemp), r, False) + #EntityTexture d\obj, tex + #d\locked = True + #FreeEntity d\obj2 : d\obj2=0 + #FreeEntity d\buttons[0] : d\buttons[0]=0 + #FreeEntity d\buttons[1] : d\buttons[1]=0 + #d\DisableWaypoint = True + #Next + #For xtemp = 0 To 4 + #d.Doors = CreateDoor(r\zone, r\x - (5120.0-512.0*xtemp) * RoomScale, 0, r\z + (1008.0-480.0*ztemp) * RoomScale, 180*(Not ztemp), r, False) + #EntityTexture d\obj, tex + #d\locked = True + #FreeEntity d\obj2 : d\obj2=0 + #FreeEntity d\buttons[0] : d\buttons[0]=0 + #FreeEntity d\buttons[1] : d\buttons[1]=0 + #d\DisableWaypoint = True + # + #If xtemp = 2 And ztemp = 1 Then r\RoomDoors[6] = d + #Next + #Next + # + #CreateItem("Class D Orientation Leaflet", "paper", r\x-(2914+1024)*RoomScale, 170.0*RoomScale, r\z+40*RoomScale) + # + #sc.SecurityCams = CreateSecurityCam(r\x - 4048.0 * RoomScale, r\y - 32.0 * RoomScale, r\z - 1232.0 * RoomScale, r, True) + #sc\angle = 270 + #sc\turn = 45 + #sc\room = r + #TurnEntity(sc\CameraObj, 20, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #PositionEntity(sc\ScrObj, r\x - 2256 * RoomScale, 224.0 * RoomScale, r\z - 928.0 * RoomScale) + #TurnEntity(sc\ScrObj, 0, 90, 0) + #EntityParent(sc\ScrObj, r\obj) + # + #r\Objects[9] = LoadMesh_Strict("GFX\map\173_2.b3d",r\obj) + #EntityType r\Objects[9],HIT_MAP + #EntityPickMode r\Objects[9],2 + # + #r\Objects[10] = LoadMesh_Strict("GFX\map\intro_labels.b3d",r\obj) + #;[End Block] + #Case "room2ccont" + #;[Block] + #d = CreateDoor(r\zone, r\x + 64.0 * RoomScale, 0.0, r\z + 368.0 * RoomScale, 180, r, False, False, 2) + #d\AutoClose = False : d\open = False + # + #it = CreateItem("Note from Daniel", "paper", r\x-400.0*RoomScale,1040.0*RoomScale,r\z+115.0*RoomScale) + #EntityParent(it\collider, r\obj) + # + #For n% = 0 To 2 + #r\Objects[n * 2] = CopyEntity(LeverBaseOBJ) + #r\Objects[n * 2 + 1] = CopyEntity(LeverOBJ) + # + #r\Levers[n] = r\Objects[n * 2 + 1] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[n * 2 + i], 0.04, 0.04, 0.04) + #PositionEntity (r\Objects[n * 2 + i], r\x - 240.0 * RoomScale, r\y + 1104.0 * RoomScale, r\z + (632.0 - 64.0 * n) * RoomScale, True) + # + #EntityParent(r\Objects[n * 2 + i], r\obj) + #Next + #RotateEntity(r\Objects[n * 2], 0, -90, 0) + #RotateEntity(r\Objects[n * 2 + 1], 10, -90 - 180, 0) + # + #EntityPickMode r\Objects[n * 2 + 1], 1, False + #EntityRadius r\Objects[n * 2 + 1], 0.1 + #Next + # + #sc.SecurityCams = CreateSecurityCam(r\x-265.0*RoomScale, r\y+1280.0*RoomScale, r\z+105.0*RoomScale, r) + #sc\angle = 45 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 20, 0, 0) + #;[End Block] + #Case "room106" + #;[Block] + #it = CreateItem("Level 5 Key Card", "key5", r\x - 752.0 * RoomScale, r\y - 592 * RoomScale, r\z + 3026.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Dr. Allok's Note", "paper", r\x - 416.0 * RoomScale, r\y - 576 * RoomScale, r\z + 2492.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Recall Protocol RP-106-N", "paper", r\x + 268.0 * RoomScale, r\y - 576 * RoomScale, r\z + 2593.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #d = CreateDoor(r\zone, r\x - 968.0 * RoomScale, -764.0 * RoomScale, r\z + 1392.0 * RoomScale, 0, r, False, False, 4) + #d\AutoClose = False : d\open = False + # + #d = CreateDoor(r\zone, r\x, 0, r\z - 464.0 * RoomScale, 0, r, False, False, 4) + #d\AutoClose = False : d\open = False + # + #d = CreateDoor(r\zone, r\x - 624.0 * RoomScale, -1280.0 * RoomScale, r\z, 90, r, False, False, 4) + #d\AutoClose = False : d\open = False + # + #r\Objects[6] = LoadMesh_Strict("GFX\map\room1062.b3d") + # + #ScaleEntity (r\Objects[6],RoomScale,RoomScale,RoomScale) + #EntityType r\Objects[6], HIT_MAP + #EntityPickMode r\Objects[6], 3 + #PositionEntity(r\Objects[6],r\x+784.0*RoomScale,-980.0*RoomScale,r\z+720.0*RoomScale,True) + # + #;If BumpEnabled Then + #; + #; For i = 1 To CountSurfaces(r\Objects[6]) + #; sf = GetSurface(r\Objects[6],i) + #; b = GetSurfaceBrush( sf ) + #; t = GetBrushTexture(b,1) + #; texname$ = StripPath(TextureName(t)) + #; + #; mat.Materials=GetCache(texname) + #; If mat<>Null Then + #; If mat\Bump<>0 Then + #; t1 = GetBrushTexture(b,0) + #; + #; BrushTexture b, t1, 0, 0 + #; BrushTexture b, mat\Bump, 0, 1 + #; BrushTexture b, t, 0, 2 + #; + #; PaintSurface sf,b + #; + #; If t1<>0 Then FreeTexture t1 : t1=0 + #; EndIf + #; EndIf + #; + #; If t<>0 Then FreeTexture t : t=0 + #; If b<>0 Then FreeBrush b : b=0 + #; Next + #; + #;EndIf + # + #EntityParent(r\Objects[6], r\obj) + # + #For n = 0 To 2 Step 2 + #r\Objects[n] = CopyEntity(LeverBaseOBJ) + #r\Objects[n+1] = CopyEntity(LeverOBJ) + # + #r\Levers[n/2] = r\Objects[n+1] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[n+i], 0.04, 0.04, 0.04) + #PositionEntity (r\Objects[n+i], r\x - (555.0 - 81.0 * (n/2)) * RoomScale, r\y - 576.0 * RoomScale, r\z + 3040.0 * RoomScale, True) + # + #EntityParent(r\Objects[n+i], r\obj) + #Next + #RotateEntity(r\Objects[n], 0, 0, 0) + #RotateEntity(r\Objects[n+1], 10, -180, 0) + # + #;EntityPickMode(r\Objects[n * 2 + 1], 2) + #EntityPickMode r\Objects[n+1], 1, False + #EntityRadius r\Objects[n+1], 0.1 + #;makecollbox(r\Objects[n * 2 + 1]) + #Next + # + #RotateEntity(r\Objects[1], 81,-180,0) + #RotateEntity(r\Objects[3], -81,-180,0) + # + #r\Objects[4] = CreateButton(r\x - 146.0*RoomScale, r\y - 576.0 * RoomScale, r\z + 3045.0 * RoomScale, 0,0,0) + #EntityParent (r\Objects[4],r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x + 768.0 * RoomScale, r\y + 1392.0 * RoomScale, r\z + 1696.0 * RoomScale, r, True) + #sc\angle = 45 + 90 + 180 + #sc\turn = 20 + #TurnEntity(sc\CameraObj, 45, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #r\Objects[7] = sc\CameraObj + #r\Objects[8] = sc\obj + # + #PositionEntity(sc\ScrObj, r\x - 272.0 * RoomScale, -544.0 * RoomScale, r\z + 3020.0 * RoomScale) + #TurnEntity(sc\ScrObj, 0, -10, 0) + #EntityParent sc\ScrObj, r\obj + #sc\CoffinEffect=0 + # + #;r\NPC[0] = CreateNPC(NPCtypeD, r\x + 1088.0 * RoomScale, 1096.0 * RoomScale, r\z + 1728.0 * RoomScale) + #r\Objects[5] = CreatePivot() + #TurnEntity r\Objects[5], 0,180,0 + #PositionEntity (r\Objects[5], r\x + 1088.0 * RoomScale, 1104.0 * RoomScale, r\z + 1888.0 * RoomScale) + #EntityParent r\Objects[5], r\obj + #;HideEntity r\NPC[0]\obj + # + #r\Objects[9] = CreatePivot(r\obj) + #PositionEntity (r\Objects[9], r\x - 272 * RoomScale, r\y - 672.0 * RoomScale, r\z + 2736.0 * RoomScale, True) + # + #r\Objects[10] = CreatePivot(r\obj) + #PositionEntity (r\Objects[10], r\x, r\y, r\z - 720.0 * RoomScale, True) + #;[End Block] + #Case "room1archive" + #;[Block] + #For xtemp = 0 To 1 + #For ytemp = 0 To 2 + #For ztemp = 0 To 2 + # + #tempstr$ = "9V Battery" : tempstr2$ = "bat" + #chance% = Rand(-10,100) + #Select True + #Case (chance<0) + #Exit + #Case (chance<40) ;40% chance for a document + #tempstr="Document SCP-" + #Select Rand(1,6) + #Case 1 + #tempstr=tempstr+"1123" + #Case 2 + #tempstr=tempstr+"1048" + #Case 3 + #tempstr=tempstr+"939" + #Case 4 + #tempstr=tempstr+"682" + #Case 5 + #tempstr=tempstr+"079" + #Case 6 + #tempstr=tempstr+"096" + #Case 6 + #tempstr=tempstr+"966" + #End Select + #tempstr2="paper" + #Case (chance>=40) And (chance<45) ;5% chance for a key card + #temp3%=Rand(1,2) + #tempstr="Level "+Str(temp3)+" Key Card" + #tempstr2="key"+Str(temp3) + #Case (chance>=45) And (chance<50) ;5% chance for a medkit + #tempstr="First Aid Kit" + #tempstr2="firstaid" + #Case (chance>=50) And (chance<60) ;10% chance for a battery + #tempstr="9V Battery" + #tempstr2="bat" + #Case (chance>=60) And (chance<70) ;10% chance for an SNAV + #tempstr="S-NAV 300 Navigator" + #tempstr2="nav" + #Case (chance>=70) And (chance<85) ;15% chance for a radio + #tempstr="Radio Transceiver" + #tempstr2="radio" + #Case (chance>=85) And (chance<95) ;10% chance for a clipboard + #tempstr="Clipboard" + #tempstr2="clipboard" + #Case (chance>=95) And (chance=<100) ;5% chance for misc + #temp3%=Rand(1,3) + #Select temp3 + #Case 1 ;playing card + #tempstr="Playing Card" + #Case 2 ;Mastercard + #tempstr="Mastercard" + #Case 3 ;origami + #tempstr="Origami" + #End Select + #tempstr2="misc" + #End Select + # + #x# = (-672.0 + 864.0 * xtemp)* RoomScale + #y# = (96.0 + 96.0 * ytemp) * RoomScale + #z# = (480.0 - 352.0*ztemp + Rnd(-96.0,96.0)) * RoomScale + # + #it = CreateItem(tempstr,tempstr2,r\x+x,y,r\z+z) + #EntityParent it\collider,r\obj + #Next + #Next + #Next + # + #r\RoomDoors[0] = CreateDoor(r\zone,r\x,r\y,r\z - 528.0 * RoomScale,0,r,False,False,6) + # + #sc.SecurityCams = CreateSecurityCam(r\x-256.0*RoomScale, r\y+384.0*RoomScale, r\z+640.0*RoomScale, r) + #sc\angle = 180 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 20, 0, 0) + #;[End Block] + #Case "room2test1074" + #;[Block] + #r\RoomDoors[0] = CreateDoor(r\zone,r\x,r\y,r\z,0,r,False,False,False,"") + #r\RoomDoors[0]\locked = True + #r\RoomDoors[1] = CreateDoor(r\zone,r\x + 336.0 * RoomScale,r\y,r\z + 671.0 * RoomScale,90,r,True,False,3) + #r\RoomDoors[1]\AutoClose = False + #r\RoomDoors[2] = CreateDoor(r\zone,r\x + 336.0 * RoomScale,r\y,r\z - 800.0 * RoomScale,90,r,True,False,3) + #r\RoomDoors[2]\AutoClose = False + #r\RoomDoors[3] = CreateDoor(r\zone,r\x + 672.0 * RoomScale,r\y,r\z,0,r,False,False) + # + #r\Textures[0] = LoadTexture("GFX\map\1074tex0.jpg") ;blank texture (ripped from official article), seen when you put on 714 + #r\Textures[1] = LoadTexture("GFX\map\1074tex1.jpg") ;texture depicting subject D-9341 (the player) + #TextureBlend r\Textures[0], 5 ;texture + #TextureBlend r\Textures[1], 5 ;blends + # + #it = CreateItem("Document SCP-1074","paper",r\x + 300.0 * RoomScale,r\y+20.0*RoomScale,r\z + 671.0*RoomScale) + #EntityParent(it\collider, r\obj) + # + #r\Objects[0] = CreatePivot() ;painting pivot: the player will be attracted when it sees this. + #PositionEntity r\Objects[0],r\x + 835.0 * RoomScale,r\y + 165.0 * RoomScale,r\z + 540.0 * RoomScale, True + #EntityParent r\Objects[0],r\obj + #r\Objects[1] = CreatePivot() ;floor pivot: the player will walk to this point when it sees the painting pivot. + #PositionEntity r\Objects[1],r\x + 835.0 * RoomScale,r\y + 10.0 * RoomScale,r\z + 300.0 * RoomScale, True + #EntityParent r\Objects[1],r\obj + #;Local sf,b,t,msh + #msh% = GetChild(r\obj,2) ;the second child is the rendered mesh + #r\NonFreeAble[0] = GetSurface(msh,1) ;a failsafe if the correct surface isn't found + #For tempint = 1 To CountSurfaces(msh) + #sf% = GetSurface(msh,tempint) + #b% = GetSurfaceBrush( sf ) + #t% = GetBrushTexture(b, 1) + #texname$ = StripPath(TextureName(t)) + #DebugLog "texname: "+texname + #If Lower(texname) = "1074tex1.jpg" Then + #r\NonFreeAble[0] = sf ;the surface holding 1074's texture + #FreeTexture t + #FreeBrush b + #Exit + #EndIf + #If texname<>"" Then FreeTexture t + #FreeBrush b + #Next + #;[End Block] + #Case "room1123" + #;[Block] + #it = CreateItem("Document SCP-1123", "paper", r\x + 511.0 * RoomScale, r\y + 125.0 * RoomScale, r\z - 936.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("SCP-1123", "1123", r\x + 832.0 * RoomScale, r\y + 166.0 * RoomScale, r\z + 784.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Leaflet", "paper", r\x - 816.0 * RoomScale, r\y + 704.0 * RoomScale, r\z+ 888.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Gas Mask", "gasmask", r\x + 457.0 * RoomScale, r\y + 150.0 * RoomScale, r\z + 960.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #d.Doors = CreateDoor(r\zone, r\x + 832.0 * RoomScale, 0.0, r\z + 367.0 * RoomScale, 0, r, False, False, 3) + #PositionEntity(d\buttons[0], r\x + 956.0 * RoomScale, EntityY(d\buttons[0],True), r\z + 352.0 * RoomScale, True) + #PositionEntity(d\buttons[1], r\x + 713.0 * RoomScale, EntityY(d\buttons[1],True), r\z + 384.0 * RoomScale, True) + #FreeEntity d\obj2 : d\obj2 = 0 + #d.Doors = CreateDoor(r\zone, r\x + 280.0 * RoomScale, 0.0, r\z - 607.0 * RoomScale, 90, r, False, False) + #PositionEntity(d\buttons[0], EntityX(d\buttons[0],True), EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True), True) + #PositionEntity(d\buttons[1], EntityX(d\buttons[1],True), EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + # + #d.Doors = CreateDoor(r\zone, r\x + 280.0 * RoomScale, 512.0 * RoomScale, r\z - 607.0 * RoomScale, 90, r, False, False) + #PositionEntity(d\buttons[0], EntityX(d\buttons[0],True), EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True), True) + #FreeEntity d\buttons[1] : d\buttons[1]=0 + #r\RoomDoors[0] = d + #;PositionEntity(d\buttons[1], EntityX(d\buttons[1],True), EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + # + #r\Objects[3] = CreatePivot(r\obj) + #PositionEntity(r\Objects[3], r\x + 832.0 * RoomScale, r\y + 166.0 * RoomScale, r\z + 784.0 * RoomScale, True) + #r\Objects[4] = CreatePivot(r\obj) + #PositionEntity(r\Objects[4], r\x -648.0 * RoomScale, r\y + 592.0 * RoomScale, r\z + 692.0 * RoomScale, True) + #r\Objects[5] = CreatePivot(r\obj) + #PositionEntity(r\Objects[5], r\x + 828.0 * RoomScale, r\y + 592.0 * RoomScale, r\z + 592.0 * RoomScale, True) + # + #r\Objects[6] = CreatePivot(r\obj) + #PositionEntity(r\Objects[6], r\x - 76.0 * RoomScale, r\y + 620.0 * RoomScale, r\z + 744.0 * RoomScale, True) + #r\Objects[7] = CreatePivot(r\obj) + #PositionEntity(r\Objects[7], r\x - 640.0 * RoomScale, r\y + 620.0 * RoomScale, r\z - 864.0 * RoomScale, True) + # + #r\Objects[8] = LoadMesh_Strict("GFX\map\forest\door_frame.b3d") + #PositionEntity r\Objects[8], r\x - 272.0 * RoomScale, 512.0 * RoomScale, r\z + 288.0 * RoomScale,True + #RotateEntity r\Objects[8],0,90,0,True + #ScaleEntity r\Objects[8],45.0*RoomScale,45.0*RoomScale,80.0*RoomScale,True + #EntityParent r\Objects[8],r\obj + # + #r\Objects[9] = LoadMesh_Strict("GFX\map\forest\door.b3d") + #PositionEntity r\Objects[9],r\x - 272.0 * RoomScale, 512.0 * RoomScale, r\z + (288.0-70) * RoomScale,True + #RotateEntity r\Objects[9],0,10,0,True + #EntityType r\Objects[9], HIT_MAP + #ScaleEntity r\Objects[9],46.0*RoomScale,45.0*RoomScale,46.0*RoomScale,True + #EntityParent r\Objects[9],r\obj + # + #r\Objects[10] = CopyEntity(r\Objects[8]) + #PositionEntity r\Objects[10], r\x - 272.0 * RoomScale, 512.0 * RoomScale, r\z + 736.0 * RoomScale,True + #RotateEntity r\Objects[10],0,90,0,True + #ScaleEntity r\Objects[10],45.0*RoomScale,45.0*RoomScale,80.0*RoomScale,True + #EntityParent r\Objects[10],r\obj + # + #r\Objects[11] = CopyEntity(r\Objects[9]) + #PositionEntity r\Objects[11],r\x - 272.0 * RoomScale, 512.0 * RoomScale, r\z + (736.0-70) * RoomScale,True + #RotateEntity r\Objects[11],0,90,0,True + #EntityType r\Objects[11], HIT_MAP + #ScaleEntity r\Objects[11],46.0*RoomScale,45.0*RoomScale,46.0*RoomScale,True + #EntityParent r\Objects[11],r\obj + # + #r\Objects[12] = CopyEntity(r\Objects[8]) + #PositionEntity r\Objects[12], r\x - 592.0 * RoomScale, 512.0 * RoomScale, r\z - 704.0 * RoomScale,True + #RotateEntity r\Objects[12],0,0,0,True + #ScaleEntity r\Objects[12],45.0*RoomScale,45.0*RoomScale,80.0*RoomScale,True + #EntityParent r\Objects[12],r\obj + # + #r\Objects[13] = CopyEntity(r\Objects[9]) + #PositionEntity r\Objects[13],r\x - (592.0+70.0) * RoomScale, 512.0 * RoomScale, r\z - 704.0 * RoomScale,True + #RotateEntity r\Objects[13],0,0,0,True + #EntityType r\Objects[13], HIT_MAP + #ScaleEntity r\Objects[13],46.0*RoomScale,45.0*RoomScale,46.0*RoomScale,True + #EntityParent r\Objects[13],r\obj + # + #r\Objects[14] = LoadMesh_Strict("GFX\map\1123_hb.b3d",r\obj) + #EntityPickMode r\Objects[14],2 + #EntityType r\Objects[14],HIT_MAP + #EntityAlpha r\Objects[14],0.0 + #;[End Block] + #Case "pocketdimension" + #;[Block] + #Local hallway = LoadMesh_Strict("GFX\map\pocketdimension2.b3d") ;the tunnels in the first room + #r\Objects[8]=LoadMesh_Strict("GFX\map\pocketdimension3.b3d") ;the room with the throne, moving pillars etc + #r\Objects[9]=LoadMesh_Strict("GFX\map\pocketdimension4.b3d") ;the flying pillar + #r\Objects[10]=CopyEntity(r\Objects[9]) + # + #r\Objects[11]=LoadMesh_Strict("GFX\map\pocketdimension5.b3d") ;the pillar room + # + # + #terrain = LoadMesh_Strict("GFX\map\pocketdimensionterrain.b3d") + #ScaleEntity terrain,RoomScale,RoomScale,RoomScale,True + #;RotateEntity terrain,0,e\room\angle,0,True + #PositionEntity terrain, 0, 2944, 0, True + # + # + # + #CreateItem("Burnt Note", "paper", EntityX(r\obj),0.5,EntityZ(r\obj)+3.5) + # + #For n = 0 To -1;4 + # + #Select n + #Case 0 + #entity = hallway + #Case 1 + #entity = r\Objects[8] + #Case 2 + #entity = r\Objects[9] + #Case 3 + #entity = r\Objects[10] + #Case 4 + #entity = r\Objects[11] + #End Select + # + #;If BumpEnabled Then + #; + #; For i = 1 To CountSurfaces(entity) + #; sf = GetSurface(entity,i) + #; b = GetSurfaceBrush( sf ) + #; t = GetBrushTexture(b,1) + #; texname$ = StripPath(TextureName(t)) + #; mat.Materials=GetCache(texname) + #; If mat<>Null Then + #; If mat\Bump<>0 Then + #; t1 = GetBrushTexture(b,0) + #; + #; BrushTexture b, t1, 0, 0 + #; BrushTexture b, mat\Bump, 0, 1 + #; BrushTexture b, t, 0, 2 + #; + #; PaintSurface sf,b + #; + #; If t1<>0 Then FreeTexture t1 : t1=0 + #; EndIf + #; EndIf + #; + #; If t<>0 Then FreeTexture t : t=0 + #; If b<>0 Then FreeBrush b : b=0 + #; Next + #; + #;EndIf + # + #Next + # + #For i = 8 To 11 + #ScaleEntity (r\Objects[i],RoomScale,RoomScale,RoomScale) + #EntityType r\Objects[i], HIT_MAP + #;EntityPickMode r\Objects[i], 3 + #EntityPickMode r\Objects[i], 2 + #PositionEntity(r\Objects[i],r\x,r\y,r\z+32.0,True) + #Next + # + #ScaleEntity (terrain,RoomScale,RoomScale,RoomScale) + #EntityType terrain, HIT_MAP + #EntityPickMode terrain, 3 + #PositionEntity(terrain,r\x,r\y+2944.0*RoomScale,r\z+32.0,True) + # + #r\RoomDoors[0] = CreateDoor(0, r\x,2048*RoomScale,r\z+32.0-1024*RoomScale,0,r,False) + #r\RoomDoors[1] = CreateDoor(0, r\x,2048*RoomScale,r\z+32.0+1024*RoomScale,180,r,False) + # + #de.Decals = CreateDecal(18, r\x-(1536*RoomScale), 0.02,r\z+608*RoomScale+32.0, 90,0,0) + #EntityParent(de\obj, r\obj) + #de\Size = Rnd(0.8, 0.8) + #de\blendmode = 2 + #de\fx = 1+8 + #ScaleSprite(de\obj, de\Size, de\Size) + #EntityFX(de\obj, 1+8) + #EntityBlend de\obj, 2 + # + #ScaleEntity (r\Objects[10],RoomScale*1.5,RoomScale*2.0,RoomScale*1.5,True) + #PositionEntity(r\Objects[11],r\x,r\y,r\z+64.0,True) + # + #For i = 1 To 8 + #r\Objects[i-1] = CopyEntity(hallway) ;CopyMesh + #ScaleEntity (r\Objects[i-1],RoomScale,RoomScale,RoomScale) + #angle# = (i-1) * (360.0/8.0) + # + #EntityType r\Objects[i-1], HIT_MAP + #;EntityPickMode r\Objects[i-1], 3 + #EntityPickMode r\Objects[i-1], 2 + # + #RotateEntity(r\Objects[i-1],0,angle-90,0) + #PositionEntity(r\Objects[i-1],r\x+Cos(angle)*(512.0*RoomScale),0.0,r\z+Sin(angle)*(512.0*RoomScale)) + #EntityParent (r\Objects[i-1], r\obj) + # + #If i < 6 Then + #de.Decals = CreateDecal(i+7, r\x+Cos(angle)*(512.0*RoomScale)*3.0, 0.02,r\z+Sin(angle)*(512.0*RoomScale)*3.0, 90,angle-90,0) + #de\Size = Rnd(0.5, 0.5) + #de\blendmode = 2 + #de\fx = 1+8 + #ScaleSprite(de\obj, de\Size, de\Size) + #EntityFX(de\obj, 1+8) + #EntityBlend de\obj, 2 + #EndIf + #Next + # + #For i = 12 To 16 + #r\Objects[i] = CreatePivot(r\Objects[11]) + #Select i + #Case 12 + #PositionEntity(r\Objects[i],r\x,r\y+200*RoomScale,r\z+64.0,True) + #Case 13 + #PositionEntity(r\Objects[i],r\x+390*RoomScale,r\y+200*RoomScale,r\z+64.0+272*RoomScale,True) + #Case 14 + #PositionEntity(r\Objects[i],r\x+838*RoomScale,r\y+200*RoomScale,r\z+64.0-551*RoomScale,True) + #Case 15 + #PositionEntity(r\Objects[i],r\x-139*RoomScale,r\y+200*RoomScale,r\z+64.0+1201*RoomScale,True) + #Case 16 + #PositionEntity(r\Objects[i],r\x-1238*RoomScale,r\y-1664*RoomScale,r\z+64.0+381*RoomScale,True) + #End Select + # + #Next + # + #Local OldManEyes% = LoadTexture_Strict("GFX\npcs\oldmaneyes.jpg") + #r\Objects[17] = CreateSprite() + #ScaleSprite(r\Objects[17], 0.03, 0.03) + #EntityTexture(r\Objects[17], OldManEyes) + #EntityBlend (r\Objects[17], 3) + #EntityFX(r\Objects[17], 1 + 8) + #SpriteViewMode(r\Objects[17], 2) + # + #r\Objects[18] = LoadTexture_Strict("GFX\npcs\pdplane.png", 1+2) + #r\Objects[19] = LoadTexture_Strict("GFX\npcs\pdplaneeye.png", 1+2) + # + #r\Objects[20] = CreateSprite() + #ScaleSprite(r\Objects[20], 8.0, 8.0) + #EntityTexture(r\Objects[20], r\Objects[18]) + #EntityOrder r\Objects[20], 100 + #EntityBlend (r\Objects[20], 2) + #EntityFX(r\Objects[20], 1 + 8) + #SpriteViewMode(r\Objects[20], 2) + # + #FreeTexture t + #FreeEntity hallway + #;[End Block] + #Case "room3z3" + #;[Block] + #sc.SecurityCams = CreateSecurityCam(r\x-320.0*RoomScale, r\y+384.0*RoomScale, r\z+512.25*RoomScale, r) + #sc\angle = 225 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 20, 0, 0) + #;sc\FollowPlayer = True + #;[End Block] + #Case "room2_3","room3_3" + #;[Block] + #w.waypoints = CreateWaypoint(r\x, r\y + 66.0 * RoomScale, r\z, Null, r) + #;[End Block] + #;New rooms (in SCP:CB 1.3) - ENDSHN + #Case "room1lifts" + #;[Block] + #r\Objects[0] = CreateButton(r\x + 96.0*RoomScale, r\y + 160.0 * RoomScale, r\z + 64.0 * RoomScale, 0,0,0) + #EntityParent (r\Objects[0],r\obj) + #r\Objects[1] = CreateButton(r\x - 96.0*RoomScale, r\y + 160.0 * RoomScale, r\z + 64.0 * RoomScale, 0,0,0) + #EntityParent (r\Objects[1],r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x+384.0*RoomScale, r\y+(448-64)*RoomScale, r\z-960.0*RoomScale, r, True) + #sc\angle = 45 + #sc\turn = 45 + #sc\room = r + #TurnEntity(sc\CameraObj, 20, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #w.waypoints = CreateWaypoint(r\x, r\y + 66.0 * RoomScale, r\z, Null, r) + #;[End Block] + #Case "room2servers2" + #;[Block] + #d.Doors = CreateDoor(r\zone, r\x + 264.0 * RoomScale, 0.0, r\z + 672.0 * RoomScale, 270, r, False, False, 3) + #PositionEntity(d\buttons[0], r\x + 224.0 * RoomScale, EntityY(d\buttons[0],True), r\z + 510.0 * RoomScale, True) + #PositionEntity(d\buttons[1], r\x + 304.0 * RoomScale, EntityY(d\buttons[1],True), r\z + 840.0 * RoomScale, True) + #TurnEntity d\buttons[1],0,0,0,True + #d.Doors = CreateDoor(r\zone, r\x -512.0 * RoomScale, -768.0*RoomScale, r\z -336.0 * RoomScale, 0, r, False, False, 3) + #d.Doors = CreateDoor(r\zone, r\x -509.0 * RoomScale, -768.0*RoomScale, r\z -1037.0 * RoomScale, 0, r, False, False, 3) + #d.Doors\locked = True + #d.Doors\DisableWaypoint = True + #it = CreateItem("Night Vision Goggles", "nvgoggles", r\x + 56.0154 * RoomScale, r\y - 648.0 * RoomScale, r\z + 749.638 * RoomScale) + #it\state = 200 + #RotateEntity it\collider, 0, r\angle+Rand(245), 0 + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room2gw","room2gw_b" + #;[Block] + #If r\RoomTemplate\Name = "room2gw_b" + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity (r\Objects[2], r\x - 156.825*RoomScale, -37.3458*RoomScale, r\z+121.364*RoomScale, True) + # + #de.Decals = CreateDecal(3, r\x - 156.825*RoomScale, -37.3458*RoomScale, r\z+121.364*RoomScale,90,Rnd(360),0) + #de\Size = 0.5 + #ScaleSprite(de\obj, de\Size,de\Size) + #EntityParent de\obj, r\obj + # + #;260 300 -350 + #;WIP + #r\Objects[0] = CreatePivot() + #PositionEntity r\Objects[0],r\x+280.0*RoomScale,r\y+345.0*RoomScale,r\z-340.0*RoomScale,True + #EntityParent r\Objects[0],r\obj + #EndIf + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x + 336.0 * RoomScale, 0.0, r\z - 382.0 * RoomScale, 0, r, False, False) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 580.822 * RoomScale, EntityY(r\RoomDoors[0]\buttons[0],True), r\z - 606.679 * RoomScale, True) + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x + 580.822 * RoomScale, EntityY(r\RoomDoors[0]\buttons[1],True), r\z - 606.679 * RoomScale, True) + #r\RoomDoors[0]\dir = 0 : r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True : r\RoomDoors[0]\locked = True + #r\RoomDoors[0]\MTFClose = False + # + #r\RoomDoors[1] = CreateDoor(r\zone, r\x + 336.0 * RoomScale, 0.0, r\z + 462.0 * RoomScale, 180, r, False, False) + #PositionEntity(r\RoomDoors[1]\buttons[0], r\x + 580.822 * RoomScale, EntityY(r\RoomDoors[1]\buttons[0],True), r\z - 606.679 * RoomScale, True) + #PositionEntity(r\RoomDoors[1]\buttons[1], r\x + 580.822 * RoomScale, EntityY(r\RoomDoors[1]\buttons[1],True), r\z - 606.679 * RoomScale, True) + #r\RoomDoors[1]\dir = 0 : r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = True : r\RoomDoors[1]\locked = True + #r\RoomDoors[1]\MTFClose = False + # + #For r2.Rooms = Each Rooms + #If r2<>r Then + #If r2\RoomTemplate\Name = "room2gw" Or r2\RoomTemplate\Name = "room2gw_b" Then + #r\Objects[3] = CopyEntity(r2\Objects[3],r\obj) ;don't load the mesh again + #Exit + #EndIf + #EndIf + #Next + #If r\Objects[3]=0 Then r\Objects[3] = LoadMesh_Strict("GFX\map\room2gw_pipes.b3d",r\obj) + #EntityPickMode r\Objects[3],2 + # + #If r\RoomTemplate\Name = "room2gw" + #r\Objects[0] = CreatePivot() + #;PositionEntity r\Objects[0],r\x-48.0*RoomScale,128.0*RoomScale,r\z+320.0*RoomScale + #PositionEntity r\Objects[0],r\x+344.0*RoomScale,128.0*RoomScale,r\z + #EntityParent r\Objects[0],r\obj + # + #Local bd_temp% = False + #If room2gw_brokendoor + #If room2gw_x = r\x + #If room2gw_z = r\z + #bd_temp% = True + #EndIf + #EndIf + #EndIf + # + #If (room2gw_brokendoor = 0 And Rand(1,2)=1) Or bd_temp% + #r\Objects[1] = CopyEntity(DoorOBJ) + #ScaleEntity(r\Objects[1], (204.0 * RoomScale) / MeshWidth(r\Objects[1]), 312.0 * RoomScale / MeshHeight(r\Objects[1]), 16.0 * RoomScale / MeshDepth(r\Objects[1])) + #EntityType r\Objects[1], HIT_MAP + #PositionEntity r\Objects[1], r\x + 336.0 * RoomScale, 0.0, r\z + 462.0 * RoomScale + #RotateEntity(r\Objects[1], 0, 180 + 180, 0) + #EntityParent(r\Objects[1], r\obj) + #MoveEntity r\Objects[1],120.0,0,5.0 + #room2gw_brokendoor = True + #room2gw_x# = r\x + #room2gw_z# = r\z + #FreeEntity r\RoomDoors[1]\obj2 : r\RoomDoors[1]\obj2 = 0 + #EndIf + #EndIf + #;[End Block] + #Case "room3gw" + #;[Block] + #d = CreateDoor(r\zone, r\x - 728.0 * RoomScale, 0.0, r\z - 458.0 * RoomScale, 0, r, False, False, 3) + #d\AutoClose = False : d\open = False : d\locked = False + # + #d = CreateDoor(r\zone, r\x - 223.0 * RoomScale, 0.0, r\z - 736.0 * RoomScale, -90, r, False, False, 3) + #d\AutoClose = False : d\open = False : d\locked = False + # + #r\RoomDoors[0] = CreateDoor(r\zone, r\x - 459.0 * RoomScale, 0.0, r\z + 339.0 * RoomScale, 90, r, False, False) + #PositionEntity(r\RoomDoors[0]\buttons[0], r\x + 580.822 * RoomScale, EntityY(r\RoomDoors[0]\buttons[0],True), r\z - 606.679 * RoomScale, True) + #PositionEntity(r\RoomDoors[0]\buttons[1], r\x + 580.822 * RoomScale, EntityY(r\RoomDoors[0]\buttons[1],True), r\z - 606.679 * RoomScale, True) + #r\RoomDoors[0]\dir = 0 : r\RoomDoors[0]\AutoClose = False : r\RoomDoors[0]\open = True : r\RoomDoors[0]\locked = True + #r\RoomDoors[0]\MTFClose = False + # + #r\RoomDoors[1] = CreateDoor(r\zone, r\x + 385.0 * RoomScale, 0.0, r\z + 339.0 * RoomScale, 270, r, False, False) + #PositionEntity(r\RoomDoors[1]\buttons[0], r\x + 580.822 * RoomScale, EntityY(r\RoomDoors[1]\buttons[0],True), r\z - 606.679 * RoomScale, True) + #PositionEntity(r\RoomDoors[1]\buttons[1], r\x + 580.822 * RoomScale, EntityY(r\RoomDoors[1]\buttons[1],True), r\z - 606.679 * RoomScale, True) + #r\RoomDoors[1]\dir = 0 : r\RoomDoors[1]\AutoClose = False : r\RoomDoors[1]\open = True : r\RoomDoors[1]\locked = True + #r\RoomDoors[1]\MTFClose = False + #FreeEntity r\RoomDoors[1]\obj2 : r\RoomDoors[1]\obj2 = 0 + # + #r\Objects[0] = CreatePivot() + #PositionEntity r\Objects[0],r\x-48.0*RoomScale,128.0*RoomScale,r\z+320.0*RoomScale + #EntityParent r\Objects[0],r\obj + # + #For r2.Rooms = Each Rooms + #If r2<>r Then + #If r2\RoomTemplate\Name = "room3gw" Then + #r\Objects[3] = CopyEntity(r2\Objects[3],r\obj) ;don't load the mesh again + #Exit + #EndIf + #EndIf + #Next + #If r\Objects[3]=0 Then r\Objects[3] = LoadMesh_Strict("GFX\map\room3gw_pipes.b3d",r\obj) + #EntityPickMode r\Objects[3],2 + #;[End Block] + #Case "room1162" + #;[Block] + #d = CreateDoor(r\zone, r\x + 248.0*RoomScale, 0.0, r\z - 736.0*RoomScale, 90, r, False, False, 2) + #r\Objects[0] = CreatePivot() + #PositionEntity r\Objects[0],r\x+1012.0*RoomScale,r\y+128.0*RoomScale,r\z-640.0*RoomScale + #EntityParent r\Objects[0],r\obj + #EntityPickMode r\Objects[0],1 + #it = CreateItem("Document SCP-1162", "paper", r\x + 863.227 * RoomScale, r\y + 152.0 * RoomScale, r\z - 953.231 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x-192.0*RoomScale, r\y+704.0*RoomScale, r\z+192.0*RoomScale, r) + #sc\angle = 225 + #sc\turn = 45 + #TurnEntity(sc\CameraObj, 20, 0, 0) + #;[End Block] + #Case "room2scps2" + #;[Block] + #r\RoomDoors[0] = CreateDoor(r\zone, r\x + 288.0*RoomScale, r\y, r\z + 576.0*RoomScale, 90, r, False, False, 3) + #r\RoomDoors[0]\open = False : r\RoomDoors[0]\locked = True + #d = CreateDoor(r\zone, r\x + 777.0*RoomScale, r\y, r\z + 671.0*RoomScale, 90, r, False, False, 4) + #d = CreateDoor(r\zone, r\x + 556.0*RoomScale, r\y, r\z + 296.0*RoomScale, 0, r, False, False, 3) + #r\Objects[0] = CreatePivot() + #PositionEntity r\Objects[0],r\x + 576.0*RoomScale,r\y+160.0*RoomScale,r\z+632.0*RoomScale + #EntityParent r\Objects[0],r\obj + # + #it = CreateItem("SCP-1499", "scp1499", r\x + 600.0 * RoomScale, r\y + 176.0 * RoomScale, r\z - 228.0 * RoomScale) + #RotateEntity it\collider, 0, r\angle, 0 + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Document SCP-1499", "paper", r\x + 840.0 * RoomScale, r\y + 260.0 * RoomScale, r\z + 224.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Document SCP-500", "paper", r\x + 1152.0 * RoomScale, r\y + 224.0 * RoomScale, r\z + 336.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #it = CreateItem("Emily Ross' Badge", "badge", r\x + 364.0 * RoomScale, r\y + 5.0 * RoomScale, r\z + 716.0 * RoomScale) + #EntityParent(it\collider, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x + 850.0 * RoomScale, r\y + 350.0 * RoomScale, r\z + 876.0 * RoomScale, r) + #sc\angle = 220 : sc\turn = 30 + #TurnEntity(sc\CameraObj, 30, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #sc.SecurityCams = CreateSecurityCam(r\x + 600.0 * RoomScale, r\y + 514.0 * RoomScale, r\z + 150.0 * RoomScale, r) + #sc\angle = 180 : sc\turn = 30 + #TurnEntity(sc\CameraObj, 30, 0, 0) + #EntityParent(sc\obj, r\obj) + #;[End Block] + #Case "room3offices" + #;[Block] + #d.Doors = CreateDoor(r\zone, r\x + 736.0 * RoomScale, 0.0, r\z + 240.0 * RoomScale, 0, r, False, False, 3) + #PositionEntity(d\buttons[0], r\x + 892.0 * RoomScale, EntityY(d\buttons[0],True), r\z + 224.0 * RoomScale, True) + #PositionEntity(d\buttons[1], r\x + 892.0 * RoomScale, EntityY(d\buttons[1],True), r\z + 255.0 * RoomScale, True) + #FreeEntity d\obj2 : d\obj2 = 0 + # + #r\Objects[0] = LoadMesh_Strict("GFX\map\room3offices_hb.b3d",r\obj) + #EntityPickMode r\Objects[0],2 + #EntityType r\Objects[0],HIT_MAP + #EntityAlpha r\Objects[0],0.0 + #;[End Block] + #Case "room2offices4" + #;[Block] + #d.Doors = CreateDoor(0, r\x - 240.0 * RoomScale, 0.0, r\z, 90, r, False) + #PositionEntity(d\buttons[0], r\x - 230.0 * RoomScale, EntityY(d\buttons[0],True), EntityZ(d\buttons[0],True), True) + #PositionEntity(d\buttons[1], r\x - 250.0 * RoomScale, EntityY(d\buttons[1],True), EntityZ(d\buttons[1],True), True) + #d\open = False : d\AutoClose = False + # + #it = CreateItem("Sticky Note", "paper", r\x - 991.0*RoomScale, r\y - 242.0*RoomScale, r\z + 904.0*RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "room2sl" + #;[Block] + #Local scale# = RoomScale * 4.5 * 0.4 + #Local screen% + # + #r\Textures[0] = LoadAnimTexture("GFX\SL_monitors_checkpoint.jpg",1,512,512,0,4) + #r\Textures[1] = LoadAnimTexture("GFX\Sl_monitors.jpg",1,256,256,0,8) + # + #;Monitor Objects + #For i = 0 To 14 + #If i <> 7 Then + #r\Objects[i] = CopyEntity(Monitor) + #ScaleEntity(r\Objects[i], scale, scale, scale) + #If i <> 4 And i <> 13 Then + #screen = CreateSprite() + #EntityFX screen,17 + #SpriteViewMode screen,2 + #ScaleSprite(screen, MeshWidth(Monitor) * scale * 0.95 * 0.5, MeshHeight(Monitor) * scale * 0.95 * 0.5) + #Select i + #Case 0 + #EntityTexture screen,r\Textures[1],0 + #Case 2 + #EntityTexture screen,r\Textures[1],2 + #Case 3 + #EntityTexture screen,r\Textures[1],1 + #Case 8 + #EntityTexture screen,r\Textures[1],4 + #Case 9 + #EntityTexture screen,r\Textures[1],5 + #Case 10 + #EntityTexture screen,r\Textures[1],3 + #Case 11 + #EntityTexture screen,r\Textures[1],7 + #Default + #EntityTexture screen,r\Textures[0],3 + #End Select + #EntityParent screen,r\Objects[i] + #ElseIf i = 4 Then + #r\Objects[20] = CreateSprite() + #EntityFX r\Objects[20],17 + #SpriteViewMode r\Objects[20],2 + #ScaleSprite(r\Objects[20], MeshWidth(Monitor) * scale * 0.95 * 0.5, MeshHeight(Monitor) * scale * 0.95 * 0.5) + #EntityTexture r\Objects[20],r\Textures[0],2 + #EntityParent r\Objects[20],r\Objects[i] + #Else + #r\Objects[21] = CreateSprite() + #EntityFX r\Objects[21],17 + #SpriteViewMode r\Objects[21],2 + #ScaleSprite(r\Objects[21], MeshWidth(Monitor) * scale * 0.95 * 0.5, MeshHeight(Monitor) * scale * 0.95 * 0.5) + #EntityTexture r\Objects[21],r\Textures[1],6 + #EntityParent r\Objects[21],r\Objects[i] + #EndIf + #EndIf + #Next + #For i = 0 To 2 + #PositionEntity r\Objects[i],r\x-207.94*RoomScale,r\y+(648.0+(112*i))*RoomScale,r\z-60.0686*RoomScale + #RotateEntity r\Objects[i],0,105+r\angle,0 + #EntityParent r\Objects[i],r\obj + #DebugLog i + #Next + #For i = 3 To 5 + #PositionEntity r\Objects[i],r\x-231.489*RoomScale,r\y+(648.0+(112*(i-3)))*RoomScale,r\z+95.7443*RoomScale + #RotateEntity r\Objects[i],0,90+r\angle,0 + #EntityParent r\Objects[i],r\obj + #DebugLog i + #Next + #For i = 6 To 8 Step 2 + #PositionEntity r\Objects[i],r\x-231.489*RoomScale,r\y+(648.0+(112*(i-6)))*RoomScale,r\z+255.744*RoomScale + #RotateEntity r\Objects[i],0,90+r\angle,0 + #EntityParent r\Objects[i],r\obj + #DebugLog i + #Next + #For i = 9 To 11 + #PositionEntity r\Objects[i],r\x-231.489*RoomScale,r\y+(648.0+(112*(i-9)))*RoomScale,r\z+415.744*RoomScale + #RotateEntity r\Objects[i],0,90+r\angle,0 + #EntityParent r\Objects[i],r\obj + #DebugLog i + #Next + #For i = 12 To 14 + #PositionEntity r\Objects[i],r\x-208.138*RoomScale,r\y+(648.0+(112*(i-12)))*RoomScale,r\z+571.583*RoomScale + #RotateEntity r\Objects[i],0,75+r\angle,0 + #EntityParent r\Objects[i],r\obj + #DebugLog i + #Next + # + #;Doors for room + #r\RoomDoors[0] = CreateDoor(r\zone,r\x+480.0*RoomScale,r\y,r\z-640.0*RoomScale,90,r,False,False,3) + #r\RoomDoors[0]\AutoClose = False + #PositionEntity r\RoomDoors[0]\buttons[0],r\x+576.0*RoomScale,EntityY(r\RoomDoors[0]\buttons[0],True),r\z-480*RoomScale,True + #RotateEntity r\RoomDoors[0]\buttons[0],0,270,0 + #r\RoomDoors[1] = CreateDoor(r\zone,r\x+544.0*RoomScale,r\y+480.0*RoomScale,r\z+256.0*RoomScale,270,r,False,False,3) + #r\RoomDoors[1]\AutoClose = False + #FreeEntity r\RoomDoors[1]\obj2 : r\RoomDoors[1]\obj2 = 0 + #d = CreateDoor(r\zone,r\x+1504.0*RoomScale,r\y+480.0*RoomScale,r\z+960.0*RoomScale,0,r) + #d\AutoClose = False : d\locked = True + # + #;PathPoint 1 for SCP-049 + #r\Objects[7] = CreatePivot() + #PositionEntity r\Objects[7],r\x,r\y+100.0*RoomScale,r\z-800.0*RoomScale,True + #EntityParent r\Objects[7],r\obj + # + #;PathPoints for SCP-049 + #r\Objects[15] = CreatePivot() + #PositionEntity r\Objects[15],r\x+700.0*RoomScale,r\y+700.0*RoomScale,r\z+256.0*RoomScale,True + #EntityParent r\Objects[15],r\obj + #r\Objects[16] = CreatePivot() + #PositionEntity r\Objects[16],r\x-60.0*RoomScale,r\y+700.0*RoomScale,r\z+200.0*RoomScale,True + #EntityParent r\Objects[16],r\obj + #r\Objects[17] = CreatePivot() + #PositionEntity r\Objects[17],r\x-48.0*RoomScale,r\y+540.0*RoomScale,r\z+656.0*RoomScale,True + #EntityParent r\Objects[17],r\obj + # + #;Faked room409 + #;r\Objects[17] = LoadMesh_Strict("GFX\map\room2sl_2.b3d",r\obj) + #;sc.SecurityCams = CreateSecurityCam(r\x-160.0*RoomScale,r\y-22689.1*RoomScale,r\z-288.0*RoomScale,Null) + #;sc\angle = 225 + #;TurnEntity sc\CameraObj, 20, 0, 0 + #;EntityParent sc\obj,r\obj + #;sc\SpecialCam = True + # + #;-49.0 689.0 912.0 + #;Objects [18],[19] + #r\Objects[9 * 2] = CopyEntity(LeverBaseOBJ) + #r\Objects[9 * 2 + 1] = CopyEntity(LeverOBJ) + # + #r\Levers[0] = r\Objects[9 * 2 + 1] + # + #For i% = 0 To 1 + #ScaleEntity(r\Objects[9 * 2 + i], 0.04, 0.04, 0.04) + #PositionEntity r\Objects[9 * 2 + i],r\x-49*RoomScale,r\y+689*RoomScale,r\z+912*RoomScale,True + # + #EntityParent(r\Objects[9 * 2 + i], r\obj) + #Next + #RotateEntity(r\Objects[9 * 2], 0, 0, 0) + #RotateEntity(r\Objects[9 * 2 + 1], 10, 0 - 180, 0) + # + #EntityPickMode r\Objects[9 * 2 + 1], 1, False + #EntityRadius r\Objects[9 * 2 + 1], 0.1 + # + #;Camera in the room itself + #sc.SecurityCams = CreateSecurityCam(r\x-159.0*RoomScale, r\y+384.0*RoomScale, r\z-929.0*RoomScale, r, True) + #sc\angle = 315 + #;sc\turn = 45 + #sc\room = r + #TurnEntity(sc\CameraObj, 20, 0, 0) + #EntityParent(sc\obj, r\obj) + # + #PositionEntity(sc\ScrObj, r\x-231.489*RoomScale, r\y+760.0*RoomScale, r\z+255.744*RoomScale) + #TurnEntity(sc\ScrObj, 0, 90, 0) + #EntityParent(sc\ScrObj, r\obj) + # +#; r\Objects[20] = CopyEntity(LeverBaseOBJ) +#; r\Objects[21] = CopyEntity(LeverOBJ) +#; +#; For i% = 0 To 1 +#; ScaleEntity(r\Objects[20 + i], 0.04, 0.04, 0.04) +#; PositionEntity r\Objects[20],r\x+82.0*RoomScale, r\y+689.0*RoomScale, r\z+912.0*RoomScale,True +#; PositionEntity r\Objects[21],r\x+90.9775*RoomScale, r\y+604.347*RoomScale, r\z+890.584*RoomScale,True +#; +#; EntityParent(r\Objects[20 + i], r\obj) +#; Next +#; +#; RotateEntity r\Objects[21],8.6,-150.0,-5.0 + #;[End Block] + #Case "room2_4" + #;[Block] + #r\Objects[6] = CreatePivot() + #PositionEntity(r\Objects[6], r\x + 640.0 * RoomScale, 8.0 * RoomScale, r\z - 896.0 * RoomScale) + #EntityParent(r\Objects[6], r\obj) + #;[End Block] + #Case "room3z2" + #;[Block] + #For r2.Rooms = Each Rooms + #If r2\RoomTemplate\Name = r\RoomTemplate\Name And r2 <> r + #r\Objects[0] = CopyEntity(r2\Objects[0],r\obj) + #Exit + #EndIf + #Next + #If r\Objects[0]=0 Then r\Objects[0] = LoadMesh_Strict("GFX\map\room3z2_hb.b3d",r\obj) + #EntityPickMode r\Objects[0],2 + #EntityType r\Objects[0],HIT_MAP + #EntityAlpha r\Objects[0],0.0 + #;[End Block] + #Case "lockroom3" + #;[Block] + #d = CreateDoor(r\zone, r\x - 736.0 * RoomScale, 0, r\z - 104.0 * RoomScale, 0, r, True) + #d\timer = 70 * 5 : d\AutoClose = False : d\open = False : d\locked = True + # + #EntityParent(d\buttons[0], 0) + #PositionEntity(d\buttons[0], r\x - 288.0 * RoomScale, 0.7, r\z - 640.0 * RoomScale) + #EntityParent(d\buttons[0], r\obj) + # + #FreeEntity(d\buttons[1]) : d\buttons[1] = 0 + # + #d2 = CreateDoor(r\zone, r\x + 104.0 * RoomScale, 0, r\z + 736.0 * RoomScale, 270, r, True) + #d2\timer = 70 * 5 : d2\AutoClose = False: d2\open = False : d2\locked = True + #EntityParent(d2\buttons[0], 0) + #PositionEntity(d2\buttons[0], r\x + 640.0 * RoomScale, 0.7, r\z + 288.0 * RoomScale) + #RotateEntity (d2\buttons[0], 0, 90, 0) + #EntityParent(d2\buttons[0], r\obj) + # + #FreeEntity(d2\buttons[1]) : d2\buttons[1] = 0 + # + #d\LinkedDoor = d2 + #d2\LinkedDoor = d + # + #scale# = RoomScale * 4.5 * 0.4 + # + #r\Objects[0] = CopyEntity(Monitor) + #ScaleEntity r\Objects[0],scale#,scale#,scale# + #PositionEntity r\Objects[0],r\x+668*RoomScale,1.1,r\z-96.0*RoomScale,True + #RotateEntity r\Objects[0],0,90,0 + #EntityParent r\Objects[0],r\obj + # + #r\Objects[1] = CopyEntity(Monitor) + #ScaleEntity r\Objects[1],scale#,scale#,scale# + #PositionEntity r\Objects[1],r\x+96.0*RoomScale,1.1,r\z-668.0*RoomScale,True + #EntityParent r\Objects[1],r\obj + #;[End Block] + #Case "medibay" + #;[Block] + #r\Objects[0] = LoadMesh_Strict("GFX\map\medibay_props.b3d",r\obj) + #EntityType r\Objects[0],HIT_MAP + #EntityPickMode r\Objects[0],2 + # + #r\Objects[1] = CreatePivot(r\obj) + #PositionEntity(r\Objects[1], r\x - 762.0 * RoomScale, r\y + 0.0 * RoomScale, r\z - 346.0 * RoomScale, True) + #r\Objects[2] = CreatePivot(r\obj) + #PositionEntity(r\Objects[2], (EntityX(r\Objects[1],True)+(126.0 * RoomScale)), EntityY(r\Objects[1],True), EntityZ(r\Objects[1],True), True) + #it = CreateItem("First Aid Kit", "firstaid", r\x - 506.0 * RoomScale, r\y + 192.0 * RoomScale, r\z - 322.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #it = CreateItem("Syringe", "syringe", r\x - 333.0 * RoomScale, r\y + 100.0 * RoomScale, r\z + 97.3 * RoomScale) + #EntityParent(it\collider, r\obj) + #it = CreateItem("Syringe", "syringe", r\x - 340.0 * RoomScale, r\y + 100.0 * RoomScale, r\z + 52.3 * RoomScale) + #EntityParent(it\collider, r\obj) + #r\RoomDoors[0] = CreateDoor(r\zone, r\x - 264.0 * RoomScale, r\y - 0.0 * RoomScale, r\z + 640.0 * RoomScale, 90, r, False, False, 3) + # + #r\Objects[3] = CreatePivot(r\obj) + #;PositionEntity r\Objects[3],r\x-926.891*RoomScale,r\y,r\z-318.399*RoomScale,True + #PositionEntity r\Objects[3],r\x-820.0*RoomScale,r\y,r\z-318.399*RoomScale,True + #;[End Block] + #Case "room2cpit" + #;[Block] + #em.Emitters = CreateEmitter(r\x + 512.0 * RoomScale, -76 * RoomScale, r\z - 688 * RoomScale, 0) + #TurnEntity(em\Obj, -90, 0, 0) + #EntityParent(em\Obj, r\obj) + #em\RandAngle = 55 + #em\Speed = 0.0005 + #em\Achange = -0.015 + #em\SizeChange = 0.007 + # + #d = CreateDoor(r\zone,r\x-256.0*RoomScale, 0.0, r\z-752.0*RoomScale,90,r,False,2,3) + #d\locked = True : d\open = False : d\AutoClose = False : d\MTFClose = False : d\DisableWaypoint = True + #PositionEntity d\buttons[0],r\x-240.0*RoomScale,EntityY(d\buttons[0],True),EntityZ(d\buttons[0],True),True + # + #it = CreateItem("Dr L's Note", "paper", r\x - 160.0 * RoomScale, 32.0 * RoomScale, r\z - 353.0 * RoomScale) + #EntityParent(it\collider, r\obj) + #;[End Block] + #Case "dimension1499" + #;[Block] + #r\Levers[1] = LoadMesh_Strict("GFX\map\dimension1499\1499object0_cull.b3d",r\obj) + #EntityType r\Levers[1],HIT_MAP + #EntityAlpha r\Levers[1],0 + # + #r\Levers[0] = CreatePivot() + #PositionEntity r\Levers[0],r\x+205.0*RoomScale,r\y+200.0*RoomScale,r\z+2287.0*RoomScale + #EntityParent r\Levers[0],r\obj + #;[End Block] + # + #For lt.lighttemplates = Each LightTemplates + #If lt\roomtemplate = r\RoomTemplate Then + #newlt = AddLight(r, r\x+lt\x, r\y+lt\y, r\z+lt\z, lt\ltype, lt\range, lt\r, lt\g, lt\b) + #If newlt <> 0 Then + #If lt\ltype = 3 Then + #LightConeAngles(newlt, lt\innerconeangle, lt\outerconeangle) + #RotateEntity(newlt, lt\pitch, lt\yaw, 0) + #EndIf + #EndIf + #EndIf + #Next + # + #For ts.tempscreens = Each TempScreens + #If ts\roomtemplate = r\RoomTemplate Then + #CreateScreen(r\x+ts\x, r\y+ts\y, r\z+ts\z, ts\imgpath, r) + #EndIf + #Next + # + #For tw.TempWayPoints = Each TempWayPoints + #If tw\roomtemplate = r\RoomTemplate Then + #CreateWaypoint(r\x+tw\x, r\y+tw\y, r\z+tw\z, Null, r) + #EndIf + #Next + # + #If r\RoomTemplate\TempTriggerboxAmount > 0 + #r\TriggerboxAmount = r\RoomTemplate\TempTriggerboxAmount + #For i = 0 To r\TriggerboxAmount-1 + #r\Triggerbox[i] = CopyEntity(r\RoomTemplate\TempTriggerbox[i],r\obj) + #r\TriggerboxName[i] = r\RoomTemplate\TempTriggerboxName[i] + #DebugLog "Triggerbox found: "+i + #DebugLog "Triggerbox "+i+" name: "+r\TriggerboxName[i] + #Next + #EndIf + # + #For i = 0 To MaxRoomEmitters-1 + #If r\RoomTemplate\TempSoundEmitter[i]<>0 Then + #r\SoundEmitterObj[i]=CreatePivot(r\obj) + #PositionEntity r\SoundEmitterObj[i], r\x+r\RoomTemplate\TempSoundEmitterX[i],r\y+r\RoomTemplate\TempSoundEmitterY[i],r\z+r\RoomTemplate\TempSoundEmitterZ[i],True + #EntityParent(r\SoundEmitterObj[i],r\obj) + # + #r\SoundEmitter[i] = r\RoomTemplate\TempSoundEmitter[i] + #r\SoundEmitterRange[i] = r\RoomTemplate\TempSoundEmitterRange[i] + #EndIf + #Next + # + #CatchErrors("FillRoom ("+r\RoomTemplate\Name+")") + func LoadRoomTemplates(file: String): var TemporaryString: String var i: int @@ -223,7 +3882,7 @@ func CreateRoom(zone, roomshape, x, y, z, name = ""): r.obj.position = Vector3(x, y, z) # TODO: oh good god it's long. - #FillRoom(r) + FillRoom(r) # TODO: #if r.RoomTemplate.UseLightCones: @@ -262,7 +3921,7 @@ func CreateRoom(zone, roomshape, x, y, z, name = ""): r.obj.position = Vector3(x, y, z) # TODO: :c - #FillRoom(r) + FillRoom(r) # TODO: #if r.RoomTemplate.UseLightCones: @@ -433,7 +4092,7 @@ func CreateMap(): placed = true if placed: - MapTemp[x2][y2] == MapTemp[x2][y2] + 1 + MapTemp[x2][y2] = MapTemp[x2][y2] + 1 MapTemp[x1][y1] = 1 Room1Amount[i] = Room1Amount[i] + 1 @@ -843,122 +4502,99 @@ func CreateMap(): MapTemp[x1][y1] = min(MapTemp[x1][y1], 1) #Local d.Doors - #Local shouldSpawnDoor% - #For y = MapHeight To 0 Step -1 - # - #If y=I_Zone\Transition[1]-1 And y= I_Zone.Transition[1] - 1 and y1 < I_Zone.Transition[0] - 1: + zone = 2 + else: + zone = 1 + + for x1 in range(MapWidth, -1, -1): + if MapTemp[x1][y1] > 0: + if zone == 2: + temp = 2 + else: + temp = 0 + + for r1 in rooms: + r1.angle = Utils.WrapAngle(r1.angle) + if int(r1.x / 8.0) == x1 and int(r1.z / 8.0) == y1: + shouldSpawnDoor = false + if r1.RoomTemplate.Shape == Constants.ROOM1: + if r1.angle == 90: + shouldSpawnDoor = true + elif r1.RoomTemplate.Shape == Constants.ROOM2: + if r1.angle == 90 or r1.angle == 270: + shouldSpawnDoor = true + elif r1.RoomTemplate.Shape == Constants.ROOM2C: + if r1.angle == 0 or r1.angle == 90: + shouldSpawnDoor = true + elif r1.RoomTemplate.Shape == Constants.ROOM3: + if r1.angle == 0 or r1.angle == 180 or r1.angle == 90: + shouldSpawnDoor = true + else: + shouldSpawnDoor = true + + if shouldSpawnDoor: + if (x1+1) < (MapWidth + 1): + if MapTemp[x1 + 1][y1] > 0: + var d = CreateDoor(r.zone, float(x1) * spacing + spacing / 2.0, 0, float(y1) * spacing, 90, r, max(randi_range(-3, 1), 0), temp) + r.AdjDoor[0] = d + + shouldSpawnDoor = false + if r.RoomTemplate.Shape == Constants.ROOM1: + if r.angle == 180: + shouldSpawnDoor = true + if r.RoomTemplate.Shape == Constants.ROOM2: + if r.angle == 0 or r.angle == 180: + shouldSpawnDoor = true + if r.RoomTemplate.Shape == Constants.ROOM2C: + if r.angle == 180 or r.angle == 90: + shouldSpawnDoor = true + if r.RoomTemplate.Shape == Constants.ROOM3: + if r.angle == 180 or r.angle == 90 or r.angle == 270: + shouldSpawnDoor = true + else: + shouldSpawnDoor = true + + if shouldSpawnDoor: + if (y1 + 1) < (MapHeight + 1): + if MapTemp[x1][y1 + 1] > 0: + var d = CreateDoor(r.zone, float(x1) * spacing, 0, float(y1) * spacing + spacing / 2.0, 0, r, max(randi_range(-3, 1), 0), temp) + r.AdjDoor[3] = d + + break + + for r1 in rooms: + #If r1\angle >= 360 + # r1\angle = r1\angle-360 #EndIf - # - #For x = MapWidth To 0 Step -1 - #If MapTemp(x,y) > 0 Then - #If zone = 2 Then temp=2 Else temp=0 - # - #For r.Rooms = Each Rooms - #r\angle = WrapAngle(r\angle) - #If Int(r\x/8.0)=x And Int(r\z/8.0)=y Then - #shouldSpawnDoor = False - #Select r\RoomTemplate\Shape - #Case ROOM1 - #If r\angle=90 - #shouldSpawnDoor = True - #EndIf - #Case ROOM2 - #If r\angle=90 Or r\angle=270 - #shouldSpawnDoor = True - #EndIf - #Case ROOM2C - #If r\angle=0 Or r\angle=90 - #shouldSpawnDoor = True - #EndIf - #Case ROOM3 - #If r\angle=0 Or r\angle=180 Or r\angle=90 - #shouldSpawnDoor = True - #EndIf - #Default - #shouldSpawnDoor = True - #End Select - #If shouldSpawnDoor - #If (x+1)<(MapWidth+1) - #If MapTemp(x + 1, y) > 0 Then - #d.Doors = CreateDoor(r\zone, Float(x) * spacing + spacing / 2.0, 0, Float(y) * spacing, 90, r, Max(Rand(-3, 1), 0), temp) - #r\AdjDoor[0] = d - #EndIf - #EndIf - #EndIf - # - #shouldSpawnDoor = False - #Select r\RoomTemplate\Shape - #Case ROOM1 - #If r\angle=180 - #shouldSpawnDoor = True - #EndIf - #Case ROOM2 - #If r\angle=0 Or r\angle=180 - #shouldSpawnDoor = True - #EndIf - #Case ROOM2C - #If r\angle=180 Or r\angle=90 - #shouldSpawnDoor = True - #EndIf - #Case ROOM3 - #If r\angle=180 Or r\angle=90 Or r\angle=270 - #shouldSpawnDoor = True - #EndIf - #Default - #shouldSpawnDoor = True - #End Select - #If shouldSpawnDoor - #If (y+1)<(MapHeight+1) - #If MapTemp(x, y + 1) > 0 Then - #d.Doors = CreateDoor(r\zone, Float(x) * spacing, 0, Float(y) * spacing + spacing / 2.0, 0, r, Max(Rand(-3, 1), 0), temp) - #r\AdjDoor[3] = d - #EndIf - #EndIf - #EndIf - # - #Exit - #EndIf - #Next - # - #End If - # - #Next - #Next - # - #For r.Rooms = Each Rooms - #;If r\angle >= 360 - #; r\angle = r\angle-360 - #;EndIf - #r\angle = WrapAngle(r\angle) - #r\Adjacent[0]=Null - #r\Adjacent[1]=Null - #r\Adjacent[2]=Null - #r\Adjacent[3]=Null - #For r2.Rooms = Each Rooms - #If r<>r2 Then - #If r2\z=r\z Then - #If (r2\x)=(r\x+8.0) Then - #r\Adjacent[0]=r2 - #If r\AdjDoor[0] = Null Then r\AdjDoor[0] = r2\AdjDoor[2] - #ElseIf (r2\x)=(r\x-8.0) - #r\Adjacent[2]=r2 - #If r\AdjDoor[2] = Null Then r\AdjDoor[2] = r2\AdjDoor[0] - #EndIf - #ElseIf r2\x=r\x Then - #If (r2\z)=(r\z-8.0) Then - #r\Adjacent[1]=r2 - #If r\AdjDoor[1] = Null Then r\AdjDoor[1] = r2\AdjDoor[3] - #ElseIf (r2\z)=(r\z+8.0) - #r\Adjacent[3]=r2 - #If r\AdjDoor[3] = Null Then r\AdjDoor[3] = r2\AdjDoor[1] - #EndIf - #EndIf - #EndIf - #If (r\Adjacent[0]<>Null) And (r\Adjacent[1]<>Null) And (r\Adjacent[2]<>Null) And (r\Adjacent[3]<>Null) Then Exit - #Next - #Next + r1.angle = Utils.WrapAngle(r1.angle) + r1.Adjacent[0] = null + r1.Adjacent[1] = null + r1.Adjacent[2] = null + r1.Adjacent[3] = null + for r2 in rooms: + if r.ID != r2.ID: + if r2.z == r1.z: + if (r2.x) == (r1.x + 8.0): + r1.Adjacent[0] = r2 + if r1.AdjDoor[0] == null: + r1.AdjDoor[0] = r2.AdjDoor[2] + elif (r2.x) == (r1.x - 8.0): + r1.Adjacent[2] = r2 + if r1.AdjDoor[2] == null: + r1.AdjDoor[2] = r2.AdjDoor[0] + elif r2.x == r1.x: + if (r2.z) == (r1.z - 8.0): + r1.Adjacent[1] = r2 + if r1.AdjDoor[1] == null: + r1.AdjDoor[1] = r2.AdjDoor[3] + elif (r2.z) == (r1.z + 8.0): + r1.Adjacent[3] = r2 + if r1.AdjDoor[3] == null: + r1.AdjDoor[3] = r2.AdjDoor[1] + if (r1.Adjacent[0] != null) and (r1.Adjacent[1] != null) and (r1.Adjacent[2] != null) and (r1.Adjacent[3] != null): + break diff --git a/src/Global.gd b/src/Global.gd index cef6743..f0a8447 100644 --- a/src/Global.gd +++ b/src/Global.gd @@ -24,7 +24,7 @@ var MISSING_TEXTURE = load("res://missing.png") func LoadTexture(rawFileName: String): var fixedName = rawFileName.replace("\\", "/") - var fileName = Utils.GetCaseiFileName(str("res://", fixedName)) + var fileName = Utils.GetCaseiFileName(str("" if rawFileName.contains("res://") else "res://", fixedName)) if fileName == null: return MISSING_TEXTURE elif fileName.contains(""): diff --git a/src/Launcher.gd b/src/Launcher.gd index fa58146..d908362 100644 --- a/src/Launcher.gd +++ b/src/Launcher.gd @@ -10,6 +10,7 @@ func _ready() -> void: ) $Launch.connect("clicked", func(): get_tree().change_scene_to_file("res://scenes/screens/GameStartup.tscn") + #get_tree().change_scene_to_file("res://scenes/world/DynamicMap.tscn") ) $Exit.connect("clicked", func(): get_tree().quit.call_deferred() diff --git a/src/Startup.gd b/src/Startup.gd index 2315520..9b21d2b 100644 --- a/src/Startup.gd +++ b/src/Startup.gd @@ -4,5 +4,9 @@ func _ready() -> void: loadToLauncher.call_deferred() func loadToLauncher(): - get_tree().change_scene_to_file("res://scenes/screens/UpdateChecker.tscn") - #get_tree().change_scene_to_file("res://scenes/screens/Launcher.tscn") + var osName = OS.get_name() + if osName == "Web" or osName == "Android": # TODO: ios, can't be bothered rn + get_tree().change_scene_to_file("res://scenes/screens/IntroVideo.tscn") + else: + get_tree().change_scene_to_file("res://scenes/screens/UpdateChecker.tscn") + #get_tree().change_scene_to_file("res://scenes/screens/Launcher.tscn") diff --git a/src/Utils.gd b/src/Utils.gd index fd6e122..0056ba2 100644 --- a/src/Utils.gd +++ b/src/Utils.gd @@ -143,3 +143,14 @@ static func get_node_aabb(node : Node3D = null, ignore_top_level : bool = true, box = box.merge(child_box) return box + +static func StripFilename(file: String): + var mi = "" + var lastSlash = 0 + if len(file) > 0: + for i in range(len(file)): + mi = file.substr(i, 1) + if mi == "\\" or mi == "/": + lastSlash = i + + return file.substr(0, lastSlash + 1) diff --git a/src/file_parsers/B3D.gd b/src/file_parsers/B3D.gd index db37dc4..15c3642 100644 --- a/src/file_parsers/B3D.gd +++ b/src/file_parsers/B3D.gd @@ -2,6 +2,7 @@ class_name B3D var textures: Array = [] var brushes: Array = [] +var rootPath: String = "" static func ReadChunk(reader:BufferStuffReader): var chunk = B3DChunk.new() @@ -28,6 +29,7 @@ static func ReadTextures(reader:BufferStuffReader, parsedResult: B3D): textureChunk.pos = reader.readVector2() textureChunk.scale = reader.readVector2() textureChunk.rotation = reader.readFloat() + textureChunk.tex = Global.LoadTexture(str(parsedResult.rootPath, textureChunk.name)) parsedResult.textures.push_back(textureChunk) static func ReadBone(reader:BufferStuffReader): @@ -45,32 +47,26 @@ static func ReadVRTS(reader:BufferStuffReader): vrtsChunk.flags = reader.readInt() vrtsChunk.tex_coord_sets = reader.readInt() vrtsChunk.tex_coord_set_size = reader.readInt() + for i in range(vrtsChunk.tex_coord_set_size): + vrtsChunk.uv.push_back(PackedVector2Array()) while reader.offset < reader.buffer.size(): var vertex = reader.readVector3(true) vrtsChunk.vertices.push_back(vertex) - - if vrtsChunk.containsNormals: - var normal = reader.readVector3(true) + + if (vrtsChunk.flags & 1) != 0: + var normal = reader.readVector3() vrtsChunk.normals.push_back(normal) - else: - vrtsChunk.normals.push_back(Vector3.ZERO) - - if vrtsChunk.containsColors: + + if (vrtsChunk.flags & 2) != 0: var color = reader.readColor() vrtsChunk.colors.push_back(color) - else: - vrtsChunk.colors.push_back(Color.WHITE) - for i in range(vrtsChunk.tex_coord_set_size): - vrtsChunk.uv.push_back(reader.readVector2()) for i in range(vrtsChunk.tex_coord_sets): - for i1 in range(vrtsChunk.tex_coord_set_size): - if i == 0: - vrtsChunk.uv[i1].x = reader.readFloat() - else: - vrtsChunk.uv[i1].y = reader.readFloat() - + var uvData = [] + for j in range(vrtsChunk.tex_coord_set_size): + uvData.push_back(reader.readFloat()) + vrtsChunk.uv[i].push_back(Vector2(uvData[0], uvData[1])); return vrtsChunk static func ReadTRIS(reader:BufferStuffReader): @@ -81,7 +77,6 @@ static func ReadTRIS(reader:BufferStuffReader): trisChunk.triangles.push_back(reader.readInt()) trisChunk.triangles.push_back(reader.readInt()) trisChunk.triangles.push_back(reader.readInt()) - return trisChunk static func ReadMesh(reader:BufferStuffReader): @@ -98,7 +93,7 @@ static func ReadMesh(reader:BufferStuffReader): return meshChunk -static func CreateMesh(meshData: B3DMesh): +static func CreateMesh(meshData: B3DMesh, parsedResult: B3D): var arr_mesh = ArrayMesh.new() var arr = [] arr.resize(Mesh.ARRAY_MAX) @@ -112,25 +107,25 @@ static func CreateMesh(meshData: B3DMesh): #parentShart.add_child(shit) #return parentShart - print(meshData.verts.vertices.size(), ", ", meshData.verts.uv.size(), ", ", meshData.surfaces.triangles.size()) + print(meshData.verts.vertices.size(), ", ", meshData.verts.uv[0].size(), ", ", meshData.surfaces.triangles.size()) arr[Mesh.ARRAY_VERTEX]=meshData.verts.vertices - arr[Mesh.ARRAY_TEX_UV]=meshData.verts.uv + arr[Mesh.ARRAY_TEX_UV]=meshData.verts.uv[0] arr[Mesh.ARRAY_INDEX]=meshData.surfaces.triangles var meshInstance = MeshInstance3D.new() arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arr) meshInstance.mesh = arr_mesh var mat = StandardMaterial3D.new() - mat.albedo_color = Color(randi() % 255 / 255.0, randi() % 255 / 255.0, randi() % 255 / 255.0) - #mat.albedo_texture = activeAlbedo + #mat.albedo_color = Color(randi() % 255 / 255.0, randi() % 255 / 255.0, randi() % 255 / 255.0) + mat.albedo_texture = parsedResult.textures[0].tex #mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA_DEPTH_PRE_PASS if activeAlbedoHasAlpha else BaseMaterial3D.TRANSPARENCY_DISABLED meshInstance.set_surface_override_material(0, mat) meshInstance.create_trimesh_collision() return meshInstance -static func ReadNode(reader:BufferStuffReader): +static func ReadNode(reader:BufferStuffReader, parsedResult: B3D): var node = B3DNode.new() node.name = reader.readCString() @@ -143,12 +138,12 @@ static func ReadNode(reader:BufferStuffReader): for chunk in chunks: var chunkReader = BufferStuffReader.create(chunk.bytes) if chunk.name == "NODE": - node.add_child(ReadNode(chunkReader)) + node.add_child(ReadNode(chunkReader, parsedResult)) elif chunk.name == "BONE": node.bone = ReadBone(chunkReader) elif chunk.name == "MESH": node.mesh = ReadMesh(chunkReader) - node.add_child(CreateMesh(node.mesh)) + node.add_child(CreateMesh(node.mesh, parsedResult)) return node @@ -157,13 +152,14 @@ static func ReadBrush(reader:BufferStuffReader): pass static func Load(filePath: String): - var correctedPath = filePath.replace("\\", "/") + var correctedPath = str("res://", filePath.replace("\\", "/")) - var fileHandle = FileAccess.open(str("res://", correctedPath), FileAccess.READ) + var fileHandle = FileAccess.open(correctedPath, FileAccess.READ) var reader = BufferStuffReader.create(fileHandle.get_buffer(fileHandle.get_length())) fileHandle.close() var parsedResult = B3D.new() + parsedResult.rootPath = Utils.StripFilename(correctedPath) var resultScene = Node3D.new() var bb3dChunk = ReadChunk(reader) @@ -180,7 +176,7 @@ static func Load(filePath: String): elif chunk.name == "BRUS": ReadBrush(chunkReader) elif chunk.name == "NODE": - resultScene.add_child(ReadNode(chunkReader)) + resultScene.add_child(ReadNode(chunkReader, parsedResult)) print(resultScene) return resultScene diff --git a/src/file_parsers/RMesh.gd b/src/file_parsers/RMesh.gd index b28a6cb..714cec7 100644 --- a/src/file_parsers/RMesh.gd +++ b/src/file_parsers/RMesh.gd @@ -4,17 +4,6 @@ static func ReadString(reader:BufferStuffReader): var length = reader.readInt() return reader.readBuffer(length).get_string_from_ascii() -static func StripFilename(file: String): - var mi = "" - var lastSlash = 0 - if len(file) > 0: - for i in range(len(file)): - mi = file.substr(i, 1) - if mi == "\\" or mi == "/": - lastSlash = i - - return file.substr(0, lastSlash + 1) - static var EMPTY_TEXTURE = Texture2D.new() static var RMESH_LOAD_COUNT = 0 @@ -51,7 +40,7 @@ static func LoadRMesh(file: String, rt: RoomTemplate): var count: int = 0 var count2: int = 0 - file = StripFilename(file) + file = Utils.StripFilename(file) #print(file) var i @@ -478,7 +467,7 @@ static func LoadRMesh(file: String, rt: RoomTemplate): temp1i=0 for j1 in range(Constants.MaxRoomEmitters - 1): if rt.TempSoundEmitter[j1] == null: - rt.TempSoundEmitterX[j1] = reader.readFloat() * Constants.RoomScale + rt.TempSoundEmitterX[j1] = -reader.readFloat() * Constants.RoomScale rt.TempSoundEmitterY[j1] = reader.readFloat() * Constants.RoomScale rt.TempSoundEmitterZ[j1] = reader.readFloat() * Constants.RoomScale rt.TempSoundEmitter[j1] = reader.readInt() diff --git a/src/file_parsers/X.gd b/src/file_parsers/X.gd index 28a701c..d1a04f4 100644 --- a/src/file_parsers/X.gd +++ b/src/file_parsers/X.gd @@ -1,5 +1,39 @@ class_name X +# ending it right now, oh my god this is awful. +# https://learn.microsoft.com/en-us/windows/win32/direct3d9/dx9-graphics-reference-x-file-interfaces + +static func _CalcMinMaxPos(verts: PackedVector3Array) -> Vector3: + var minX: float = 0 + var maxX: float = 0 + var minY: float = 0 + var maxY: float = 0 + var minZ: float = 0 + var maxZ: float = 0 + for vert in verts: + if vert.x < minX: + minX = vert.x + if vert.x > maxX: + maxX = vert.x + if vert.y < minY: + minY = vert.y + if vert.y > maxY: + maxY = vert.y + if vert.z < minZ: + minZ = vert.z + if vert.z > maxZ: + maxZ = vert.z + return Vector3(abs(minX - maxX), abs(minY - maxY), abs(minZ - maxZ)) + +static func MeshWidth(mesh: Node) -> float: + return mesh.get_meta("meshWidth") + +static func MeshHeight(mesh: Node) -> float: + return mesh.get_meta("meshHeight") + +static func MeshDepth(mesh: Node) -> float: + return mesh.get_meta("meshDepth") + static func LoadModel(filePath: String): var sillyPath = str("res://", filePath.replace("/Map/", "/map/")) var file = FileAccess.open(sillyPath, FileAccess.READ) @@ -11,9 +45,12 @@ static func LoadModel(filePath: String): var fileLines = file.get_as_text(true).split("\n") var meshDataStart = false + var hitMeshOnce = false var indexDataStart = false var meshTextureCoordsStart = false + var hitTexCoordsOnce = false var textureNameStart = false + var hitTextureOnce = false var textureName = "" var texture: Texture2D = null var meshDataLength = -1 @@ -22,7 +59,16 @@ static func LoadModel(filePath: String): var verts = PackedVector3Array() var uvs = PackedVector2Array() var indexes = PackedInt32Array() + # oh god oh fuck i hope not + var is3dWorldStudioFile = false for line in fileLines: + if line.contains("3D World Studio"): + is3dWorldStudioFile = true + + var stripLine = line.strip_edges().strip_escapes().replace(" ", "") + if stripLine == "{" or stripLine == "}": + continue + if meshDataStart or indexDataStart: if meshDataStart and meshDataLength == -1: meshDataLength = int(line.strip_edges().split(";")[0]) @@ -53,17 +99,31 @@ static func LoadModel(filePath: String): if uvsDataLength == -1: uvsDataLength = int(line.strip_edges().split(";")[0]) else: - var uvParts = line.strip_edges().split(";") - if uvParts.size() == 4: - meshTextureCoordsStart = false - uvs.push_back(Vector2(float(uvParts[0]), float(uvParts[1]))) + # NOTE: THE FORMAT IS DIFFERENT ON FILES MADE IN + # 3D WORLD STUDIO FOR SOME REASON?! + if is3dWorldStudioFile: + var uvParts = line.strip_edges().strip_escapes().split(";") + if uvParts.size() == 3: + meshTextureCoordsStart = false + else: + var uvShit = uvParts[0].split(",") + uvs.push_back(Vector2(float(uvShit[0]), float(uvShit[1]))) + else: + var uvParts = line.strip_edges().strip_escapes().split(";") + if uvParts.size() == 4: + meshTextureCoordsStart = false + else: + uvs.push_back(Vector2(float(uvParts[0]), float(uvParts[1]))) - if line.strip_edges().contains("Mesh "): + if line.strip_edges().contains("Mesh ") and not hitMeshOnce: meshDataStart = true - elif line.strip_edges().contains("TextureFilename"): + hitMeshOnce = true + elif line.strip_edges().contains("TextureFilename") and not hitTextureOnce: textureNameStart = true - elif line.strip_edges().contains("MeshTextureCoords"): + hitTextureOnce = true + elif line.strip_edges().contains("MeshTextureCoords") and not hitTexCoordsOnce: meshTextureCoordsStart = true + hitTexCoordsOnce = true var mesh = MeshInstance3D.new() var arr_mesh = ArrayMesh.new() @@ -84,4 +144,8 @@ static func LoadModel(filePath: String): meshInstance.set_surface_override_material(0, mat) meshInstance.create_trimesh_collision() meshInstance.name = str(filePath, "_", Time.get_unix_time_from_system()) + var meshSize = _CalcMinMaxPos(verts) + meshInstance.set_meta("meshWidth", meshSize.x) + meshInstance.set_meta("meshHeight", meshSize.y) + meshInstance.set_meta("meshDepth", meshSize.z) return meshInstance diff --git a/src/objects/B3DTexture.gd b/src/objects/B3DTexture.gd index 9bbe15c..a4a7ab3 100644 --- a/src/objects/B3DTexture.gd +++ b/src/objects/B3DTexture.gd @@ -6,3 +6,4 @@ var blend: int = 0 var pos: Vector2 var scale: Vector2 var rotation: float = 0.0 +var tex: Texture2D diff --git a/src/objects/B3DVertices.gd b/src/objects/B3DVertices.gd index a0f1825..e64dafc 100644 --- a/src/objects/B3DVertices.gd +++ b/src/objects/B3DVertices.gd @@ -1,19 +1,10 @@ class_name B3DVertices -var flags: int: set = _flagsUpdated +var flags: int var tex_coord_sets: int = 1 var tex_coord_set_size: int = 0 -var containsNormals: bool = false -var containsColors: bool = false - -func _flagsUpdated(flagValue: int): - flags = flagValue - containsNormals = (flags & 1) != 0 - containsColors = (flags & 2) != 0 - - var vertices: PackedVector3Array = PackedVector3Array() var normals: PackedVector3Array = PackedVector3Array() var colors: PackedColorArray = PackedColorArray() -var uv: PackedVector2Array = PackedVector2Array() +var uv: Array = [] diff --git a/src/objects/Door.gd b/src/objects/Door.gd new file mode 100644 index 0000000..aa12819 --- /dev/null +++ b/src/objects/Door.gd @@ -0,0 +1,40 @@ +class_name Door + +var obj: Node3D +var obj2: Node3D +var frameobj: Node +var buttons = Utils.Init1DArray(2) # %[2] +var locked: bool +var open: bool +var angle: float +var openstate: int +var fastopen: float +var dir: float +var timer: float +var timerstate: float +var KeyCard: int +var room: Room + +var DisableWaypoint: bool + +var dist: float + +#var SoundCHN + +var Code: String + +var ID: int + +var Level: int +var LevelDest: int + +var AutoClose: bool + +var LinkedDoor: Door + +var IsElevatorDoor: bool = false + +var MTFClose: bool = true +var NPCCalledElevator: bool = false + +var DoorHitOBJ: Node3D diff --git a/src/objects/Room.gd b/src/objects/Room.gd index f4621b3..1fbafde 100644 --- a/src/objects/Room.gd +++ b/src/objects/Room.gd @@ -1,5 +1,11 @@ class_name Room +static var G_ROOM_ID = 0 +static func _GetRoomID(): + G_ROOM_ID += 1 + return G_ROOM_ID +var ID = _GetRoomID() + var zone: int var found