Frictional Games Forum (read-only)
How do you make an object move in 3 directions? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: How do you make an object move in 3 directions? (/thread-29879.html)

Pages: 1 2


How do you make an object move in 3 directions? - Radical Batz - 05-03-2015

I have a custom move object which is a pillar mechanism of some sorts and how this mechanism works is by simply pulling a lever, and the mechanism comes forward to a platform, then goes back far to the other platform and then comes back to its place.
Is this possible? I never worked with move objects before.
But is there any ideas?
is there a way and is it possible?

Huh


RE: How do you make an object move in 3 directions? - DnALANGE - 05-03-2015

Easyest way imo could be;
Create 2 entyties and copy them in your mod.
Change the names for example to;
Your_Entitie_1
Your_Entitie_2

Open the modeleditor and go for the User Defined Variables and change the values there.
The "MoveAxis" and the "open ammount" are the ones you should check.
Good luck, testing and testing it.
That is how making games\mods work.


RE: How do you make an object move in 3 directions? - MrBehemoth - 05-03-2015

Or just use SetEntityPos() on a static entity and move it programmatically.


RE: How do you make an object move in 3 directions? - Daemian - 05-03-2015

(05-03-2015, 09:32 AM)DnALANGE Wrote: Easyest way imo could be;
Create 2 entyties and copy them in your mod.
Change the names for example to;
Your_Entitie_1
Your_Entitie_2

Open the modeleditor and go for the User Defined Variables and change the values there.
The "MoveAxis" and the "open ammount" are the ones you should check.
Good luck, testing and testing it.
That is how making games\mods work.

And use SetMoveObjectState(string& asName, float afState); to make it move.


RE: How do you make an object move in 3 directions? - Mudbill - 05-03-2015

SetEntityPos is probably the better way than SetMoveObjectState, because it's limited to one axis per entity. Never thought of SetEntityPos but then again I haven't done much scripting in 1.3 unfortunately.


RE: How do you make an object move in 3 directions? - Amnesiaplayer - 05-03-2015

(05-03-2015, 08:17 PM)Mudbill Wrote: SetEntityPos is probably the better way than SetMoveObjectState, because it's limited to one axis per entity. Never thought of SetEntityPos but then again I haven't done much scripting in 1.3 unfortunately.

But can I like, move something, instead of rotating?! like, with setmoveobject, can I make a hand, move Down...


RE: How do you make an object move in 3 directions? - Mudbill - 05-03-2015

A hand? Well, I don't think SetEntityPos rotates it to begin with. So yes, if I understand you correctly.


RE: How do you make an object move in 3 directions? - Amnesiaplayer - 05-03-2015

(05-03-2015, 09:08 PM)Mudbill Wrote: A hand? Well, I don't think SetEntityPos rotates it to begin with. So yes, if I understand you correctly.

Yeah, a hand, my idea is weird I know.
But my idea was like, there is a hand, and a head And then that those 2 entities just "go down" the water/sand. so it looks like the vines/quicksand got him Wink


RE: How do you make an object move in 3 directions? - Radical Batz - 05-03-2015

Having an issue here, it keeps going up, The moveaxis is currently on z in the entity and idk what the open ammount does but this is also the script!


void letsgo(string &in asEntity, int alState)
{
if(alState == -1)
SetMoveObjectState("Badcat_elevator_2", 1);


AutoSave();
}


Any ideas?


RE: How do you make an object move in 3 directions? - Romulator - 05-04-2015

Where you want it to stop, place a script area, add a collide callback, and stop your object from moving when it collides with the script area.