Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to use electric light in a regular custom history?
skafast Offline
Junior Member

Posts: 12
Threads: 1
Joined: Jan 2013
Reputation: 0
#1
Is it possible to use electric light in a regular custom history?

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!
(This post was last modified: 01-15-2013, 06:38 PM by skafast.)
01-15-2013, 04:49 AM
Find
str4wberrypanic Offline
Member

Posts: 241
Threads: 24
Joined: Jul 2012
Reputation: 8
#2
RE: Is it possible to use electric light in a regular custom history?

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.

(This post was last modified: 01-15-2013, 05:47 AM by str4wberrypanic.)
01-15-2013, 05:44 AM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#3
RE: Is it possible to use electric light in a regular custom history?

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: (Select All)
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.

In Ruins [WIP]
(This post was last modified: 01-15-2013, 06:18 AM by NaxEla.)
01-15-2013, 06:16 AM
Find
skafast Offline
Junior Member

Posts: 12
Threads: 1
Joined: Jan 2013
Reputation: 0
#4
RE: Is it possible to use electric light in a regular custom history?

All right, thank you guys! I'll take a look into it.
01-15-2013, 02:20 PM
Find




Users browsing this thread: 1 Guest(s)