Data Realms Fan Forums
http://45.55.195.193/

Question about doors (Possible way to make elevator)
http://45.55.195.193/viewtopic.php?f=1&t=15106
Page 1 of 2

Author:  MaximDude [ Sun May 31, 2009 10:07 pm ]
Post subject:  Question about doors (Possible way to make elevator)

Is it possible to attach a craft to a door and still have it operational?
Like, say I want to attach a crate to a door motor and still have the crate selectable and all, can I do it?

Author:  CaveCricket48 [ Sun May 31, 2009 11:09 pm ]
Post subject:  Re: Question about doors

You can't attach actors to other actors.

Author:  Roy-G-Biv [ Sun May 31, 2009 11:38 pm ]
Post subject:  Re: Question about doors

CaveCricket48 wrote:
You can't attach actors to other actors.

viewtopic.php?p=279293#p279293
I beg to differ.

Author:  CaveCricket48 [ Sun May 31, 2009 11:57 pm ]
Post subject:  Re: Question about doors

Well, I meant through normal coding. You can do nearly anything with Lua, obviously.

Author:  MaximDude [ Mon Jun 01, 2009 5:17 am ]
Post subject:  Re: Question about doors

So it is possible.
Well, if so, then we might have ourselves a theoretically working elevator.

Author:  Grif [ Mon Jun 01, 2009 5:18 am ]
Post subject:  Re: Question about doors

You could just update the position of an actor inside the field with Lua?

Author:  MaximDude [ Mon Jun 01, 2009 5:19 am ]
Post subject:  Re: Question about doors

Grif wrote:
You could just update the position of an actor inside the field with Lua?


But that would be too obvious, now would it?

Author:  Duh102 [ Mon Jun 01, 2009 5:21 am ]
Post subject:  Re: Question about doors

It'd work though, and that's the important part.

EDIT: On further thought, it would be difficult. To do with a door, that is.
Until we get attachable access, you couldn't be quite sure where the door was. You'd have to guess based on the open speed.

Now, if you used just a regular old MOSRot, or an actor if you like, you could make up your own little elevator code where it waited until an actor came into a box (first come first serve, I suppose), go to the level he is, then go up or down depending on his aim angle while keeping him in the box.

Author:  MaximDude [ Mon Jun 01, 2009 5:29 am ]
Post subject:  Re: Question about doors

Duh102 wrote:
It'd work though, and that's the important part.

EDIT: On further thought, it would be difficult. To do with a door, that is.
Until we get attachable access, you couldn't be quite sure where the door was. You'd have to guess based on the open speed.

Now, if you used just a regular old MOSRot, or an actor if you like, you could make up your own little elevator code where it waited until an actor came into a box (first come first serve, I suppose), go to the level he is, then go up or down depending on his aim angle while keeping him in the box.


Hmmm... No proper attachable access?
Well, then you can have a crate and some lua and make it go up and down when it has something in it's inventory, and change direction of travel depending on last direction of travel - Which is kind of what you are saying but with a crate...

Coding shouldn't be too difficult, its just that I don't know how to code with lua - Mainly because I don't know how and when to use a certain function.
This is weird though, cause lua is very much lke C, and I know C on a pretty good level... :???:

Author:  Foa [ Mon Jun 01, 2009 5:38 am ]
Post subject:  Re: Question about doors

CaveCricket48 wrote:
You can't attach actors to other actors.

You can attach ADoors to ADoors... an example of this is the SK-PRR 'Tricky Wall'.

Author:  MaximDude [ Mon Jun 01, 2009 10:02 am ]
Post subject:  Re: Question about doors

Well, after some thought, I managed to write down what the lua code should be like.

So. We have a crate, its pinned on a Y axis, so it only moves up and down.

Ok, here goes...
Note: No actual functions are used because I don't know any...

Code:
sensor range X = something;
velocity Y = something;
weight limit = something;

if 'actor(from own team)' is 'within sensor range X' and is 'within weight limit' then
   'open doors';
      if 'something present in inventory' then
         'direction of travel(velocity Y)' = 'opposite of last direction of travel(velocity Y)'; //this way you won't be needing to add extra code, it will travel in the opposite direction of the last travel (if it went up, it will go down and so on) - only problem is, how will it know where to travel if used for the first time?
         'release cargo';
      end
else 'close doors';
end


But there will have to be a part where it will check whether it reached the ground/2nd floor, otherwise it will just travel up/down without stopping. I just can't think of how it will work...

If that chunk of code is added, is it possible for it to work? I really hope so...

Author:  Rawtoast [ Mon Jun 01, 2009 10:32 am ]
Post subject:  Re: Question about doors (Possible way to make elevator)

I don't think you should worry about having the elevator wait yet. It'd be a dandy mod either way! Get to that later if you have to.

Author:  MaximDude [ Tue Jun 02, 2009 5:15 am ]
Post subject:  Re: Question about doors (Possible way to make elevator)

Uhhh... Anyone gonna try to code this ♥♥♥♥?

Author:  zalo [ Tue Jun 02, 2009 5:26 am ]
Post subject:  Re: Question about doors (Possible way to make elevator)

Why the heck do we need elevators when we have Jetpacks?

Author:  Azukki [ Tue Jun 02, 2009 5:36 am ]
Post subject:  Re: Question about doors (Possible way to make elevator)

Zalo, the undead and ACrabs would like to have a word with you.
Also, jetting up everywhere in small spaces is a pain in the ass.
Lazily going in an elevator would be prefered in some cases.
Or you might just want them for the sake of sealing up bunkers more; making it feel less open and vulnerable.

Although we can pretty much have one way elevators already, with conveyors. We can also have effective instant elevators that don't look like elevators by using teleporters.

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/