header general

[SUBMISSION] Hand Cannon

  • TyrannotitanFan
  • TyrannotitanFan's Avatar Topic Author
  • Lost Soul
  • Lost Soul
More
3 years 3 months ago - 3 years 2 months ago #1 by TyrannotitanFan
[SUBMISSION] Hand Cannon was created by TyrannotitanFan
Information:
Name: Hand Cannon
Class: 2
Type: Hitscan
Palette: Doom
Summon: HandCannon
Ammo Type: Clip

Credits:
Code: TyrannotitanFan
Sounds: Navaro
Sprites: Neccronixis
Idea Base: Pistol from DOOM (2016)

Sprite:
as attachment

Download Link:
https://drive.google.com/file/d/1cbNsSf-kqx4bxYIxoeeYL-Y8I4sm0VSZ/view?usp=sharing
 
Last edit: 3 years 2 months ago by TyrannotitanFan.

Please Log in or Create an account to join the conversation.

  • Gothic
  • Gothic's Avatar
  • Moderator
  • Moderator
More
3 years 3 months ago #2 by Gothic
Replied by Gothic on topic [SUBMISSION] Hand Cannon
If it is an energy weapon, then it should leave energy puffs, not bullet puffs. And it should use a different type of ammunition, or none if you're aiming for Doom 2016 accuracy.
The firing frames need to be bright, and the animation could be smoother, without making the fire rate faster.

Please Log in or Create an account to join the conversation.

  • TyrannotitanFan
  • TyrannotitanFan's Avatar Topic Author
  • Lost Soul
  • Lost Soul
More
3 years 3 months ago #3 by TyrannotitanFan
Replied by TyrannotitanFan on topic [SUBMISSION] Hand Cannon
done

Please Log in or Create an account to join the conversation.

  • Gothic
  • Gothic's Avatar
  • Moderator
  • Moderator
More
3 years 3 months ago - 3 years 3 months ago #4 by Gothic
Replied by Gothic on topic [SUBMISSION] Hand Cannon
There's a bug with the pickup sprite, it shows up on the HUD, because you didn't close the Flash state properly.
When I said smoother animation, I meant more frames of animation in between. And it still uses the bullet puff even if it leaves a plasma decal.
Last edit: 3 years 3 months ago by Gothic.

Please Log in or Create an account to join the conversation.

  • TyrannotitanFan
  • TyrannotitanFan's Avatar Topic Author
  • Lost Soul
  • Lost Soul
More
3 years 3 months ago - 3 years 3 months ago #5 by TyrannotitanFan
Replied by TyrannotitanFan on topic [SUBMISSION] Hand Cannon
kay
edit: fixed one problem
but i have two other ones:
- sprite problems (clipping while in anim)
- i don't know whith "BulletPuff" like state i must use

here's code:
Actor HandCannon : Weapon
{
  Obituary "%o was splattered by %k HandCannon"
  AttackSound "weapons/HandCannon"
  Inventory.pickupmessage "Picked up the Hand Cannon"
  Weapon.SelectionOrder 400
  Weapon.SlotNumber 2
  Weapon.kickback 100
  +WEAPON.AMMO_OPTIONAL
  Weapon.ammouse 1
  Decal "PlasmaScorch"
  States
  {
  Spawn:
    HACA P -1
    Loop
  Ready:
    HACA A 2 A_WeaponReady
    Loop
  Deselect:
    HACA A 2 A_Lower
    Loop
  Select:
    HACA A 1 A_Raise
    Loop
  Fire:
    HACA B 4 A_FireBullets(3, 3, 1, 8, "PlasmaBall")
    HACA B 4 A_GunFlash
    HACA C 4
    HACA D 4
    HACA C 4
    HACA A 3
    Goto Ready
  Flash:
    HACA B -1 A_Light0
    Goto Ready
  }
}
Last edit: 3 years 3 months ago by TyrannotitanFan. Reason: question

Please Log in or Create an account to join the conversation.

  • Gothic
  • Gothic's Avatar
  • Moderator
  • Moderator
More
3 years 3 months ago - 3 years 3 months ago #6 by Gothic
Replied by Gothic on topic [SUBMISSION] Hand Cannon
The sprite bug is because the flash state needs to end in "goto LightDone", and it can't have -1 tics of duration.
The puff type is A_FireBullets needs to be a valid actor, not just any projectile, like this for example
Code:
Actor HandCannonPuff : Bulletpuff { RenderStyle Add Alpha 0.8 Scale 0.3 VSpeed 0 +PUFFONACTORS States     {     Spawn:     Melee:         PLSE ABDE 4 Bright         Stop     } }

The rest of the code needs some cleanup:
  • The spawn state must end in "stop" if the frame duration is -1
  • Ready, Select and Deselect frames should last 1 tic, so they animate faster
  • Since this weapon doesn't use ammo, it shouldn't have a "Weapon.ammouse" property
Last edit: 3 years 3 months ago by Gothic.

Please Log in or Create an account to join the conversation.

  • TyrannotitanFan
  • TyrannotitanFan's Avatar Topic Author
  • Lost Soul
  • Lost Soul
More
3 years 3 months ago - 3 years 3 months ago #7 by TyrannotitanFan
Replied by TyrannotitanFan on topic [SUBMISSION] Hand Cannon
ok
thanks
edit: i guess i messed something in code
Attachments:
Last edit: 3 years 3 months ago by TyrannotitanFan. Reason: found an error

Please Log in or Create an account to join the conversation.

  • inkoalawetrust
  • inkoalawetrust's Avatar
  • Moderator
  • Moderator
More
3 years 3 months ago #8 by inkoalawetrust
Replied by inkoalawetrust on topic [SUBMISSION] Hand Cannon
Well, can you show us what you typed out the decal property as ? Like did you try passing a number to it instead of a text string ?

And also, GZDoom is on version 4.6.1, so use that instead.

Please Log in or Create an account to join the conversation.

  • Gothic
  • Gothic's Avatar
  • Moderator
  • Moderator
More
3 years 3 months ago #9 by Gothic
Replied by Gothic on topic [SUBMISSION] Hand Cannon
Check the ZDoom wiki to clarify more doubts in the future

Please Log in or Create an account to join the conversation.

  • TyrannotitanFan
  • TyrannotitanFan's Avatar Topic Author
  • Lost Soul
  • Lost Soul
More
3 years 3 months ago #10 by TyrannotitanFan
Replied by TyrannotitanFan on topic [SUBMISSION] Hand Cannon
here you go
(the 11-th line)
also thanks anyway (i was looking in ZDoom Wiki for some Decorate stuff)
Attachments:

Please Log in or Create an account to join the conversation.