I've been trying to make a shelf slide like a secret door for... probably five hours now. I had it moving earlier, but in the wrong direction (positive X instead of positive Z based on world coordinates). This is the current script I'm using for it:
void OnEnter()
{
AddEntityCollideCallback("book_moveable_1", "AreaBookPulled_1", "Secret_Shelf", true, 1);
}
void Secret_Shelf(string &in asParent, string &in asChild, int alState)
{
AddPropForce("shelf_secret_door_1", 0.00f, 0.00f, 1000.00f, "world");
PlaySoundAtEntity("click", "lock_door", "Player", 0, false);
}
The shelf in question started off being the shelf_secret_door.ent, which I had moving based on "SetMoveObjectState". There were two problems with this:
1. Shelf moved along the X axis (forward), I want it to move along the Z axis (left)
2. The books on the shelf didn't move with it
Now I've switched it out for shelf_high_01.ent, which doesn't move at all. with either the SetMoveObjectState or AddPropForce.
I've looked at TDD scripts, other CS scripts, checked the forum and the wiki to no avail. If you have any suggestions at all, please help me; I'm completely stumped.
Thanks for being so patient with me