using models as doors

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

Locked
User avatar
Cyrez
Posts: 45
Joined: Sun Sep 18, 2005 4:05
Location: Missouri
Contact:

using models as doors

Post by Cyrez »

has anyone afectivly managed to use an animated model as a door?

i have tried several different ways but still no luck, though my decorate skills are very limited, lol
User avatar
chaoscentral
Posts: 113
Joined: Tue Aug 30, 2005 14:08
Location: E1M1
Contact:

Post by chaoscentral »

well, you can make an activatable actor, have it play the animation of the door opening, and set it to not blocking about half way through the nimation, but you'll also have to keep in mind, the door must go all the way back against the wall so the player doesnt notice they can walk right through it. Thats about the only way I can think of doing it
User avatar
Cyrez
Posts: 45
Joined: Sun Sep 18, 2005 4:05
Location: Missouri
Contact:

Post by Cyrez »

agreed, i have made a model with the full opening and closing animations and yes the doors do go all the way to the wall, however as i said, i'm just awefull at decorate. here is my latest atempt.

decorate

Code: Select all

actor DOOR1 : SwitchableDecoration 20242
{
  height 64
  radius 64
  +SOLID
  states
  {
  Spawn:
  Inactive:
    NULA A 0
    loop
  Active:
    NULB ABCDEFGHIJKLMNO 1
	NULB P 105 A_NoBlocking
	NULC ABCDEFGHIJKLMN 1
	goto Inactive
  }
}
modeldef

Code: Select all

Model door1
{ 
   Path "Models\door1" 
   Model 0 "door1.md3" 
   Skin 0 "door1.png"

   //DOOR IDEL
   Frameindex NULA A 0 0   // The sprite lump, sprite frame, model index, name of frame
   //DOOR OPEN
   Frameindex NULB A 0 1
   Frameindex NULB B 0 2
   Frameindex NULB C 0 3
   Frameindex NULB D 0 4
   Frameindex NULB E 0 5
   Frameindex NULB F 0 6
   Frameindex NULB G 0 7
   Frameindex NULB H 0 8
   Frameindex NULB I 0 9
   Frameindex NULB J 0 10
   Frameindex NULB K 0 11
   Frameindex NULB L 0 12
   Frameindex NULB M 0 13
   Frameindex NULB N 0 14
   Frameindex NULB O 0 15
   Frameindex NULB P 0 16
   //DOOR CLOSE
   Frameindex NULC A 0 17
   Frameindex NULC B 0 18
   Frameindex NULC C 0 19
   Frameindex NULC D 0 20
   Frameindex NULC E 0 21
   Frameindex NULC F 0 22
   Frameindex NULC G 0 23
   Frameindex NULC H 0 24
   Frameindex NULC I 0 25
   Frameindex NULC J 0 26
   Frameindex NULC K 0 27
   Frameindex NULC L 0 28
   Frameindex NULC M 0 29
   Frameindex NULC N 0 30
   Frameindex NULC O 0 31
}
if i did somthing dumb here i'm not suprised, lol
User avatar
chaoscentral
Posts: 113
Joined: Tue Aug 30, 2005 14:08
Location: E1M1
Contact:

Post by chaoscentral »

well what happens... Also, you might wanna change the

Code: Select all

NULA A 0
to

Code: Select all

NULA A 1
because the way that is now, it wont show up, and could possibly give errors

also could you do me a favor and post the model with the decorate and modeldef, so I can mess around with it :) please!!!
User avatar
Cutmanmike
Posts: 482
Joined: Sat Sep 03, 2005 23:34

Post by Cutmanmike »

I have an idea how to do this without even any animations if I had a door model.
User avatar
Cyrez
Posts: 45
Joined: Sun Sep 18, 2005 4:05
Location: Missouri
Contact:

Post by Cyrez »

chaoscentral wrote:well what happens... Also, you might wanna change the

Code: Select all

NULA A 0
to

Code: Select all

NULA A 1
because the way that is now, it wont show up, and could possibly give errors

also could you do me a favor and post the model with the decorate and modeldef, so I can mess around with it :) please!!!
what happens you say, don't no, with the above stated code and the model file i have successfuly managed to lock gzdoom just before the internal node build, lol

anyway here is the model and files in a zip.
http://csiprojects.com/files/door1.zip

@Cutmanmike what type of a door do you want?
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

NULA A 0
This is a valid model index number (model index can be any number from 0 to 3) and does not cause any problems.
User avatar
chaoscentral
Posts: 113
Joined: Tue Aug 30, 2005 14:08
Location: E1M1
Contact:

Post by chaoscentral »

not in the modeldef, the decorate

Ok, i figured out what was wrong, you need to use Thing_Activate to activate the door.

Here, I made a test map to show this, the door works perfectly

http://www.box.net/public/ek1fm654a7
User avatar
Cyrez
Posts: 45
Joined: Sun Sep 18, 2005 4:05
Location: Missouri
Contact:

Post by Cyrez »

lol, now i do feel stupid, thanks alot for the help on this chaoscentral :)
User avatar
chaoscentral
Posts: 113
Joined: Tue Aug 30, 2005 14:08
Location: E1M1
Contact:

Post by chaoscentral »

no problem, it took me a while to figure that out...
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Oh, you were talking about the DECORATE. Should have read more closely. Silly me!
Locked

Return to “GZDoom”