Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Main loop that begins once initShmup() is executed.
- if booleanInitScroll == true then
- if objectPlayer:isValid() then --Player Validity Check
- --Keep the play on the same X or y coordinate as the camera.
- if str_direcion == "h" then
- local posX = ship_central_camera.Position["x"]
- local constPos = ba.createVector(posX,objectPlayer.Position["y"],objectPlayer.Position["z"])
- objectPlayer.Position = constPos
- else --vertical mode
- local posY = ship_central_camera.Position["y"]
- local constPos = ba.createVector(objectPlayer.Position["x"],posY,objectPlayer.Position["z"])
- objectPlayer.Position = constPos
- end
- ft = ba.getFrametime(false)
- --Horizontal Position Limit
- --AOD 2/13/13 Added Bounded Free Movement Mode.
- if objectPlayer.Position["x"] > floatHLimit then
- local playPos = ba.createVector((floatHLimit - 1), objectPlayer.Position["y"], objectPlayer.Position["z"])
- objectPlayer.Position = playPos
- elseif objectPlayer.Position["x"] < floatHRLimit then
- local playPos = ba.createVector((floatHRLimit + 1), objectPlayer.Position["y"], objectPlayer.Position["z"])
- objectPlayer.Position = playPos
- end
- if bool_freeDepthMovement == true then
- if objectPlayer.Position["y"] < int_freeVertMoveUpperBound and objectPlayer.Position["y"] > int_freeVertMoveLowerBound then
- local temp = ba.createVector(ship_central_camera.Position["x"],objectPlayer.Position["y"],ship_central_camera.Position["z"])
- ship_central_camera.Position = temp
- if str_direction == "h" then
- floatHLimit = (ship_central_camera.Position["x"] + 155)
- floatVLimit = (ship_central_camera.Position["y"] + 88)
- floatFLimit = (ship_central_camera.Position["z"] + 155)
- floatHRLimit = (ship_central_camera.Position["x"] - 155)
- floatVRLimit = (ship_central_camera.Position["y"] - 88)
- floatFRLimit = (ship_central_camera.Position["z"] - 155)
- elseif str_direction == "v" then
- floatHLimit = (ship_central_camera.Position["x"] + 155)
- floatVLimit = (ship_central_camera.Position["y"] + 155)
- floatFLimit = (ship_central_camera.Position["z"] + 88)
- floatHRLimit = (ship_central_camera.Position["x"] - 155)
- floatVRLimit = (ship_central_camera.Position["y"] - 155)
- floatFRLimit = (ship_central_camera.Position["z"] - 88)
- end
- end
- end
- --Vertical Position Limit
- --AOD 2/4/13 Added Bounded Free Movement Mode.
- if objectPlayer.Position["y"] > floatVLimit then
- local playPos = ba.createVector(objectPlayer.Position["x"],(floatVLimit - 1), objectPlayer.Position["z"])
- objectPlayer.Position = playPos
- elseif objectPlayer.Position["y"] < floatVRLimit then
- local playPos = ba.createVector(objectPlayer.Position["x"],(floatVRLimit + 1), objectPlayer.Position["z"])
- objectPlayer.Position = playPos
- end
- if bool_freeVertMovement == true then
- if objectPlayer.Position["y"] < int_freeVertMoveUpperBound and objectPlayer.Position["y"] > int_freeVertMoveLowerBound then
- local temp = ba.createVector(ship_central_camera.Position["x"],objectPlayer.Position["y"],ship_central_camera.Position["z"])
- ship_central_camera.Position = temp
- --bounds are different based on scrolling mode.
- if str_direction == "h" then
- floatHLimit = (ship_central_camera.Position["x"] + 155)
- floatVLimit = (ship_central_camera.Position["y"] + 88)
- floatFLimit = (ship_central_camera.Position["z"] + 155)
- floatHRLimit = (ship_central_camera.Position["x"] - 155)
- floatVRLimit = (ship_central_camera.Position["y"] - 88)
- floatFRLimit = (ship_central_camera.Position["z"] - 155)
- elseif str_direction == "v" then
- floatHLimit = (ship_central_camera.Position["x"] + 155)
- floatVLimit = (ship_central_camera.Position["y"] + 155)
- floatFLimit = (ship_central_camera.Position["z"] + 88)
- floatHRLimit = (ship_central_camera.Position["x"] - 155)
- floatVRLimit = (ship_central_camera.Position["y"] - 155)
- floatFRLimit = (ship_central_camera.Position["z"] - 88)
- end
- end
- end
- --Forward Position Limit
- --AOD 2/4/13 Added Bounded Free Movement Mode.
- if objectPlayer.Position["z"] > floatFLimit then
- local playPos = ba.createVector(objectPlayer.Position["x"],objectPlayer.Position["y"],(floatFLimit - 1))
- objectPlayer.Position = playPos
- elseif objectPlayer.Position["z"] < floatFRLimit then
- local playPos = ba.createVector(objectPlayer.Position["x"],objectPlayer.Position["y"],(floatFRLimit + 1))
- objectPlayer.Position = playPos
- end
- if bool_freeHoriMovement == true then
- if objectPlayer.Position["z"] < int_freeHoriMoveUpperBound and objectPlayer.Position["z"] > int_freeHoriMoveLowerBound then
- local temp = ba.createVector(ship_central_camera.Position["x"],ship_central_camera.Position["y"],objectPlayer.Position["z"])
- ship_central_camera.Position = temp
- if str_direction == "h" then
- floatHLimit = (ship_central_camera.Position["x"] + 155)
- floatVLimit = (ship_central_camera.Position["y"] + 88)
- floatFLimit = (ship_central_camera.Position["z"] + 155)
- floatHRLimit = (ship_central_camera.Position["x"] - 155)
- floatVRLimit = (ship_central_camera.Position["y"] - 88)
- floatFRLimit = (ship_central_camera.Position["z"] - 155)
- elseif str_direction == "v" then
- floatHLimit = (ship_central_camera.Position["x"] + 155)
- floatVLimit = (ship_central_camera.Position["y"] + 155)
- floatFLimit = (ship_central_camera.Position["z"] + 88)
- floatHRLimit = (ship_central_camera.Position["x"] - 155)
- floatVRLimit = (ship_central_camera.Position["y"] - 155)
- floatFRLimit = (ship_central_camera.Position["z"] - 88)
- end
- end
- end
- --AndrewofDoom's mod: addition of scrolling
- if booleanInitScroll == true then --double check to see if this still is really true.
- --intSavedCamPosX = intSavedCamPosX + (floatScrollX*ft)
- --intSavedCamPosY = intSavedCamPosY + (floatScrollY*ft)
- --intSavedCamPosZ = intSavedCamPosZ + (floatScrollZ*ft)
- vectorCCameraPos = ba.createVector(ship_central_camera.Position["x"] + 250,ship_central_camera.Position["y"],ship_central_camera.Position["z"])
- objectCCamera:setPosition(vectorCCameraPos)
- gr.setCamera(objectCCamera)
- floatHLimit = floatHLimit + (floatScrollX*ft)
- floatVLimit = floatVLimit + (floatScrollY*ft)
- floatFLimit = floatFLimit + (floatScrollZ*ft)
- ---Set movement limits again for the rear. The original version makes the assumption that the player's postion will be along the origin and thus symmetrical, which will not be the case if the camera is scrolling.
- floatHRLimit = floatHRLimit + (floatScrollX*ft)
- floatVRLimit = floatVRLimit + (floatScrollY*ft)
- floatFRLimit = floatFRLimit + (floatScrollZ*ft)
- --all scrolling related to slaved ships.
- if slaveShips ~= nil then
- for i=1,#slaveShips do
- local scrollS = slaveShips[i]
- if scrollS ~= nil then --If this ship is null, don't bother playing with it.
- local pos = scrollS.Position
- if slaveToX[i] == true then
- pos["x"] = pos["x"] + (floatScrollX*ft)
- end
- if slaveToY[i] == true then
- pos["y"] = pos["y"] + (floatScrollY*ft)
- end
- if slaveToZ[i] == true then
- pos["z"] = pos["z"] + (floatScrollZ*ft)
- end
- scrollS.Position = pos
- slaveShips[i] = scrollS
- end
- end
- end
- ---enforce projectile positions relative to scrolling and cull offscreen projectiles firing from the player or targetting the player.
- local numWeps = #mn.Weapons
- for i=1,numWeps do
- local wep = mn.Weapons[i]
- local wPos = wep.Position
- if wep.Parent == hv.Player or wep.Target == hv.Player then
- --Check for out of bounds
- if (wPos["y"] > floatVLimit or wPos["y"] < floatVRLimit or wPos["z"] > floatFLimit or wPos["z"] < floatFRLimit or wPos["x"] > floatHLimit or wPos["x"] < floatHRLimit) and not(wep.Target == hv.Player and ((wep.Parent.Position["x"]+155) < hv.Player.Position["x"] or (wep.Parent.Position["x"]-155) > hv.Player.Position["x"])) then
- wep.LifeLeft = 0.0 --Terminate weapon
- end
- if wep.LifeLeft > 0 then
- --if still in bounds, apply scrolling.
- wPos["x"] = wPos["x"] + (floatScrollX*ft)
- if wep.Parent == hv.Player then
- wPos["x"] = wPos["x"] + (floatScrollX*ft)
- wPos["y"] = wPos["y"] + (floatScrollY*ft)
- wPos["z"] = wPos["z"] + (floatScrollZ*ft)
- end
- wep.Position = wPos
- end
- end
- if wep.LifeLeft > 0 then --if this projectile is dead, then don't bother.
- --force these projectiles from these ships to have their scrolling force to player position and 0'd x component velocities.
- --May seem like an ugly O(n^2) algorithm, but this stuff is usually reserved for important enemies. Namely, bosses which are usually one, MAYBE two, in count.
- for j=1, #forcedProjShipsToPlayerAxis do
- if forcedProjShipsToPlayerAxis[j] ~= nil then --if there is no one here, then don't bother.
- if wep.Parent == forcedProjShipsToPlayerAxis[j] then
- local wepPos = ba.createVector(objectPlayer.Position["x"],wep.Position["y"],wep.Position["z"])
- wep.Position = wepPos
- local wepVel = ba.createVector(0,wep.Physics.Velocity["y"],wep.Physics.Velocity["z"])
- wep.Physics.Velocity = wepVel
- wep.Physics.VelocityDesired = wepVel
- wep.Physics.VelocityMax = wepVel
- local wepOrient = ba.createOrientation(wep.Orientation["p"],wep.Orientation["b"],0.0)
- wep.Orientation = wepOrient
- end
- end
- end
- end
- mn.Weapons[i] = wep --Apply weapon change
- end
- end
- --Force the player's "scroll speed" to be a minimum velocity because LOLCOLLISIONDETECTION requires at least one of the pair to have a velocity =/= 0
- local diffToApplyX = (floatScrollX*59*ft*(5/3))/(1-ft) --This equation is able to compensate for shitty computers. I've tested it at 20 FPS up to 60 FPS. If you get less than 20, you prolly shouldn't be playing this anyway.
- local diffToApplyY = (floatScrollY*59*ft*(5/3))/(1-ft)
- local diffToApplyZ = (floatScrollZ*59*ft*(5/3))/(1-ft)
- shmup_idle_pscroll_speed = ba.createVector((diffToApplyX),(diffToApplyY),(diffToApplyZ))
- local newSpeedX = objectPlayer.Physics.Velocity["x"] + diffToApplyX
- local newSpeedY = objectPlayer.Physics.Velocity["y"] + diffToApplyY
- local newSpeedZ = objectPlayer.Physics.Velocity["z"] + diffToApplyZ
- local play_Val = ba.createVector(newSpeedX,newSpeedY,newSpeedZ)
- objectPlayer.Physics.Velocity = play_Val
- objectPlayer.Physics.VelocityDesired = play_Val
- --tilt the player model based on the vertical velocity of the ship wrt vertical scrolling.
- if tilt_model == nil then --should only happen once. Get the Ship for the external view
- tilt_model = mn.Ships['Tilter']
- ship_amount_tilted = 0
- if tilt_model ~= nil then
- tilt_model.CollisionGroups = 1
- end
- elseif isTilting then --if tilting mode is on, go to this.
- if tilt_model:isValid() then
- --first move the position of the model on top of the player.
- local newPos = ba.createVector(objectPlayer.Position["x"],objectPlayer.Position["y"],objectPlayer.Position["z"])
- tilt_model.Position = newPos
- --Thruster strength
- if objectPlayer.Physics.Velocity["z"] > (shmup_idle_pscroll_speed["z"] + (0.75*objectPlayer.Physics.VelocityMax["z"])) then
- tilt_model.Physics.ForwardThrust = 1.0
- elseif objectPlayer.Physics.Velocity["z"] < (shmup_idle_pscroll_speed["z"] - (0.75*objectPlayer.Physics.VelocityMax["z"])) then
- tilt_model.Physics.ForwardThrust = 0.1
- else
- tilt_model.Physics.ForwardThrust = 0.5
- end
- --tilting amount
- if (objectPlayer.Physics.Velocity["y"] > (shmup_idle_pscroll_speed["y"] + (0.5*objectPlayer.Physics.VelocityMax["y"])) or objectPlayer.Physics.Velocity["x"] > (shmup_idle_pscroll_speed["x"] + (0.5*objectPlayer.Physics.VelocityMax["x"]))) then
- if ship_amount_tilted < 1.0 then
- ship_amount_tilted = ship_amount_tilted + 1.5*ft
- local new_orient = ba.createOrientation(tilt_model.Orientation["p"],tilt_model.Orientation["b"] + (1.5*ft),tilt_model.Orientation["h"])
- tilt_model.Orientation = new_orient
- end
- elseif (objectPlayer.Physics.Velocity["y"] < (shmup_idle_pscroll_speed["y"] - (0.5*objectPlayer.Physics.VelocityMax["y"]) or objectPlayer.Physics.Velocity["x"] < (shmup_idle_pscroll_speed["x"] - (0.5*objectPlayer.Physics.VelocityMax["x"]))) then
- if ship_amount_tilted > -1.0 then
- ship_amount_tilted = ship_amount_tilted - 1.5*ft
- local new_orient = ba.createOrientation(tilt_model.Orientation["p"],tilt_model.Orientation["b"] - (1.5*ft),tilt_model.Orientation["h"])
- tilt_model.Orientation = new_orient
- end
- else
- if tilt_model.Orientation["b"] ~= 0.0 then --Player has stopped moving. Move the fighter to rest position.
- if (tilt_model.Orientation["b"] < 0.05 or tilt_model.Orientation["b"] > -0.05) then
- local new_orient = ba.createOrientation(tilt_model.Orientation["p"],0.0,tilt_model.Orientation["h"])
- tilt_model.Orientation = new_orient
- ship_amount_tilted = 0
- elseif tilt_model.Orientation["b"] > 0.05 then
- local new_orient = ba.createOrientation(tilt_model.Orientation["p"],tilt_model.Orientation["b"] - (1.5*ft),tilt_model.Orientation["h"])
- tilt_model.Orientation = new_orient
- ship_amount_tilted = ship_amount_tilted - 1.5*ft
- elseif tilt_model.Orientation["b"] < -0.05 then
- local new_orient = ba.createOrientation(tilt_model.Orientation["p"],tilt_model.Orientation["b"] + (1.5*ft),tilt_model.Orientation["h"])
- tilt_model.Orientation = new_orient
- ship_amount_tilted = ship_amount_tilted + 1.5*ft
- end
- end
- end
- end
- end
- end --Player Validity Check
- end
- --initializes all needed variables and then sets the camera. an object called Center MUST exist for it to start.
- --Next thing that MUST be done after calling this is to slave a Trip Line Trigger object called Center.
- function initShmup(str_direction)
- if str_direction == nil then --for backwards compatibility, it will default to horizontal
- str_direction = "h"
- end
- ship_central_camera = mn.Ships['Center'] --Look for a ship called Center to...well center the view on.
- objectPlayer = hv.Player
- if ship_central_camera ~= nil and ship_central_camera:isValid() then
- --These are the slaves to our scrolling system. Every ship and associated boolean must all be aligned to the same index!
- slaveShips = {}
- slaveToX = {}
- slaveToY = {}
- slaveToZ = {}
- forcedProjShipsToPlayerAxis = {}
- vect_zero_vel = ba.createVector(0,0,0)
- ---Create 'blank' orientation
- ---these rotations are in RADIANS, not degrees.
- if str_direction == "h" then
- orientationBlank = hv.Player.Orientation
- orientationBlank["p"] = 0
- orientationBlank["b"] = 0
- orientationBlank["h"] = -1.57
- intSavedCamPosX = ship_central_camera.Position["x"] + 250
- intSavedCamPosY = ship_central_camera.Position["y"]
- intSavedCamPosZ = ship_central_camera.Position["z"]
- ---Set movement box limits
- floatHLimit = (ship_central_camera.Position["x"] + 155)
- floatVLimit = (ship_central_camera.Position["y"] + 88)
- floatFLimit = (ship_central_camera.Position["z"] + 155)
- --- Set movement limits again for the rear. The original version makes the assumption that the player's postion will be
- --- along the origin and thus symmetrical, which will not be the case if the camera is scrolling.
- floatHRLimit = (ship_central_camera.Position["x"] - 155)
- floatVRLimit = (ship_central_camera.Position["y"] - 88)
- floatFRLimit = (ship_central_camera.Position["z"] - 155)
- elseif str_direction == "v" then
- orientationBlank = hv.Player.Orientation
- orientationBlank["p"] = -1.57
- orientationBlank["b"] = 0
- orientationBlank["h"] = 0
- intSavedCamPosX = ship_central_camera.Position["x"]
- intSavedCamPosY = ship_central_camera.Position["y"] + 250
- intSavedCamPosZ = ship_central_camera.Position["z"]
- ---Set movement box limits
- floatHLimit = (ship_central_camera.Position["x"] + 155)
- floatVLimit = (ship_central_camera.Position["y"] + 155)
- floatFLimit = (ship_central_camera.Position["z"] + 88)
- --- Set movement limits again for the rear. The original version makes the assumption that the player's postion will be
- --- along the origin and thus symmetrical, which will not be the case if the camera is scrolling.
- floatHRLimit = (ship_central_camera.Position["x"] - 155)
- floatVRLimit = (ship_central_camera.Position["y"] - 155)
- floatFRLimit = (ship_central_camera.Position["z"] - 88)
- else
- ba.error("Something went wrong in the init of the shmup.")
- end
- ---Scroll rates for each axis
- floatScrollX = 0
- floatScrollY = 0
- floatScrollZ = 0
- shmup_idle_pscroll_speed = vect_zero_vel --just in case
- vectorCCameraPos = ba.createVector(intSavedCamPosX,intSavedCamPosY,intSavedCamPosZ)
- orientationCCamera = orientationBlank
- --Use the player camera at the start and move it out of first person for a wonderful out-of-body experience.
- objectCCamera = gr.Cameras[1]
- objectCCamera:setPosition(vectorCCameraPos)
- objectCCamera:setOrientation(orientationBlank)
- ---Use the new chase camera
- gr.setCamera(objectCCamera)
- booleanInitScroll = true
- --Just in case the free move vars don't get initialized.
- bool_freeVertMovement = false
- int_freeVertMoveUpperBound = 0
- int_freeVertMoveLowerBound = 0
- bool_freeHoriMovement = false
- int_freeHoriMoveUpperBound = 0
- int_freeHoriMoveLowerBound = 0
- tilter() --turn on rotation model if availiable.
- else
- ba.error("No view was found to center on. Make sure there is a ship called Center to point the camera on.")
- end
- end
- function tilter()
- isTilting = true
- end
- function noTilter()
- isTilting = false
- end
- function fvm(int_vertupper,int_vertlower)
- floatScrollY = 0
- bool_freeVertMovement = true
- int_freeVertMoveUpperBound = int_vertupper
- int_freeVertMoveLowerBound = int_vertlower
- end
- function dvm()
- bool_freeVertMovement = false
- int_freeVertMoveUpperBound = 0
- int_freeVertMoveLowerBound = 0
- end
- function fhm(int_horiupper,int_horilower)
- floatScrollZ = 0
- bool_freeHoriMovement = true
- int_freeHoriMoveUpperBound = int_horiupper
- int_freeHoriMoveLowerBound = int_horilower
- end
- function dhm()
- bool_freeHoriMovement = false
- int_freeHoriMoveUpperBound = 0
- int_freeHoriMoveLowerBound = 0
- end
- --Modifies the scroll speed of the camera on any axes a man desires..
- --Value is in meters/frame, but is converted to meters/60 frames by this function for use when it's multiplied by ba.getFrameTime in the main simulation loop.
- function setScrollSpeed(x,y,z)
- floatScrollX = (x*60)
- floatScrollY = (y*60)
- floatScrollZ = (z*60)
- end
- --Sets the current Status of the camera scrolling. initShmup must be called first to avoid funny stuff from happening.
- --True turns it on, false to turn it off and resets the camera view to the player ship.
- function setSA(booleanSwitch)
- if booleanSwitch == true then
- vectorCCameraPos = ba.createVector((ship_central_camera.Position["x"]-250),ship_central_camera.Position["y"],ship_central_camera.Position["z"])
- objectCCamera:setPosition(vectorCCameraPos)
- gr.setCamera(objectCCamera)
- --Do NOT assume the player's position hasn't changed, therefore reset the bounds.
- floatHLimit = ship_central_camera.Position["x"] + 30
- floatVLimit = ship_central_camera.Position["y"] + 88
- floatFLimit = ship_central_camera.Position["z"] + 160
- floatHRLimit = ship_central_camera.Position["x"] - 30
- floatVRLimit = ship_central_camera.Position["y"] - 90
- floatFRLimit = ship_central_camera.Position["z"] - 160
- --Everything's set. Time to start scrolling again.
- booleanInitScroll = true
- elseif booleanSwitch == false then
- --Disable camera and scrolling, probably for a cutscene or something of that matter.
- booleanInitScroll = false
- gr.setCamera()
- else
- --nothing
- end
- end
- --This is specific to the player ship. Will slave the player ship to the right axes.
- function sp(player_name)
- sTSC(play_name,true,false,false) --Just call sTSC and fill what the player needs to be slaved to.
- end
- --Will cause the specified ship to be slaved to scrolling system and will move relative to the camera instead for the specified axes
- --Note that these ships still do not adhere to the boundary enclosure like the player is.
- function sTSC(shipToSlave,booleanSlaveXAxis,booleanSlaveYAxis,booleanSlaveZAxis)
- local toAdd = mn.Ships[shipToSlave]
- if toAdd ~= nil then --sanity check
- slaveShips[(#slaveShips+1)] = toAdd
- slaveToX[(#slaveToX+1)] = booleanSlaveXAxis
- slaveToY[(#slaveToY+1)] = booleanSlaveYAxis
- slaveToZ[(#slaveToZ+1)] = booleanSlaveZAxis
- end
- end
- --removes a slaved ship.
- function rss(slavedShip)
- local toChange = mn.Ships[slavedShip]
- local intIndex = 0
- for i=1, #slaveShips do
- if slaveShips[i] == toChange then
- intIndex = i -- found the ship, assign the index and break out of the for loop.
- break
- end
- end
- if intIndex >= 1 then --if this number is >= 1 then I have found something.
- slaveShips[intIndex] = nil --this may be potentially dangerous, but any good man should always check for null when iterating an array.
- end
- end
- --Forces this ships projectiles to be on the same axis on the player's (the x-axis)
- --Needs to be done before it starts shooting.
- --Seems to not work for now, as collision pairs are culled immediately because of it.
- function pgopx(pgopx_ship)
- local toAdd = mn.Ships[pgopx_ship]
- if toAdd ~= nil then
- forcedProjShipsToPlayerAxis[(#forcedProjShipsToPlayerAxis+1)] = toAdd
- end
- end
- function enableScrollDebug()
- boolean_scroll_debug = true
- end
- --Have the camera look at the player! true for yes, no to look back at the center of screen.
- function stareAtPlayer(boolean_face)
- if boolean_face == true then
- objectCCamera.Target = objectPlayer
- elseif boolean_face == false then
- objectCCamera.Target = mn.Ships['Center']
- if objectCCamera.Target == nil then
- ba.error("Center object does not exist!")
- end
- end
- end
- --This function extend's the player's life count by one.
- function addLife()
- if plr_life_count == nil then
- if mn.SEXPVariables['plrLives'] ~= nil then
- plr_life_count = mn.SEXPVariables['plrLives']
- end
- --for i=1, #mn.SEXPVariables do
- -- if tostring(mn.SEXPVariables[i]) == "plrLives" then --Once we find the variable, it's time to break out.
- -- plr_life_count = mn.SEXPVariables[i]
- -- break
- -- end
- --end
- if plr_life_count == nil then --if still nil then there is no variable and we shall error the player out.
- ba.error("No sexpvariable handle named 'plrLives' could be found. Game will not function properly.")
- end
- end
- if plr_life_count ~= nil and plr_life_count:isValid() then
- plr_life_count.Value = plr_life_count.Value + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment