The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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?
machosalad Offline
Junior Member

Posts: 38
Threads: 8
Joined: Oct 2010
Reputation: 0
#1
How do i Move a Shelf with a script?

i am trying to make a script that moves a tall shelf to reveal a secret passage. The entity of the shelf is "shelf_high01.ent" and the name of it is "SecretShelf1".

This is the script that runs:

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);
    SetMoveObjectState("SecretShelf1", 1);
    CreateParticleSystemAtEntity("dust", "ps_dust_falling_door_quick", "SecretShelf1", false);
    PlaySoundAtEntity("", "scrape_rock", "SecretShelf1", 0, false);
    GiveSanityBoostSmall();
}

But the shelf never moves! The music plays, so i'm sure the function runs.
What am i doing wrong?
12-15-2010, 05:15 PM
Find


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



Users browsing this thread: 1 Guest(s)