Moving 3-D floors?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

User avatar
DoomGuy
Posts: 47
Joined: Tue Apr 25, 2006 4:02

Moving 3-D floors?

Post by DoomGuy »

:? I don't have a problem with making 3-D floors move up and down. I am curious if it is possible to make them move horizontally. Kind of like a poly obj that moves. I would like to be able to make a walkway slide out from across a moat and be able to walk on it and under it. I don't want to 'ride' it (although that might be cool too!). I just want it to 'move' into place so I can walk across it. If there is a way to do it using scripting, could you show how to do it? Thanks in advance.
User avatar
DoomRater
Posts: 397
Joined: Tue Jul 19, 2005 4:14
Location: Programmer's Room, talking to Will Harvey
Contact:

Post by DoomRater »

I don't know of any way. If I did, I think I'd be making a Turreted version of the Cyberdemon. Mutoid Demon, if you will.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

You could use instant moving sectors to instantly raise a small bit of the edge and keep doing so until you get the full bridge. It wouldn't look as smooth as moving it horizontally, but currently there is no other way to do it.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

If they ain't polyobjects there's no way to move them horizontally AFAIK. And 3d polyobjects aren't supported. I wish much however there was some way (aside from using models and trickery) to implement horizontally sliding 3d floors.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

The Doom engine cannot handle dynamic geometry. Polyobjects only work because they are so extremely limited.
User avatar
DoomGuy
Posts: 47
Joined: Tue Apr 25, 2006 4:02

Horizontally moving 3-D floors

Post by DoomGuy »

Chopkinsca,

Please explain about the instant moving sectors and raising a small bit of the edge..... I am interested. Show and explain any script please. I am not very handy with scripting yet. I'm learning though. Thanks!

Thanks too for everyone's responses.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

You setup the bridge so instead of 1 3d floor, it's made up of a few 3d floors each making up an equal size section of the bridge.

You number your control sector tags starting from where you want the bridge to start building/moving, then number them to the end. It's easier if you number them in sequence with no gaps (1, 2, 3, 4) otherwise you'd need to use an array if there are gaps (1, 4, 5, 7).

Then you just run a for loop, which goes to each control sector and raises it instantly and a small delay before the next one so it sort of simulates motion.

Maybe the sample .wad will help explain things.
Attachments
bridge.zip
(3.17 KiB) Downloaded 122 times
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Graf - How about making it possible for actors standing on top of another moving actor to move as well?

It would then be a quick job to make a custom 3-d model that looks like a floor and moving platforms will be possible.

The current behaviour is that if you are standing on an actor and it starts moving, you fall off because you don't move WITH the actor under you.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

You have my support Nash.
User avatar
DoomGuy
Posts: 47
Joined: Tue Apr 25, 2006 4:02

moving 3-D floors

Post by DoomGuy »

Thanks for all of your repies. I tried your wad Chopkinsca and it looks pretty good. Aces to scripting. I really need to learn more about it. Any good resources to learn scripting? Just out of curiosity, do you need to have the delay in there? I set it to 1 and it really didn't make a whole lot of difference. Would it wind up being an endless loop or would it shoot right out? Guess I can try it and see.....

As far as the moving actors; if you figure it out, please let me know and explain how to do it. Thanks to all of you. You are all a great resource for the rest of us.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

The delay affects how fast you want it to move out, or, how long each loop is (one section raises per loop). With no delay, each sector would be raised at the same time, so the bridge would appear instantly.

Basically, scripts are just a line of instructions. I think I learned most of the basic scripting from this page which is also reached from zdoom.org under tutorials. It might be tough at first, especially if you have no programming backround (I knew the basics of Basic, so that helped in my case). Another place, which may be good for learning is the Zdoom Wiki itself. The wiki wasn't around when I started, but it's extremely helpful, even if it's just used now and then as a reference. Link to ACS section.

It may take a while to learn, but it's worth it to know scripting.
User avatar
Cutmanmike
Posts: 482
Joined: Sat Sep 03, 2005 23:34

Post by Cutmanmike »

You could use a square model actor to move.. Problem is, is moving with bridges possible?

EDIT: Oops. Didn't read nash's post.
User avatar
Syfo-Dyas
Posts: 182
Joined: Sun Oct 09, 2005 21:54
Location: Ohio
Contact:

Post by Syfo-Dyas »

That example is exactly how I do a 3D extending Bridge, only I make the sectors much much smaller and it ends up looking much much more athentic.
User avatar
BlazingPhoenix
Posts: 488
Joined: Sun Aug 28, 2005 5:11
Contact:

Post by BlazingPhoenix »

It's easy to make 3D floors move up and down, just have a switch that activates a script that moves the control sector.
User avatar
DoomGuy
Posts: 47
Joined: Tue Apr 25, 2006 4:02

Horizontally moving 3-D floors.

Post by DoomGuy »

Thanks for your input Silver Sonic, but I don't have any problem making 3-D floors move up and down (see original post). The whole topic is about making them move horizontally (level with the ground) as opposed to vertically (up and down).
Locked

Return to “GZDoom”