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
Desk gas lamp help?
Artsy Offline
Member

Posts: 213
Threads: 10
Joined: Feb 2014
Reputation: 9
#1
Desk gas lamp help?

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.
06-09-2014, 10:38 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Desk gas lamp help?

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: (Select All)
void MyFunc(string &in asEntity)
{
SetLocalVarInt("OnState"1);
SetLampLit("LampName"truetrue);
if(
GetLocalVarInt("OnState") == 1)
{
SetLampLit("LampName"falsetrue);
}



"Veni, vidi, vici."
"I came, I saw, I conquered."
06-09-2014, 11:17 AM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#3
RE: Desk gas lamp help?

i was searching for this two Smile

SomethingRidiculous i will give you some reputation Smile

06-09-2014, 11:48 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Desk gas lamp help?

I think you meant to do something like this:

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

(This post was last modified: 06-09-2014, 03:31 PM by Mudbill.)
06-09-2014, 03:24 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#5
RE: Desk gas lamp help?

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.
(This post was last modified: 06-09-2014, 06:52 PM by DnALANGE.)
06-09-2014, 06:52 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#6
RE: Desk gas lamp help?

i'm interested Big Grin

06-09-2014, 09:28 PM
Find
Artsy Offline
Member

Posts: 213
Threads: 10
Joined: Feb 2014
Reputation: 9
#7
RE: Desk gas lamp help?

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
(This post was last modified: 06-09-2014, 10:31 PM by Artsy.)
06-09-2014, 10:29 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#8
RE: Desk gas lamp help?

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!


Attached Files
.rar   gas_lamp_wall_Custom_Lange.rar (Size: 311.01 KB / Downloads: 126)
.rar   gas_lamp_desk_Custom_Lange.rar (Size: 553.64 KB / Downloads: 110)
(This post was last modified: 06-10-2014, 12:30 PM by DnALANGE.)
06-10-2014, 11:47 AM
Find
Artsy Offline
Member

Posts: 213
Threads: 10
Joined: Feb 2014
Reputation: 9
#9
RE: Desk gas lamp help?

(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, 02:15 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#10
RE: Desk gas lamp help?

(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

(This post was last modified: 06-11-2014, 07:20 AM by Straxedix.)
06-11-2014, 06:52 AM
Find




Users browsing this thread: 1 Guest(s)