Game Development Community

T3D Elevators

by Necrode · in Torque 3D Professional · 08/28/2009 (7:35 pm) · 15 replies

Anybody got a working solution for implementing elevators in T3D? Ideally this could be a standard part of the engine...

Thanks!

About the author

They locked me in here with a computer, and said I don't get to leave until I've completed a computer game.


#2
08/29/2009 (12:50 pm)
The physical zones are interesting, but what I'm really after is having the player be able to walk around on a platform while it carries the player up. When standing on objects and making them move either by applyImpulse, physical zones or using path shapes, the player tends to fall through/slide off the platform. It's in situations like this where the engine still feels like Tribes (solution = jetpack everywhere).
#3
08/29/2009 (1:14 pm)
would Jaimi's new forcefield resource prevent this falling off?
#5
08/29/2009 (2:54 pm)
i would suggest integrating the Moving Platforms resource.

#6
08/29/2009 (3:03 pm)
The download link for that resource is broken. If anyone has the code, could they please re-post it here?
#7
08/29/2009 (5:31 pm)
a quick google for the file name turns it up here: http://torque.abigholeintheweb.com/public_system/useruploads/PathShape_TGEA_1.8.1.zip but i have no idea what that system is, so use at yer own risk.
#8
08/29/2009 (7:21 pm)
That is EB's site. No problem there!
#9
08/29/2009 (7:22 pm)
Can anyone confirm this is working with T3D? It seems to compile fine, but my player falls right through the path object.
#11
08/30/2009 (10:47 am)
@Necrode

1. add this:
mLastXform = mat;
at the end of the pathshape constructor.

2. Also your network code is a total mess-up.
replace this:

enum MaskBits {
      WindowMask     = Parent::NextFreeMask,
      PositionMask   = Parent::NextFreeMask + 1,
      TargetMask     = Parent::NextFreeMask + 2,
      StateMask      = Parent::NextFreeMask + 3,
      NextFreeMask   = Parent::NextFreeMask << 1
   };

with this:


enum MaskBits {
     WindowMask     = Parent::NextFreeMask,
     PositionMask   = WindowMask << 1,
     TargetMask     = PositionMask << 1,
     StateMask      = TargetMask << 1,
     NextFreeMask   = StateMask << 1
 };

Also clean pack/unpack a bit.

3. You don't have a datablock destructor.It is not an error,but it is good to be there.
4. You don't need to setup mObjBox
5. Remove addToScene(); in onAdd()
6. You need getState() console method for TS,that's something you've forgot to add.
#12
08/30/2009 (1:57 pm)
Thanks for all of the suggestions. Still no dice though.

If we could get a unified downloadable resource to add this functionality into T3D that would be of GREAT benefit to the community (especially for us whose c++ chops leave much to be desired :} )
#13
08/30/2009 (3:31 pm)
I believe you should derive from StaticShape,not ShapeBase.
Anyway i will provide the port soon.
#15
09/01/2009 (11:17 pm)
It works! Thank you sooo much. May the gods smile upon you.