Game Development Community

Elevator Action

by ChrisG · 07/16/2007 (8:03 pm) · 9 comments

I've been working at getting a script only elevator working in my game 'Strange Days'. This is my first real attempt at scripting and I've finally got it working.

I've just got to add sound, and clean up the code and it's done - then I'll post it as a resource.

Since it's script only it doesn't use moving platforms, instead it waits for bit once the doors have closed and then teleports everything inside to the selected floor. Each floor has an identical 'elevator inside' on it.

There are a couple of limitations
- It'll be for single player use only although it could easily be modified for network play.
- Static objects won't move in the elevator and will have to be duplicated in each of the elevator insides.
- At the moment decals don't want to move, although I'm going to see if I can fix this
- The elevator needs to be orientated N, S, E or W to the map.
- The elevator needs to be box shaped

The sliding doors use Mark Holcomb's scripted door resource


Here's a few screen shots...

On the ground floor
www.colab-aktiv.com/strangeDays/misc/elevatorAction/elevator1.jpg
Push the button, wait... the door opens
www.colab-aktiv.com/strangeDays/misc/elevatorAction/elevator2.jpg
Inside the elevator - still on the ground floor
www.colab-aktiv.com/strangeDays/misc/elevatorAction/elevator3.jpg
push the button for the 2nd floor
www.colab-aktiv.com/strangeDays/misc/elevatorAction/elevator4.jpg
going up... (meanwhile 'The Girl from Ipanema' musak can be heard the background...)
www.colab-aktiv.com/strangeDays/misc/elevatorAction/elevator5.jpg
and here we are on the 2nd floor
www.colab-aktiv.com/strangeDays/misc/elevatorAction/elevator6.jpg

About the author

Currently working on ZDay: www.zdaygame.com


#1
07/16/2007 (8:13 pm)
Cool! I wanna see how you got the buttons to work :)
#2
07/16/2007 (8:59 pm)
Nice job, good choice for a song too.
#3
07/16/2007 (11:52 pm)
8-)))
#4
07/17/2007 (2:13 am)
Nice work Chris!
#5
07/17/2007 (2:26 am)
@Ed: the buttons aren't that fancy - I've used the onInteract from the door resource to bring up a gui dialog that allows you to select the floor.

I would love to have interected with the individual buttons but I found that the bounding box of the interact object had to be quite large (something like 1m x 1m as you face it?!?) thus the button bounding boxes would have overlapped each other too much.
#6
07/17/2007 (5:29 am)
Awesome work Chris! Nice song choice btw. The game is coming along nicely
#7
07/17/2007 (8:26 am)
Chris:

Very nice work, what engine will this be for TGE or TGEA? I'm more into TGE 1.5.2 myself. Thanks for posting man looks sharp. Cant wait for the release of the kit. Any release date thus far? Thanks again,

Will
#8
07/17/2007 (1:31 pm)
Cool.. these screens remind me of Perfect Dark on the N64!
#9
07/17/2007 (3:44 pm)
This is for TGE. I don't have TGEA but if the scripting engine is the same then it should work in TGEA as well.