11-08-2013, 08:24 AM
Hello. I have a problem when i want to rotate the secret book shelf using a moveable book. The problem is that the shelf is not moving at all.
Here is the script:
I have named the moveable book to "Book", and placed a area near the book, and i have named it "Book_Area". The shelf name is "Shelf", and i have places a area near the corner of the shelf, where i want it to rotate, and named it "RotateShelf, and i have named the "RotateShelf" in the AngularOffsetArea on the Shelf.
Any help would be highly appreciated! Thanks in advance!
Here is the script:
Spoiler below!
void OnStart();
{
AddEntityCollideCallback("Book", "Book_Area", "func_shelf", true, 1);
}
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("Shelf", 1);
}
}
{
AddEntityCollideCallback("Book", "Book_Area", "func_shelf", true, 1);
}
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("Shelf", 1);
}
}
I have named the moveable book to "Book", and placed a area near the book, and i have named it "Book_Area". The shelf name is "Shelf", and i have places a area near the corner of the shelf, where i want it to rotate, and named it "RotateShelf, and i have named the "RotateShelf" in the AngularOffsetArea on the Shelf.
Any help would be highly appreciated! Thanks in advance!