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
Make Cabinet Open By It Self
TheZhadowRider Offline
Junior Member

Posts: 4
Threads: 2
Joined: Feb 2016
Reputation: 0
#1
Make Cabinet Open By It Self

Hey I was wondering if it was possible to open one of the two cabinet doors by it self?
I have tried:
With rotateArea:
///////////////////////////////////////////////////////////////////////////////////////////////
void CabinetScare(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 2, "StopSound");
AddTimer("Cabinet", 0, "RotateArea")
PlaySoundAtEntity("creak", "joint_door_move_special.snt", "Cabinet", 1, false);
}

void RotateArea(string %in asTimer
{
if (GetLocalVarInt ("Check") == 0)
{
if (alState == 1)
{
SetMoveObjectState("Cabinet", 1);

SetLocalVarInt("Check", 1);

return;
}
}
)

void StopSound(string &in asTimer)
{
StopSound("creak", 0.4);
}
////////////////////////////////////////////////////////////////////////////////////////////

And I was thinking to try "prop Force" to but just wanted to hear if it was possible[/size][/font]
02-26-2016, 10:16 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Make Cabinet Open By It Self

It's definitely possible - I believe there is a wiki entry about it... Give me a moment and I will dig it up!

Yep - here: https://wiki.frictionalgames.com/hpl2/tu...hdoorsopen

Check out the "entities with doors" section Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 02-26-2016, 10:53 AM by Romulator.)
02-26-2016, 10:52 AM
Find
TheZhadowRider Offline
Junior Member

Posts: 4
Threads: 2
Joined: Feb 2016
Reputation: 0
#3
RE: Make Cabinet Open By It Self

(02-26-2016, 10:52 AM)Romulator Wrote: It's definitely possible - I believe there is a wiki entry about it... Give me a moment and I will dig it up!

Thx Man Smile
02-26-2016, 10:53 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Make Cabinet Open By It Self

I also have this lengthy video on such a topic should you find it helpful. Just remember to use the "Body" script instead of the "Prop" script, and include the body name after the entity name. Otherwise, it should be same.




02-26-2016, 03:52 PM
Find




Users browsing this thread: 1 Guest(s)