Author |
Message |
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
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?
Last edited by MaximDude on Mon Jun 01, 2009 10:07 am, edited 1 time in total.
|
Sun May 31, 2009 10:07 pm |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Question about doors
You can't attach actors to other actors.
|
Sun May 31, 2009 11:09 pm |
|
|
Roy-G-Biv
Joined: Mon Feb 12, 2007 12:46 am Posts: 1765 Location: ..............
|
Re: Question about doors
CaveCricket48 wrote: You can't attach actors to other actors. viewtopic.php?p=279293#p279293I beg to differ.
|
Sun May 31, 2009 11:38 pm |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Question about doors
Well, I meant through normal coding. You can do nearly anything with Lua, obviously.
|
Sun May 31, 2009 11:57 pm |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
Re: Question about doors
So it is possible. Well, if so, then we might have ourselves a theoretically working elevator.
|
Mon Jun 01, 2009 5:17 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Question about doors
You could just update the position of an actor inside the field with Lua?
|
Mon Jun 01, 2009 5:18 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
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?
|
Mon Jun 01, 2009 5:19 am |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
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.
|
Mon Jun 01, 2009 5:21 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
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...
|
Mon Jun 01, 2009 5:29 am |
|
|
Foa
Data Realms Elite
Joined: Wed Sep 05, 2007 4:14 am Posts: 3966 Location: Canadida
|
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'.
|
Mon Jun 01, 2009 5:38 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
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...
|
Mon Jun 01, 2009 10:02 am |
|
|
Rawtoast
Joined: Mon Apr 06, 2009 9:41 am Posts: 712 Location: New York
|
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.
|
Mon Jun 01, 2009 10:32 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
Re: Question about doors (Possible way to make elevator)
Uhhh... Anyone gonna try to code this ♥♥♥♥?
|
Tue Jun 02, 2009 5:15 am |
|
|
zalo
Joined: Sat Feb 03, 2007 7:11 pm Posts: 1496
|
Re: Question about doors (Possible way to make elevator)
Why the heck do we need elevators when we have Jetpacks?
|
Tue Jun 02, 2009 5:26 am |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
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.
|
Tue Jun 02, 2009 5:36 am |
|
|
|