Frictional Games Forum (read-only)

Full Version: Is it possible to use electric light in a regular custom history?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there, I've just began working on my first CS for Amnesia and I would like it to be an actual custom history instead of a Full-Conversion. I'm now writing the concept and the initial storyline and I had a little problem here; although I could easily transport this idea to ~160 years in the past, the original concept would take place in the present time, but, as I realized that electric light isn't something that belongs to the regular game, I decided to move it back in time. However, when I was showering today, an idea came into my mind, would it be possible to add electric light to a custom history via scripting? I'm asking because I haven't seen something like this before, it would go like (I don't know how to write this in Angel Script, yet):

If the player has a light bulb object selected and interact with a electric contact(I'm not quite sure how it's called, nor in my own language), then create object light bulb and a point light with some parameters(or a pre-lit light bulb) in a relative position to the electric contact so that it fits; then delete the light bulb from the inventory.

Would it work? If not, is it something possible by another way? If not... well, I'll just leave the history in the past, also, I have another project in mind already, so this one will be made more for gathering experience and such, I don't want to make it a long one nor bother people by making them install a full conversion for a relatively short experience.

Thanks for your attention guys!
Frictional Games released a game named Penumbra. It was released before Amnesia, and it do have what you want. You just have to import the entities from Penumbra to Amnesia. But since i don't know how to import things from Penumbra, i've taken entities from another modern stories, like White Night, one of the most known stories around here.

Edit: About your question, it's possible. You put the lamp in the editor, a pointlight in the room and then, something to light it, like a lever. This lever will activate and deactivate the lamp.
Here's a tutorial about converting Penumbra models to Amnesia: http://www.frictionalgames.com/forum/thread-5126.html

Regarding your light bulb idea, here's a script that should help you:

PHP Code:
void OnStart()
{
    
AddUseItemCallback("uselightbulb""lightbulb_1""AreaUseLightBulb""OnLightbulbUse"true);
}

void OnLightbulbUse(string &in asItemstring &in asEntity)
{
    
SetEntityActive("lightbulb_lit"true);  // make sure it's not active in the level editor (same for the light)
    
SetLightVisible("PointLight_1"true);  
    
RemoveItem(asItem);



lightbulb_1 = the light bulb in the players inventory
AreaUseLightbulb = the area that the player uses lightbulb_1 on
lightbulb_lit = the light bulb that will show in the level
PointLight_1 = the pointlight that creates the light generated by lightbulb_lit

Alternatively, you can just attach a point light to the light bulb entity in the model editor.
All right, thank you guys! I'll take a look into it.