Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting fatal errors?
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#51
RE: Scripting fatal errors?

It is a shelf. Lol.
Gee, I guess I'm not that original after all.
(This post was last modified: 11-08-2012, 03:04 PM by Rapsis.)
11-08-2012, 03:04 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#52
RE: Scripting fatal errors?

(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.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-08-2012, 03:15 PM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#53
RE: Scripting fatal errors?

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);
}
11-08-2012, 03:58 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#54
RE: Scripting fatal errors?

The shelf is made to move either left or right.

Trying is the first step to success.
11-08-2012, 04:04 PM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#55
RE: Scripting fatal errors?

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!

[Image: Tv0YgQb.gif]
Image by BandyGrass
11-08-2012, 04:08 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#56
RE: Scripting fatal errors?

(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.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 11-08-2012, 04:09 PM by The chaser.)
11-08-2012, 04:09 PM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#57
RE: Scripting fatal errors?

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);
}
(This post was last modified: 11-09-2012, 01:30 PM by Rapsis.)
11-09-2012, 01:00 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#58
RE: Scripting fatal errors?

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.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-09-2012, 02:03 PM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#59
RE: Scripting fatal errors?

Using a lever doesn't work either.
11-09-2012, 05:11 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#60
RE: Scripting fatal errors?

(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);
}
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-09-2012, 05:24 PM
Find




Users browsing this thread: 1 Guest(s)