3D model not showing up in game.
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
3D model not showing up in game.
In my PK3, I have a model of some curtains that blow about in the wind, generously created by HAL9000 on here. It's an amazing effect that I'm trying to implement but when I enter the builder, the model isnt there. What I have is the following:
AnimDefs.Curtains
Modeldef.Curtains
ZScipt.curtains
Mapinfo.curtains
in the root of the PK3.
In the "models" directory I have the curtain directory, which includes 3 different curtain types directories and the MD3 file.
Is this all I need or do I need a DECORATE file? Because as it stands, I have no way of using it.
Thanks in advance.
AnimDefs.Curtains
Modeldef.Curtains
ZScipt.curtains
Mapinfo.curtains
in the root of the PK3.
In the "models" directory I have the curtain directory, which includes 3 different curtain types directories and the MD3 file.
Is this all I need or do I need a DECORATE file? Because as it stands, I have no way of using it.
Thanks in advance.
Re: 3D model not showing up in game.
The actor needs to be defined in either ZScript or DECORATE.
Also make sure it has a Spawn state defined with the model replacing the sprite of the first frame.
Also make sure it has a Spawn state defined with the model replacing the sprite of the first frame.
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: 3D model not showing up in game.
Could you explain what you mean please? I'm not sure exactly what you mean by replacing a sprite. (I've never used 3d Models before, sorry).Cherno wrote:The actor needs to be defined in either ZScript or DECORATE.
Also make sure it has a Spawn state defined with the model replacing the sprite of the first frame.
Re: 3D model not showing up in game.
Code: Select all
ZScript Actor:
class MyActor : Actor
{
States
{
Spawn:
PLAY A 1;
Loop;
}
}
MODELDEF entry:
Model MyActor
{
Model 0 "models/MyModel.md3"
SurfaceSkin 0 0 "models/MyModel.png"
FrameIndex PLAY A 0 0
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: 3D model not showing up in game.
Ok well this is my ZScript, but in the GZDOOM Builder, there is no object to choose. I tried to add it to its own category called 3d models, but that didn't work either. If I place the DOOMEd number it just shows a red question mark in the editor and in the game it shows up as an exclamation mark in a diamond.
Code: Select all
class Curtain_destroyed : Actor
{
//$Category 3D Models
//$Title Curtain Destroyed
Default
{
Radius 26;
Height 30;
Health 5;
Mass 1000;
+NOBLOOD
+ACTLIKEBRIDGE
+NOGRAVITY
}
States
{
Spawn:
CU00 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
CU01 ABCDEFGHIJKLMNOPQRS 1;
LOOP;
}
}
class Curtain_damaged : Actor
{
//$Category 3D Models
//$Title Curtain Damaged
Default
{
Radius 26;
Height 30;
Health 5;
Mass 1000;
+NOBLOOD
+ACTLIKEBRIDGE
+NOGRAVITY
}
States
{
Spawn:
CU02 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
CU03 ABCDEFGHIJKLMNOPQRS 1;
LOOP;
}
}
class Curtain_new : Actor
{
//$Category 3D Models
//$Title Curtain New
Default
{
Radius 26;
Height 30;
Health 5;
Mass 1000;
+NOBLOOD
+ACTLIKEBRIDGE
+NOGRAVITY
}
States
{
Spawn:
CU04 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
CU05 ABCDEFGHIJKLMNOPQRS 1;
LOOP;
}
}
Re: 3D model not showing up in game.
What happens if you summon the actor in the game?
Also, these lines:
have to be inside the Default block.
Also, these lines:
Code: Select all
//$Category 3D Models
//$Title Curtain Destroyed
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: 3D model not showing up in game.
When I summon the actor in game, it acts like it worked but nothing actually happens. It doesn't appear. ?Cherno wrote:What happens if you summon the actor in the game?
Also, these lines:have to be inside the Default block.Code: Select all
//$Category 3D Models //$Title Curtain Destroyed
Moving the other bits to the default block now.
EDIT, just did that butu they still dont show up in the builder.
Also, when I boot the game it has an error. It cannot understand the flag +NOFRICTIONBOUNCE
Any idea why?
Re: 3D model not showing up in game.
Post your pk3 please.
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: 3D model not showing up in game.
I can post it if absolutely necessary. But it will take time to upload. This is driving me nuts.