DECORATE, TERRAIN and other questions

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Tonels
Posts: 4
Joined: Mon Jul 24, 2017 3:50 pm

DECORATE, TERRAIN and other questions

Post by Tonels »

Hey guys,

I recently found an old mod I started way back in 2007 and never finished it. I've been making really good progress and have been able to squash most bugs by searching through the ZDoom Wiki and the forums - but some little critters keep bugging me - any help is appreciated. Here goes:

1. I've made a Sniper Rifle which has a scoped/zoomed view when AltFire is pressed. This works fine, but if you pick up an invisibility sphere, you can see through the edges of the scope. (I made it black apart from the center with the actual reticle and crosshair stuff since it would look cheap-ish if the terrain zoomed in outside the scope.)

Any way to call RenderStyle for single frames - or to make invisibility sphere not affect a certain state of a weapon?


2. I also have a Flamethrower modded in, and can't get the flame projectiles to "go out" when entering water.
I tried:

Code: Select all

FIR3 A 0 A_JumpIf(waterlevel >1, "DeepWater")

and: 

FIR3 A 0 A_JumpIf(waterlevel ==2, "DeepWater")

with the appropriate DeepWater state included. Neither work. I'm using 3D sectors for swimmable water, but it didn't work with Transfer Heights style water either.


3. Best way to make player movement less slide-y after depressing direction controls? I tried setting a global friction modifier using a TERRAIN lump, and it works until I jump or walk off a ledge - resulting in much faster movement speed mid-air. I know air has no friction in Doom. Any way to counter this?

4. Is there a way to make "Inventory.PickupSound" have a channel/priority modifier like A_PlaySound does? I have custom pickup sounds for a couple of items, and they always seem to cut off if something else is picked up while the pickupsound is still playing.

Thanks guys!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48040
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DECORATE, TERRAIN and other questions

Post by Graf Zahl »

2. Post your entire code, from that one single line there's nothing to tell.
3. No. You got to live with how friction works.
4. You will have to override the PlayPickupSound method for that. The base implementation always uses CHAN_PICKUP.
Tonels
Posts: 4
Joined: Mon Jul 24, 2017 3:50 pm

Re: DECORATE, TERRAIN and other questions

Post by Tonels »

Here's the code for the Flame projectile I'm trying to extinguish underwater:
Spoiler:
Thanks for your reply Graf :)

EDIT:
Aaaand sorted. I had to call the A_JumpIf later, and within various animation states so the flames will turn into bubbles even if it has passed the first check. I gave the bubble its' own damagetype to prevent them causing damage (couldn't figure out how to change projectile damage within a state) and made the corresponding adjustments to my custom playerpawn.
Spoiler:

Return to “Editing (Archive)”