Can not define a 3D Model Actor Properties correctly

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

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!)
Post Reply
Guest

Can not define a 3D Model Actor Properties correctly

Post by Guest »

Hi. Thanks a lot for this excellent site.

I have a problem when trying to define properties for FloatingSkull. When I use it like a normal 3D object in Modeldef, everything works fine:

Model FloatingSkull
{
Path "MD\FloatingSkull"
Model 0 "FloatSkull.md3"
Skin 0 "FloatSkull.png"
Scale 1.13 1.13 1.35

// Rotating

FrameIndex FSKU ABC 0 0
}

here it works normally and without problems, however when I want to customize it as an Actor it only recognizes the changes as 2D and if I force to see it as 3D it loses the customization.

I have tried this ways to define it in Decorate:

//ACTOR New_FloatingSkull replaces FloatingSkull 42 - (here I see properties and effects but only in the normal 2D sprites)
//ACTOR New_FloatingSkull : FloatingSkull replaces FloatingSkull - (here I see properties and effects but only in the normal 2D sprites)
ACTOR New_FloatingSkull : FloatingSkull - (here I see the 3D models but any properties or effects in it)
{

+FLOATBOB
+SOLID

States
{
Spawn:

FSKU ABC 6 Bright ACS_NamedExecuteWithResult("FaceAngleAndPitchToPlayer", 6)
Loop
}
}

here it does not even recognize the +FLOATBOB parameter, I can only observe the properties and effects in 2D.

What am I doing wrong?? I will like to fix this, but I do not have any other idea. And there are not syntax errors, is just as simple as it does not work. Have tried something similar with Megasphere item, and it works fine with the 3D model. Thanks in advance, Xaval.
User avatar
ramon.dexter
Posts: 1529
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Can not define a 3D Model Actor Properties correctly

Post by ramon.dexter »

Simple, dear watson. You have defined a model for the FloatingSkull, but your new actor is named New_FloatingSkull. So define the model for this new actor and it will work.
Modeldef ignores any replaces keywords.
Xaval
Posts: 2
Joined: Mon May 30, 2022 10:52 pm

Re: Can not define a 3D Model Actor Properties correctly

Post by Xaval »

Hi. Thanks a lot for your answer.

Yes, my 3D object actor is currently working.

But I have another query. I want to activate properties of a FloatingSkull 2D (another project) to my project that handles it in 3D, ¿the way to adapt the syntax is the same or do I need to make some adjustments?. I mean, sometimes the syntax of 2D actors and 3D looks somehow different.

I'm currently working on it, please let me write back to comment how this is going.
Post Reply

Return to “Scripting”