Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving a fixed object
Author Message
Damascus Offline
Senior Member

Posts: 646
Joined: Mar 2012
Reputation: 29
Post: #1
Moving a fixed object

I'm trying to find a way to move an entity to move at or accelerate to a fixed speed in a specific direction. PropForce won't be enough to move the large object I have in mind, and it won't send the Object through the floor, like I want.

I've seen RotateProp send objects through solid objects, is there anything similar for just moving an Object in one direction?

(This post was last modified: 03-27-2012 06:57 AM by Damascus.)
03-26-2012 07:12 AM
Find all posts by this user Quote this message in a reply
Tanshaydar Offline
From Beyond

Posts: 3,085
Joined: Mar 2009
Reputation: 66
Post: #2
RE: Moving a fixed object

Make it to a MoveObject from the Model Editor and enter the desired specifications there.

03-26-2012 07:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,214
Joined: Mar 2011
Reputation: 57
Post: #3
RE: Moving a fixed object

Create a custom entity of MoveObject type. You'll need to tweak settings to get it to move whichever way you want. Just know it moves along the global axes, not the entity's local axes. So the object might not move the direction you expect when you put it in-game.

The API function is on the wiki, it's SetMoveObjectStateExt

03-26-2012 07:15 AM
Find all posts by this user Quote this message in a reply
Damascus Offline
Senior Member

Posts: 646
Joined: Mar 2012
Reputation: 29
Post: #4
RE: Moving a fixed object

So if I wanted to move it down through the floor I would say, set it's aiState = 0 for its normal position and aiState = 1 for where it's supposed to go to in the floor?

And hmm, I also seem to need a way to turn a Static Object into an Entity.

03-26-2012 07:27 AM
Find all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,214
Joined: Mar 2011
Reputation: 57
Post: #5
RE: Moving a fixed object

It depends. The default setting sends MoveObjects along the positive axis they are assigned. To change that you need to set its max state to a negative value in the user-defined variables window.

That way scripting the object to move to a positive state actually sends it downwards, and vice versa. Or you could just leave the entity as-is and script it to move to a positive state via script.

To make an entity out of a static object, copy all the appropriate files of that static object and paste it into a new folder, which you'll place under the entities directory of both TDD's root and your custom story's root. You need to place it in both directories because the level editor needs to find the object in Amnesia's files to place it, and it needs to be in the custom story directory so when others download and run your story, the entity loads up.

I suggest building it from either of the two directories then copying and pasting it over.

Just import the COLLADA file (.dae) in the ModelEditor and 1) Give it a body using the shape tool & converting to body. 2) Change it to MoveObject type. 3) Change all other relevant variables under user-defined variables.

(This post was last modified: 03-26-2012 07:03 PM by palistov.)
03-26-2012 07:02 PM
Find all posts by this user Quote this message in a reply
Damascus Offline
Senior Member

Posts: 646
Joined: Mar 2012
Reputation: 29
Post: #6
RE: Moving a fixed object

EDIT: (nevermind)

(This post was last modified: 03-26-2012 07:40 PM by Damascus.)
03-26-2012 07:34 PM
Find all posts by this user Quote this message in a reply
Damascus Offline
Senior Member

Posts: 646
Joined: Mar 2012
Reputation: 29
Post: #7
RE: Moving a fixed object

Alright, it worked! Thanks everyone! Took forever to create a body for my spiral staircase, and it's kind of hard to walk up it, but I'll keep working on that!

03-27-2012 06:40 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)