12-15-2010, 05:15 PM
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:
But the shelf never moves! The music plays, so i'm sure the function runs.
What am i doing wrong?
This is the script that runs:
Code:
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?