[Question] Effects of a (Custom) BulletPuff Actor?

Discuss all aspects of editing for ZDoom.
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.

[Question] Effects of a (Custom) BulletPuff Actor?

Postby RV-007 » Sat Aug 11, 2012 8:26 pm

Hello, I want to make a projectile that matches the bullet actor b/c I want to add in effects for my custom bullet. Problem is, I don't know the stats of a bullet actor so I need some help.

I was satisfied w/ BulletPuffs, but there is limited effect on affected targets. The best success was a poisonous bullet (nothing else). Everything else works only on walls, floors, and ceilings (not on [bleeding?] targets).

If I can make my own bullet actor, I will finally complete my flare pistol (potentially more dangerous than a flamethrower). The bullets from the flare pistol will spawn a flame actor upon death. This is like a burning bullet. I could imagine it now, pistol/chaingun spawning flames out of nowhere! It probably gets worse/cooler if bullet monsters can start throwing out bullets w/ special effects (e.g. blurs, numb, armor pierce, ammo eater, etc)!

Some of the statements I used are:
http://zdoom.org/wiki/Classes:BulletPuff
http://zdoom.org/wiki/A_FireCustomMissile
http://zdoom.org/wiki/A_FireBullets

EDIT (15/08/2012):
So it seems that projectiles cannot emulate all the properties of a bullet. My attempt for bullets to cause different effects (e.g. spawning flames) point to the workings of the BulletPuff actor.
Last edited by RV-007 on Wed Aug 15, 2012 6:49 pm, edited 5 times in total.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: Projectile Equivalent of a Bullet Actor?

Postby Hellser » Sat Aug 11, 2012 8:40 pm

FastProjectile.

You can do, an example;

Code: Select allExpand view
ACTOR BulletProjectile : FastProjectile
{
    Radius 2
    Height 2
    decal "BulletHole"
    PROJECTILE
      +BLOODSPLATTER
      +DONTSPLASH
   States:
   {
   Spawn:
      TNT1 A 1
      Loop
   Death: //Walls and Floors
      TNT1 A 1 A_SpawnItem("BulletPuff")
      stop
   XDeath: //Bleedable Objects
      TNT1 A 1
      stop
   Crash: // Non-bleedable Objects
      TNT1 A 1 A_SpawnItem("BulletPuff")
      stop
   }
}


If you noticed, I didn't specify speed or damage, that's where you inherit:

Code: Select allExpand view
ACTOR ShotgunBullet : BulletProjectile
{
   Damage (5*random(1,3)) // Specifies the damage
   Decal "AuroraBulletMark" // Change the bullet hole if you wish
   Speed 200 // and the speed
}


Now, to fire a gun:

Code: Select allExpand view
...
TNT1 A 0 A_TakeInventory("Shell",1)
TNT1 AAAAAAA 0 A_FireCustomMissile("ShotgunBullet", frandom(-2.3,2.3),0,0,0,0,frandom(-2.3,2.3))
...


That would go, an example, here:

Code: Select allExpand view
...
  Fire:
    SHTG A 3
    TNT1 A 0 A_TakeInventory("Shell",1)
    TNT1 AAAAAAA 0 A_FireCustomMissile("ShotgunBullet", frandom(-2.3,2.3),0,0,0,0,frandom(-2.3,2.3))
    SHTG A 0 A_PlaySound ("weapons/shotgf", CHAN_WEAPON)
    SHTG A 7 A_GunFlash
    SHTG BC 5
    SHTG D 4
    SHTG CB 5
    SHTG A 3
    SHTG A 7 A_ReFire
    Goto Ready
User avatar
Hellser
Hello, I'm the Doctor.
 
Joined: 25 Jun 2006
Location: The TARDIS

Re: Projectile Equivalent of a Bullet Actor?

Postby RV-007 » Sat Aug 11, 2012 9:37 pm

Thanks.

So that's what the Crash state is used for.

What's frandom?
Last edited by RV-007 on Sat Aug 11, 2012 9:43 pm, edited 1 time in total.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: Projectile Equivalent of a Bullet Actor?

Postby Hellser » Sat Aug 11, 2012 9:42 pm

RV-007 wrote:So that's what the Crash state is used for.

What's frandom?


Float Random. Meaning instead of say, random(1,3): 1, 2 and 3.. it'll be 1.1, 1.2, 1.3, 1.4... etc. up to 3.
User avatar
Hellser
Hello, I'm the Doctor.
 
Joined: 25 Jun 2006
Location: The TARDIS

Re: Projectile Equivalent of a Bullet Actor?

Postby RV-007 » Sat Aug 11, 2012 9:44 pm

Sounds like more coordinates to use. :D
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: Projectile Equivalent of a Bullet Actor?

Postby RV-007 » Sun Aug 12, 2012 12:32 am

Bit off-topic:

I finally made a flare pistol w/ combustible bullets! Unfortunately for me, I can't make sticky combustible bullets so that's sad. I wanted to use A_VileTarget, but the projectile then hates me. I think I will be able to make sticky bullet flames later on.

Here is the code of my progress; some of the code is actually makeshift stuff, but it works wonderfully as a non-sticky combustible bullet (also a real dead shot [kills cyberdemons easily]).
Spoiler: The Flare Pistol Code

Spoiler: The Flare Bullet Code

Spoiler: The Flame Code
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: [Question] Projectile Equivalent of a Bullet Actor?

Postby RV-007 » Sun Aug 12, 2012 3:24 am

How do I make projectiles move past decorations like bullets?
The bulletchip decal is alive for some reason.
When do I use the frandom(x/y,z) for which statement? It looks like it works only for x/y/z angles of missiles/projectiles (use frandom(x/y,z) for one projectile!) than bullets (e.g. A_FireBullet [don't know about monster's bullet attack]). I should be more careful on which statement is meant for what flag.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: [Question] Projectile Equivalent of a Bullet Actor?

Postby Xtyfe » Sun Aug 12, 2012 8:31 pm

You should be able to have the projectile "stick" with A_Warp I think

Also, you would need to redefine decorations so that projectiles would not hit them for what you want
Xtyfe
 
Joined: 14 Dec 2007
Location: Kitchener, Ontario

Re: [Question] Projectile Equivalent of a Bullet Actor?

Postby RV-007 » Mon Aug 13, 2012 12:19 am

A_Warp seems difficult, but thanks for pointing the way.

Alas, projectiles are just projectiles, doing the projectile way.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: [Question] Projectile Equivalent of a Bullet Actor?

Postby RV-007 » Wed Aug 15, 2012 6:28 am

Will A_VileTarget (wait, it crashed on me) A_RadiusGive w/ radius of 64 be accurate enough for bullet projectiles to send effects to targets? A_RadiusGive could be that perfect ProjectilePuff I have been looking for. Time to update from A_SpawnItemEx, lol.

Is rail the better projectile equivalent of bullets? Rail is like a bullet and it even have pufftype!
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: [Question] Projectile Equivalent of a Bullet Actor?

Postby Enjay » Wed Aug 15, 2012 6:34 am

Wiki wrote:The railgun effect in ZDoom classifies neither as a hitscan nor as a projectile attack. It consists in a line that hits instantaneously and pierces through actors, obstacle and enemies alike, until it hits a wall, surrounded by a particle helix. However, autoaim does not work on player rail attacks, so free look is required.


Railgun
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: [Question] Projectile Equivalent of a Bullet Actor?

Postby RV-007 » Wed Aug 15, 2012 4:56 pm

I just found out too, lol. It's also on BulletPuff.

http://www.zdoom.org/wiki/Classes:BulletPuff wrote:...
Actors inheriting from this class:
automatically move up 1 mappixel per tic (because of the vspeed property)
may be replaced by particles when spawned if the ALLOWPARTICLES flag is set (and the player has the appropriate option enabled in their configuration settings)
define the damage type of a hitscan attack if spawned using A_BulletAttack, A_CustomBulletAttack, A_FireBullets or A_CustomPunch
...


I also found that there are plenty of states for the BulletPuff actor.
Crash Spawn Melee
What is the difference between spawn and melee states for bulletpuff actors?
How about using both?
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: [Negated] Projectile Equivalent or Effect of a Bullet Ac

Postby Xtyfe » Wed Aug 15, 2012 5:05 pm

The Melee state is followed through from the spawn state when used by a players melee weapon.

If you look at the table provided on that page you will see how it all works
Xtyfe
 
Joined: 14 Dec 2007
Location: Kitchener, Ontario

Re: [Negated] Projectile Equivalent or Effect of a Bullet Ac

Postby RV-007 » Wed Aug 15, 2012 5:08 pm

What if the melee state is used by a non-melee weapon? Will it work the same way as the BulletPuff's death state?

Also, I think that there should be explicit description for A_CustomBulletAttack. It is not for weapon classes. Same applies to other attack statements.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: [Negated] Projectile Equivalent or Effect of a Bullet Ac

Postby Xtyfe » Wed Aug 15, 2012 5:22 pm

RV-007 wrote:What if the melee state is used by a non-melee weapon? Will it work the same way as the BulletPuff's death state?


It wont be used as far as i know.

RV-007 wrote:Also, I think that there should be explicit description for A_CustomBulletAttack. It is not for weapon classes. Same applies to other attack statements.


The fact that its in the monster attack category on the wiki is not enough?
Xtyfe
 
Joined: 14 Dec 2007
Location: Kitchener, Ontario

Next

Return to Editing

Who is online

Users browsing this forum: Andie, Bing [Bot], Google [Bot], scalliano and 3 guests