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
How do you do that pls?
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
How do you do that pls?

Skip to 0:44 of this video http://www.youtube.com/watch?v=4kpctbHXstg to see what I'm talking about. How do you do that with the door and screen and sound, can anybody give me the whole code for that and I'll fill in the name and entity and etc? and pls tell me what I should even do in the level editor pls Undecided
(This post was last modified: 02-02-2014, 02:53 PM by Radical Batz.)
02-02-2014, 02:52 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: How do you do that pls?

Go ahead, pick one.

Spoiler below!

You don't need to do anything on this.
PHP Code: (Select All)
int tits GetSwingDoorState("DoorName");
if(
tits == 0)
{
GiveSanityDamage(15true);



Spoiler below!

Put a script area somewhere in the door's swing path.
PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("DoorName""ScriptAreaName""SanityDec"true1);
}

void SanityDec(string &in asParentstring &in asChildint alState)
{
GiveSanityDamage(15true);



"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 02-02-2014, 03:06 PM by PutraenusAlivius.)
02-02-2014, 03:06 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#3
RE: How do you do that pls?

What's the difference between the 2 and I already have a void on start so what do i do? and what's a sanity dec, sorry for being like I know nothing but I really don't know what sanitydec does
(This post was last modified: 02-02-2014, 03:10 PM by Radical Batz.)
02-02-2014, 03:08 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#4
RE: How do you do that pls?

Lol at that first code.

Code 1: When the door closes (for the first time) it will drain your sanity. You just change doorname to the name of your door in the Level Editor.

Code 2: Name a Scriptarea something and the door something, then place the Scriptarea somewhere within the door's closing path. Change the doorname and ScriptAreaname in the coding as appropriate.

SanityDec is nothing important except that function is called when the Door and Scriptarea collide. You don't need to change it.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 02-02-2014, 03:50 PM by Romulator.)
02-02-2014, 03:48 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#5
RE: How do you do that pls?

Thanks so much buddy, my custom story would be nothing without that code, thank you so much for finding it JustAnotherPlayer Smile
(This post was last modified: 02-02-2014, 05:39 PM by Radical Batz.)
02-02-2014, 05:39 PM
Find




Users browsing this thread: 1 Guest(s)