Frictional Games Forum (read-only)

Full Version: Desk gas lamp help?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hey there,

I'm not sure if this has been posted before, but I have a question.
Is there a way to interact with the desk gas lamps from A:AMFP (the green one and the one with the flowers)?
To be more specific, is it possible to get the player to turn on/off the lamp by clicking on it just like in machine for piggies?
I kind of searched through their scripts but I could't find anything. It's not anything to do with the options in the Entity tab in the Editor either.
It was a neat little feature, and I was just wondering if it is possible.

Thanks in advance.
It's possible. Click on the lamp on the LevelEditor, select Entity in the right side corner, and put whatever you call it in the PlayerInteractCallback. Don't tick the box below.

Then put this script in your HPS file.
Spoiler below!

PHP Code:
void MyFunc(string &in asEntity)
{
SetLocalVarInt("OnState"1);
SetLampLit("LampName"truetrue);
if(
GetLocalVarInt("OnState") == 1)
{
SetLampLit("LampName"falsetrue);
}


i was searching for this two Smile

SomethingRidiculous i will give you some reputation Smile
I think you meant to do something like this:

PHP Code:
void MyFunc(string &in asEntity)
{
    if(
GetLocalVarInt("OnState") == 1)
    {
        
SetLampLit("LampName"falsetrue);
        
SetLocalVarInt("OnState"0);
    }
    else {
        
SetLampLit("LampName"truetrue);
        
SetLocalVarInt("OnState"1);
    }


I also recommend using something like asEntity+"Light" for the light name and var name, so you can reuse the same code for all lamps. Perhaps even add the "tick" sound effect in there.
I have created the lamp as an individual toutching lamp.
When toutching it, it turns on \ off..
For interest i'll upload it here for those who are.
So, NO scripts needed.
i'm interested Big Grin
Mudbill (and SomethingRidiculous), that works great!
And DnALANGE - I'm interested as well. I need to see which one works better and easier; with or without script. Smile
Here is the desktop Lamp you guys wanted.
There are some extra's as well.
Created also some slow\fast flickering ones and some others, be free to check \use them.
The one YOU GUYS wanted is called : gas_lamp_desk_Button_Raidex.ent
And the one with the FLOWERS is : gas_lamp_desk_flowers_Button.ent
--
As you can see, i've been creating these lamps for Raidex from the forum before.
Just add this folder to your story\mod.
Select it in the leveleditor : go to Amnesia\YOURMOD... you probly know how it works Wink
---
Enjoy and let me know if you liked it.
Greetings from me.
Yeps i do. Ill send them asap.
EDIT:
Here are the MFP-WALL_LAMPS.
I have created several kind of types.
Fast flicker\
Slow\
Medium...
There are plenty enough for everyone i think.
Enjoy and just credit me ( IF i do a lot of work \ puzzling \ editing please )
Enjoy!
(06-10-2014, 11:47 AM)DnALANGE Wrote: [ -> ]Here is the desktop Lamp you guys wanted.
There are some extra's as well.
Created also some slow\fast flickering ones and some others, be free to check \use them.
The one YOU GUYS wanted is called : gas_lamp_desk_Button_Raidex.ent
And the one with the FLOWERS is : gas_lamp_desk_flowers_Button.ent
--
As you can see, i've been creating these lamps for Raidex from the forum before.
Just add this folder to your story\mod.
Select it in the leveleditor : go to Amnesia\YOURMOD... you probly know how it works Wink
---
Enjoy and let me know if you liked it.
Greetings from me.

I love it! Works great, just the way I wanted it to. Btw, do you have flicker versions of the wall gas lamps too? Just wondering.
Thanks! Big Grin
(06-10-2014, 11:47 AM)DnALANGE Wrote: [ -> ]Here is the desktop Lamp you guys wanted.
There are some extra's as well.
Created also some slow\fast flickering ones and some others, be free to check \use them.
The one YOU GUYS wanted is called : gas_lamp_desk_Button_Raidex.ent
And the one with the FLOWERS is : gas_lamp_desk_flowers_Button.ent
--
As you can see, i've been creating these lamps for Raidex from the forum before.
Just add this folder to your story\mod.
Select it in the leveleditor : go to Amnesia\YOURMOD... you probly know how it works ;)
---
Enjoy and let me know if you liked it.
Greetings from me.
Yeps i do. Ill send them asap.
EDIT:
Here are the MFP-WALL_LAMPS.
I have created several kind of types.
Fast flicker\
Slow\
Medium...
There are plenty enough for everyone i think.
Enjoy and just credit me ( IF i do a lot of work \ puzzling \ editing please )
Enjoy!



never mind
Pages: 1 2 3