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 i Move a Shelf with a script?
Oscar House Offline
Senior Member

Posts: 302
Threads: 3
Joined: Nov 2010
Reputation: 9
#2
RE: How do i Move a Shelf with a script?

Have you considered making two of those shelves, and when the function is called, it deactivates the closed shelf and activates the open shelf?
Something like

void RevealSecretPassage(string &in asParent, string &in asChild, int alState)
{
    PlayMusic("Secret1.ogg", false, 1.0f, 0, 0, true);
    FadeLightTo("SecretPointLight1", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f);
    SetEntityActive("SecretShelf1", false);
    SetEntityActive("SecretShelf2", true);
    CreateParticleSystemAtEntity("dust", "ps_dust_falling_door_quick", "SecretShelf1", false);
    PlaySoundAtEntity("", "scrape_rock", "SecretShelf1", 0, false);
    GiveSanityBoostSmall();
}

Unless you're supposed to see the shelf when it opens, for that I don't know the answer. Maybe it's supposed to be
SetMoveObjectState("SecretShelf1", true); ?

[Image: 2exldzm.png]
12-15-2010, 05:54 PM
Find


Messages In This Thread
RE: How do i Move a Shelf with a script? - by Oscar House - 12-15-2010, 05:54 PM



Users browsing this thread: 1 Guest(s)