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
[SOLVED]Need Help With A Sliding Door
Viper85626 Offline
Junior Member

Posts: 46
Threads: 6
Joined: Apr 2013
Reputation: 2
#5
RE: Need Help With A Sliding Door

I tried this, but it didn't do anything, unfortunately.

I did basically the same thing, but I put my function in the PlayerInteractCallback dialog box in the Level Editor. Then I added your MoveTheDoor function in the script. It looks like this:
PHP Code: (Select All)
void SlideDoor(string &asEntity)
{
    
SetMoveObjectState("safety_normal_vert_1"1);


I feel like the solution is probably to use the ConnectionStateChangeCallback on the button. I'll try it out with the SetMoveObjectState function and let you know what happens.

EDIT:
So I tried doing this:
PHP Code: (Select All)
void SlideDoor(string &asEntityint alState)
{
    if (
alState == 1)
    {
        
SetMoveObjectState("safety_normal_vert_1"1);
    }
    else if (
alState == 0)
    {
        
SetMoveObjectState("safety_normal_vert_1", -1);
    }


The door just sits there. Sad I'm getting the impression that this door only works with levers...

EDIT 2:
I'm such an idiot. I realized what was wrong. I used the above code correctly, but I forgot that I changed the door from "safety_normal_vert_1" to "safety_normal_vert_noauto_1" to prevent it from automatically closing itself.

Well, it all works now. Thanks a lot man! +rep Smile
(This post was last modified: 05-17-2014, 03:34 AM by Viper85626.)
05-17-2014, 03:27 AM
Find


Messages In This Thread
RE: Need Help With A Sliding Door - by Viper85626 - 05-17-2014, 02:33 AM
RE: Need Help With A Sliding Door - by Viper85626 - 05-17-2014, 03:27 AM



Users browsing this thread: 1 Guest(s)