Frictional Games Forum (read-only)

Full Version: Scripting fatal errors?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
It is a shelf. Lol.
Gee, I guess I'm not that original after all.
(11-08-2012, 03:04 PM)Rapsis Wrote: [ -> ]It is a shelf. Lol.
Gee, I guess I'm not that original after all.
Well then, SetMoveObjectState should work.
It doesn't work. The shelf is supposed to move backwards because there are other shelves on the right and the left, here's the script:


void openbookshelf_1(string &in asEntity, int alState)
{
SetMoveObjectState("shelf_high01_7", 1.0f);
}
The shelf is made to move either left or right.
In that case open up the shelf's .ent in the model editor, and go to user defined variables. Mess around with MoveAxis, and OpenAmount to achieve your desired effect.

Be careful not to save over the original .ent though!
(11-08-2012, 03:58 PM)Rapsis Wrote: [ -> ]It doesn't work. The shelf is supposed to move backwards because there are other shelves on the right and the left, here's the script:


void openbookshelf_1(string &in asEntity, int alState)
{
SetMoveObjectState("shelf_high01_7", 1.0f);
}
Then you'll need to change the map OR using a different model . This one moves in the Z axis.
Put it in entities/gameplay/shelf_move.
In what folder should I put this entity, so people who download the mod would have it too?

The bookshelf doesn't move even when I rotate it or change it's position so there's nothing around it, here's the script:


void OnStart()
{
SetEntityConnectionStateChangeCallback("book_moveable_win", "openbookshelf_1");
}

...


void openbookshelf_1(string &in asEntity, int alState)
{
SetMoveObjectState("shelf_high01_7", 1.0f);
}
The book_moveable isn't a lever, so this script is useless for it. It is an object slide, so you could make a script area near the book, and, when it collides with the area, stuck it and move the shelf.
Using a lever doesn't work either.
(11-09-2012, 05:11 PM)Rapsis Wrote: [ -> ]Using a lever doesn't work either.
Are you completely sure? Watch out with names, they could be the cause.
Also, you must do this in order to get it working:

void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("shelf",1.0f);
}
}
Pages: 1 2 3 4 5 6 7 8 9