The "How do I..." Thread

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.

Re: The "How do I..." Thread

Postby Carbine Dioxide » Mon Mar 20, 2017 8:01 pm

Yeah, I think I just need to change the recoil frames of the sprite I'm using so that it will look better.
User avatar
Carbine Dioxide
Me and Pain go way back.
 
Joined: 12 Jun 2014
Location: Anywhere.

Re: The "How do I..." Thread

Postby DoomKrakken » Mon Mar 20, 2017 9:48 pm

When a player spawns a puff via a hitscan attack, either through a melee or ranged attack, what pointer field do said puffs assign the players?
User avatar
DoomKrakken
All but inactive here on the forums. Contact me on Discord for quicker replies.
 
Joined: 19 Oct 2014
Location: Plahnit Urff
Discord: DoomKrakken#2719

Re: The "How do I..." Thread

Postby Blue Shadow » Mon Mar 20, 2017 10:34 pm

If you set the PUFFGETSOWNER flag on the puff, the shooter becomes the target of the puff.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: The "How do I..." Thread

Postby Carbine Dioxide » Mon Mar 20, 2017 11:11 pm

I made an animation for the Select state and it cuts out most of the sprites and it quickly goes to the ready state. The Deselect state is okay for some reason and animates smoothly.

Code: Select allExpand view
 Select:
  SHDR CBA 2
 SelectLoop:
  TNT1 A 1 A_Raise
  Loop
 Deselect:
  SHDR ABC 2
  TNT1 A 0 A_Lower
  Wait
User avatar
Carbine Dioxide
Me and Pain go way back.
 
Joined: 12 Jun 2014
Location: Anywhere.

Re: The "How do I..." Thread

Postby DoomKrakken » Mon Mar 20, 2017 11:12 pm

Alright, cool. :)

Is there a way for a puff's damagetype to be changed before it deals damage?

@Carbine Dioxide The way I've seen Trailblazer do it is that the weapons make use of PROP_INSTANTWEAPONSWITCH with SetPlayerProperty. When selecting the weapon, it instantly raises, but then the custom raising animation itself is put into the Ready state. From there, it falls through to a "ReadyLoop" state.

When deselecting, the weapon first plays its custom lowering animation, then instantly switches to the next weapon.
Last edited by DoomKrakken on Mon Mar 20, 2017 11:21 pm, edited 1 time in total.
User avatar
DoomKrakken
All but inactive here on the forums. Contact me on Discord for quicker replies.
 
Joined: 19 Oct 2014
Location: Plahnit Urff
Discord: DoomKrakken#2719

Re: The "How do I..." Thread

Postby worldendDominator » Mon Mar 20, 2017 11:17 pm

worldendDominator wrote:Can I make a leap attack using A_SkullAttack and ThrustThingZ? If I can, how exactly should I do it?

Can anyone answer this?
User avatar
worldendDominator
 
Joined: 17 May 2015

Re: The "How do I..." Thread

Postby DoomKrakken » Mon Mar 20, 2017 11:28 pm

worldendDominator wrote:
worldendDominator wrote:Can I make a leap attack using A_SkullAttack and ThrustThingZ? If I can, how exactly should I do it?

Can anyone answer this?

Yes. Definitely with A_SkullAttack.

You will need to define a damage amount in the monster's code itself, using a Damage property, (just like with projectiles)... since the monster itself will basically become a projectile. Then, when the monster hits a player, it'll deal that much damage.

There's a monster in my Monster Randomizer, known as the Mauler... here's the code, since it utilizes A_SkullAttack...



Code: Select allExpand view
//======================================================================
//======================================================================
//
//                               Mauler
//
//======================================================================
//======================================================================
//  DECORATE: KDIZD Team
//  Sprites: Id Software (edits by Eriance)
//======================================================================

ACTOR MaulerDemon : Demon //3123
{              
    
//$Category Monsters
   Health 150 
   PainChance 180 
   Speed 10 
   Radius 30 
   Height 56 
   Mass 400 
   Damage 2 
//Horns = pain. I say no more 
   Monster 
   
+FLOORCLIP 
   SeeSound 
"demon/sight" 
   AttackSound 
"demon/melee" 
   PainSound 
"demon/pain" 
   DeathSound 
"demon/death" 
   ActiveSound 
"demon/active" 
   Obituary 
"%o was gored by a Mauler Demon."
   HitObituary "%o was mauled by a Mauler Demon"
   States 
   
{ 
   Spawn
: 
      MAUD AB 10 A_Look 
      Loop 
   See
: 
      MAUD AABBCCDD 2 A_Chase 
      Loop 
   Melee
: 
      MAUD EF 8 A_FaceTarget 
      MAUD G 8 A_SargAttack 
      Goto See 
   Missile
: 
      MAUD E 0 A_Jumpifcloser
(224, 2)
      Goto See
      MAUD E 4 A_FaceTarget 
      MAUD F 10 A_SkullAttack 
      MAUD G 5 A_Gravity
      Goto See 
   Pain
: 
      MAUD H 2 
      MAUD H 2 A_Pain 
      Goto See 
   Death
: 
      MAUD I 8 
      MAUD J 8 A_Scream 
      MAUD K 4 
      MAUD L 4 A_Fall 
      MAUD M 4 
      MAUD N 
-
      Stop 
   Raise
: 
      MAUD N 5 
      MAUD MLKJI 5 
      Goto See 
   
} 
User avatar
DoomKrakken
All but inactive here on the forums. Contact me on Discord for quicker replies.
 
Joined: 19 Oct 2014
Location: Plahnit Urff
Discord: DoomKrakken#2719

Re: The "How do I..." Thread

Postby worldendDominator » Mon Mar 20, 2017 11:31 pm

Thanks.
User avatar
worldendDominator
 
Joined: 17 May 2015

Re: The "How do I..." Thread

Postby DoomKrakken » Mon Mar 20, 2017 11:41 pm

No problem. :D
User avatar
DoomKrakken
All but inactive here on the forums. Contact me on Discord for quicker replies.
 
Joined: 19 Oct 2014
Location: Plahnit Urff
Discord: DoomKrakken#2719

Re: The "How do I..." Thread

Postby Dr_Cosmobyte » Tue Mar 21, 2017 3:31 am

Is there a console command similar to r_drawvoxels, but to disable 3d models? Hate to be annoying, but it would help me a lot.
User avatar
Dr_Cosmobyte
Also known as: GAA1992
 
Joined: 04 Jun 2015
Location: Killing spiders.

Re: The "How do I..." Thread

Postby Blue Shadow » Tue Mar 21, 2017 6:09 am

DoomKrakken wrote:Is there a way for a puff's damagetype to be changed before it deals damage?

I don't think so. The damage type is determined before the puff is spawned.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: The "How do I..." Thread

Postby kodi » Tue Mar 21, 2017 6:54 am

@doomkrakken
You can use PUFFONACTORS and ALWAYSPUFF along with HITTRACER to call A_DamageTracer in your puffs' states to do that. Using an anonymous function you can change the damage type and amount depending on whatever you wish.
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013

Re: The "How do I..." Thread

Postby Nash » Tue Mar 21, 2017 9:06 am

GAA1992 wrote:Is there a console command similar to r_drawvoxels, but to disable 3d models? Hate to be annoying, but it would help me a lot.


No. If you want it, you'll have to make a feature suggestion on the GZDoom tracker
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: The "How do I..." Thread

Postby ZZYZX » Tue Mar 21, 2017 9:17 am

There was a way to disable models, but it got removed. Not sure why. It might be accidentally broken during renderer changes, but it could also happen that people got tired of accidental mod breaking by having models disabled.
Much like dynamic light intensity changing was disabled.
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine
Discord: ZZYZX#1394
Github ID: jewalky

Re: The "How do I..." Thread

Postby Nash » Tue Mar 21, 2017 9:28 am

Enjay wrote:In MENUDEF, is it possible to set one graphic as an unselected item and another graphic for when the item is selected in the top level menus that (in Doom) traditionally use graphics for their entries?

e.g. could I use M_NGAME for the normal appearance and a new graphic called M_NGAME2 for when the player has selected (but not yet hit enter) "New Game"?

I know that the menu can be redefined using fonts and using different colours for highlighted versus unhighlighted but I want to use graphics for the menu items, not fonts.


Unfortunately not without ZScript. Those things you are trying to modify are called widgets. Specifically, ListMenuItem. TextItem and PatchItem are child classes of ListMenuItem.

PatchItem is the widget you wanted to modify.

Inside ListMenuItem is a function called DrawSelector. Both TextItem and PatchItem inherit this function. This is the part that's responsible for handling drawing the graphics for when something is selected (it places the skull cursor next to the selected item).

So what would really be required is to make a custom PatchItem widget, make the widget take an additional parameter to specify the graphic for the "Selected" version and the "Unselected" version. And finally override DrawSelector to add the functionality to flip between the 2 graphics depending on the selection status.

And then finally in your MenuDef, replace all instances of PatchItem with your custom, modified PatchItem widget.

tl;dr it's a lot of work, sorry. :(
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

PreviousNext

Return to Editing (Archive)

Who is online

Users browsing this forum: sylandro and 3 guests