Game Development Community

Doors...

by Thales Ferreira · in Artist Corner · 10/03/2002 (10:16 pm) · 12 replies

Hello again, everyone...
Does anybody know if it is possible to make a door that opens and closes on torque? I don't remember seeing any closed doors on Tribes 2 or Realm Wars, but then again I didn't look that hard for them... :-)
Thanks for any help you can give :-)

#1
10/03/2002 (10:21 pm)
Nope, doors are currently broken... :/
There is a resource on this site, but it isnt complete yet and so the doors don't really work.
But, www.crimeforce.com has working doors (and translucent windows as well as breakable glass by the way...) - I've sent an email to Doyoon, the guy behind it yesterday asking if there is any way to share it with the community... let's see what happens...
#2
10/04/2002 (9:34 pm)
I think Badguy is also a good Doorguy.
#3
10/21/2002 (9:09 pm)
Bummer.

I dont see why though, in T2 the turretw would notice a player in the radius and then move and fire, seems like making a door notice a player in the area and go down or up would be just as easy.
#4
10/21/2002 (9:58 pm)
Hey Stefan, any word from Doyoon if he would post his door and glass code as a resource?
#5
10/21/2002 (10:06 pm)
Oh, yes, sorry...
basically he said he doesn't want to submit it, cause it still has some issues, he doesn't feel like going through all the code and collecting the changes he made to get them to work, and that some of this stuff is too Crimeforce specific...
So, to put it simple, his answer was: "No"... :-/
#6
10/21/2002 (10:14 pm)
What ???

I have working doors of any kind in the projects I am working on. Triggered by the player !!

I am no coder (so I can't explaine it in detail what to do), but there was a script resource some months ago that explained everything about doors and triggered doors, and I had no problems get it to work in Torque v.1.2

I animate the doors in Max though !!

I will try to find the link to the resource

BR

Harald
#7
10/21/2002 (10:39 pm)
Purely from scripting? I remember BadGuy posted a resource, but if I remember correctly it had some issues, and also involved code, but if you could link to the resource that would help.
#8
10/25/2002 (12:56 am)
Hi Ryan

As I said I am no coder, so if this involved more than just some scripting, placing of files and using the Max exporter I would be totally lost.

You will find two scripting tutorials in the Torque Game Engine sdk documentation part that involve animation and triggered animation of dts shapes. They both involve a "Flagpole", but any dts animation will work.

Links:

http://www.garagegames.com/docs/torque.sdk/tutorials/tutorial01/

http://www.garagegames.com/docs/torque.sdk/tutorials/tutorial02/


Have I misunderstood something ??? I don't know !! I don't care !! They work for me !!! :)

BR
Harald
#9
10/25/2002 (1:01 am)
yea creating a triggered door using a dts export would be fine and easy to script.

a Little more tricky for a really advanced door but ..
it would work.

the door I posted is a bsp door exported from and with the map file built in worldcraft.
I do plan to work on this more in the future was kinda hoping someone else would fix the little problems with it :)
#10
10/25/2002 (2:40 pm)
What are the problems with it BadGuy?
#11
10/25/2002 (4:07 pm)
well ..
simple math problems I would say..
have you added the current code to any projects and checked it out?
you could download the files even and just look at it there..
the problem is creating a triangle based on,
door center, door pivot, and the Pathnode
this triangle is used to calculate the angle of rotation required to meet the path node
ive got some new formula' to try yet but ive not gotten to it
as well the path following routines are incomplete ..
tho easily answered those ..
#12
10/25/2002 (4:17 pm)
ya this wouldnt be too hard. Just make your door shape .. then make an action key en code on the player.

When he activates the action key, do an eye search for an object. You could set a variable on the objects, and make a door variable so the code then can do something to the object ONLY if its a door ;).

Then, just make code that changes the position of the door (for sliding ones) by using a settransform();

This wouldnt even have to be hard-coded ... but i'm not exactly sure how you would have it rotate on a left hindge instead of rotating around the center of itself ;).

Anyways, hopefully this will get ya started.