can flatsprites stick to slopes?
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!)
-
- Posts: 663
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
can flatsprites stick to slopes?
I found a forum discussion from 2016 about this that appeared to turn sour despite one of the people seemingly having found a way to do it, but I don't understand those instructions a bit. Do you know if anything new has occurred with regard to that since then? Or a wad with this implemented that I could attempt to rip off the method of?
You do not have the required permissions to view the files attached to this post.
-
-
- Posts: 17751
- Joined: Fri Jul 06, 2007 3:22 pm
Re: can flatsprites stick to slopes?
Those weren't instructions for how to do it in a mod, they were about how to implement it in the engine.
-
- Posts: 1300
- Joined: Tue Dec 06, 2016 11:25 am
Re: can flatsprites stick to slopes?
This is typically done with models.
-
- Posts: 663
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
Re: can flatsprites stick to slopes?
if this is this done typically, could you link to an example of that? if I have this object drop a flat-looking model that will indeed adhere to a slope?
that certainly explains why it doesn't make sense to me! A nice change from having no idea why something doesn't make sense to me.Gez wrote:Those weren't instructions for how to do it in a mod, they were about how to implement it in the engine.
-
-
- Posts: 950
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
Re: can flatsprites stick to slopes?
I recommend switching to models from flat sprites. But otherwise, yes, it's possible to do this in zscript. Slope detection has to be done manually, though.
This is how I do it in Beautiful Doom: https://github.com/jekyllgrim/Beautiful ... in.zc#L105
The function AlignToPlane takes an actor pointer as the first argument, a secplane as second (you can use cursector.floorplane), and the third argument should be true if it's applied to the ceiling.
This is how I do it in Beautiful Doom: https://github.com/jekyllgrim/Beautiful ... in.zc#L105
The function AlignToPlane takes an actor pointer as the first argument, a secplane as second (you can use cursector.floorplane), and the third argument should be true if it's applied to the ceiling.
-
- Posts: 663
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
Re: can flatsprites stick to slopes?
thank you for replying! I had temporarily given up on the idea and was content to just keep these particular objects away from inclines. I will see about trying to make sense of that.
is there a way to convert a sprite into a model without buying some additional software for it? I have definitely noticed a tendency for flat ones to appear in front of things that are supposed to be on top of them.
is there a way to convert a sprite into a model without buying some additional software for it? I have definitely noticed a tendency for flat ones to appear in front of things that are supposed to be on top of them.
-
- Lead GZDoom+Raze Developer
- Posts: 48595
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: can flatsprites stick to slopes?
In all honesty, don't use flat sprites!
The feature is broken beyond repair.
There will eventually be a rework to get it right.
The feature is broken beyond repair.
There will eventually be a rework to get it right.
-
-
- Posts: 950
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
Re: can flatsprites stick to slopes?
You can use an existing flat plane model and just attach a texture to it via MODELDEF. Again, you can look into Beautiful Doom, I have a flat plane model there, and a MODELDEF definition for the blood pools.bimshwel wrote:is there a way to convert a sprite into a model without buying some additional software for it? I have definitely noticed a tendency for flat ones to appear in front of things that are supposed to be on top of them.
-
- Posts: 663
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
Re: can flatsprites stick to slopes?
I have been worried about feeling overwhelmed or inadequate or simply not having time to get very far in relatively recent gzdoom productions, but indeed it is better to learn from examples than to keep asking questions about old features.
I haven't personally found the flat sprites all THAT disruptive, and I don't expect to FINISH this any time soon, considering that I have been making it off and on for almost twenty years, and any improved flat sprite implementation that is coming will probably come first, but swapping a new texture onto an existing flat model sounds like something I can manage and doing so may have other benefits.
I haven't personally found the flat sprites all THAT disruptive, and I don't expect to FINISH this any time soon, considering that I have been making it off and on for almost twenty years, and any improved flat sprite implementation that is coming will probably come first, but swapping a new texture onto an existing flat model sounds like something I can manage and doing so may have other benefits.
-
- Posts: 663
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
Re: can flatsprites stick to slopes?
I finally got around to actually trying this, and was able to copy the basic model definition, and, I think, the correct md3, with the same, unrenamed folder structure, but I still get an error saying that "MODL" is not found. I extracted the entire beautiful doom.pk3 to some folders and didn't find a MODL in there so presumably that is generated by something else I do not understand. would [anyone who sees this] be able to explain further?
(zeesc.pk3 is where I put anything that uses folders. other material is still in olde-fashioned wads)
the one I used as a foundation looks like this
is that actually animated? I don't know yet. For now I don't mind the puddle showing up fully formed, though having it gradually expand would be a nice bonus, but that can be sorted out later.
currently that is all I have for the actual object i want created, which i would tweak once I actually got the game to run and saw how it showed up. such as checking if it is better to set the scale on the actor or the model definition.
the plain aligning looks like a nightmare, but I am also not used to comprehending more than marginally complex zscript.
Code: Select all
Script error, "zeesc.pk3:modeldef" line 18:
Unknown sprite MODL in model definition for yeeppuddle
Code: Select all
Model yeeppuddle
{
UseActorRoll
UseActorPitch
//zoffset 1.0
Scale 10.0 10.0 1
Path "models"
Model 0 "BloodPool.md3"
Skin 0 "yeeppuddle.png"
FrameIndex MODL A 0 0
}
the one I used as a foundation looks like this
Code: Select all
Model BD_AniBloodPool
{
UseActorRoll
UseActorPitch
//zoffset 1.0
Scale 100.0 100.0 1
Path "models"
Model 0 "BloodPool.md3"
Skin 0 "bloodpool.png"
FrameIndex MODL A 0 0
}
Code: Select all
actor yeeppuddle
{
radius 8
height 2
//scale 0.1
}
the plain aligning looks like a nightmare, but I am also not used to comprehending more than marginally complex zscript.
Last edited by bimshwel on Wed Dec 28, 2022 12:47 pm, edited 2 times in total.
-
- Posts: 45
- Joined: Mon Aug 26, 2019 9:18 pm
- Graphics Processor: nVidia with Vulkan support
Re: can flatsprites stick to slopes?
I think the problem here is that you simply need to have a MODLA0 sprite somewhere in your mod, it can be a dummy sprite, it just has to exist. You can also use one of the existing monster sprites too, and simply call that in the model actors' state block.
-
- Posts: 663
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
Re: can flatsprites stick to slopes?
I wouldn't be surprised were that the case, but it does not seem to be! I did try adding my own; it did nothing, and I didn't find one in the deconstructed pk3 I copied the other stuff out of either.