Free Basic FPS Horror Type Package

I wanted to share with everyone some things i found on the Unity Answers site and some things i worked on a bit, some scripts I have paid to make happen and some that were provided by awesome people. Very basic but a great start for some! Hope you enjoy. Put in all the notes and things I thought anyone might want to use.

MOST RECENT UPDATE: -Flickering Light script
-Object Movable Indicator
-Item Pickup Indicator
-PlayaudioOneshot script
-Text Tooltip Script
-Spawn Prefab Script
-Kill Prefab Script

Exisiting Functions: better flashlight, door sounds and lock/unlock functionality.

MOST RECENT UPDATE 2.5 Download http://www.4shared.com/rar/Y4HG26O9/ScaryGame_3.html?

__**UPDATE 2.5 Video Link http://www.youtube.com/watch?v=6Lzn_pRIfJI&list=PLwc2jb3IjPt6xmSeFI14WplwqER_DQkpf&index=5**__

Special AWESOME KUDOS to combatDave for the door and key scripts, and Fuzzfas for making the walking sounds scripts possible and Jonas Planck for the spawn prefab and kill prefab scripts!

Follow my personal project and some bits on this community project here on Facebook http://www.facebook.com/pages/The-Calling-Prologue/441265279269089?ref=hl

If you would like to help add to this script collection/community shared project here are some things that would be great to add.

  • a script that can be attached to any object you can interact with the E key. EXAMPLE, you hit E on a coffee can or painting to examine it and it plays an the audio description but also gives you points. EXAMPLE 2, you pick up a note to read it with the E key and in addition it gives you points. These points add up and will be tracked through the entire game till the end when a grand total would be shown.

-Improvements to the existing note script:
A. once you have a note open and displayed on the screen, lock character and camera movements.
B. Blur the background and or darken the background so focus is on the note not on the surroundings.
C. Add a secondary Note type that once the character closes the note it teleports the character to a different level.
D. Make it so you can display the note with actual writing you cannot really read but in the foreground have bold white text to display what the character is reading? IE like when reading notes or books in the popular games Penumbra/Amnesia

-Safe/Comination Lock mini game/puzzle. You find numbers written on paper and then go to a safe or lock and apply those numbers to unlock the door.

-Anything you think that would be awesome,fun, useful or add to gameplay for this community project.

If you would like to submit a script to add to this community project and of course get your kudos, please download the project files as they exist now, make the script work with it and message me via these forums with the download link to see if we can make it an offical update/addon.

Be aware that any scripts that you submit for this project will then become public domain and may be used in any project, commercial or otherwise.

looks pretty good, Thanks :slight_smile:

Nice code snippets. Thank you for sharing.

Your Welcome pspdude and no problem RoyS :slight_smile:

Thankyou. I had a look at this and underestimated its usefullness… until I needed one of the scripts. Thank you so much, you are awesome.

Absolutely scutioncup! Happy you found a use!

Are you okay if people expand upon this? I have a little downtime, and I think I could contribute some useful scripts/models or something.

I have no problem with that suctioncup. Sharing is caring and I think the more we all share with each other the more awesome little games that will be floating along. :slight_smile: Just give props where props are due, such as those that answer questions, help you, etc…its all about paying it forward :slight_smile:

Hey, thanks it helped a lot :slight_smile:
I made use of the mouseLook.cs

Here is another torch script (I didn’t use the tutorial you linked to, but it does the same thing)

#pragma strict
//Makes you write with stricter formatting, which in turn increases the efficiency of the script

//Batteries
var batteries : int = 5;

//How much charge per battery
var charge : float = 100;

private var chargeDisp : float = 0;
/*^^ this is just used to display the variable through GUI.Label -- when a (Long) variable changes
many times, very fast, unity cannot keep up with redrawing the variable at that speed,
and so the text flashes. I don't like the look of it. This converts it down
a couple of decimal places, which makes it easier on the engine. I like how it looks at 2
decimal places. Convert it to 1, for no decimal places, and 100 for two decimal places.
1 is the number, 0 is a decimal place*/

//The actual torchlight object
var torch : Light;

//Speed at which the light decreases
var speed : float = 5;

//Used to turn light on or off
private var lightState : boolean = false;


function Awake() //Called before anything in a script, even called before start
{
torch.intensity = 1; //Set the intensity to 1 (1 is defined as 100 charge)
}

function Update ()
{
	chargeDisp = Mathf.Round(charge * 100) / 100; //See line under variable declaration
	
	if(lightState  charge > 0) //If mouse has been pressed, and there is still charge in the battery
	{
		torch.enabled = true; //Turn on the torch
		charge -= Time.deltaTime * speed; //Decrease the charge
	} else { //If one of the terms has not been met (IE, mouse isn't pressed or there is no charge
		torch.enabled = false; //Turn the torch off
	}
	
	if(charge <= 0  batteries > 0) //If charge is less or equal to 0, and if batteries is above 0
	{
	batteries = batteries -1; //Take on from the batteries
	lightState = !lightState; //Toggle lightState
	charge = 100; //Charge equals 100 (This simulates putting another battery in the torch. 1 less battery, full charge
	}
	
	if(batteries == 0) //If there is no batteries
	{
	charge = 0; //There is no charge. This stops 'Batteries 1', 'Charge 100' from happening
	}
	
	if(Input.GetMouseButtonDown(0)) //Called when the mouse left click is down
	{
		lightState = !lightState; //Toggle lightState
	}
	
	if(charge < 2) //If charge is less than 2
	{
		torch.intensity = charge; //The torches intensity equals its charge. This makes the torch brighter, but then it fades out pretty quickly
	}
}

function OnGUI()
{
    GUI.Label (Rect (10, 10, 100, 20), "Batteries:  " + batteries); //Display for batteries
    GUI.Label (Rect (10, 50, 100, 20), "Charge:  " + chargeDisp); //Display for charge. 
}

Heavily commented. Also, if you would like, I can add in torch fading. Like, if the battery charge was something like 10%, the torch would be pretty dim. Its pretty easy to implement.
I put the fading thing in. It doesn’t fade over the whole torch charge, but when the charge gets to 1 or so, the torch suddenly gets brighter, and then fades.

Also, it is fairly trivial to add in a torch icon beside the text display. I can do that too, if anyone wants.

Awesome man! I think one thing that would be great for us all to try to add is sound to the doors, when you click and drag to open the door it make a door opening sound if your no longer clicking and dragging the sound stops. Been trying to get answers to that one for awhile. It might be complex? I’m not sure. Also when you hover over an rigidbody object such as the door that you can manipulate a little 2 hand icon appears. hmmmmm

Are you going to be updating this at all from time to time?

thanks ¡¡¡

Once my game is finished, I will most likely be contributing to this package, until then, its up to MadToLove.

yes pspdude, as I move forward with my game and find other things I think would suit this I will. And when I finish my game, I will probably release a basic level with the majority of my game mechanics in tact.

your welcome technodc!

Looks good, thanks for sharing!

Sweet, btw your game looks really nice :slight_smile: love that source of light :stuck_out_tongue:

EDIT: Oh wait… wasn’t your game >.< My bad :stuck_out_tongue:

Got it updated and the update is released :slight_smile:

You’re Welcome Rush, Update released yesterday with some more goodies. Hope you enjoy!