Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
rabidrage

How do I make this autoaim?

Question

a_railattack (random(15,25), 7, 1, "none", white, RGF_SILENT | RGF_FULLBRIGHT | RGF_CENTERZ | RGF_NOPIERCING | rgf_explicitangle, frandom(2,5), "beampuff", 0, 0, 762, 1, 0.35, 0, "none", 0);

I saw a post elsewhere that said to incorporate this as the spread_z parameter: BulletSlope()-pitch

 

But I don't know exactly how to put it in.  I tried putting it where the second zero is after pufftype, but then GZDoom doesn't want to load it.

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

I was struggling to get this done too and I found that exact same post about "BulletSlope()-pitch", but for me it didn't work (gzdoom tells me it's an error, I don't know if I was using it wrong or it works only in zscript while I'm working in decorate for now).
I came up with another solution: I used "A_CustomRailgun" instead, which is normally used for monsters, and have the autoaim on by default.

The only issue with this is that it won't consume ammos obviously, so you have to "trick" the system by adding a "A_FireBullets" right before the rail attack et voilà 

Share this post


Link to post
  • 0

Interesting.  Before I add the A_Firebullets bit, I've changed the railgun part to this:

 

A_CustomRailgun (random(15,25), 7, 1, "none", white, RGF_SILENT | RGF_FULLBRIGHT | RGF_CENTERZ | RGF_NOPIERCING | rgf_explicitangle, 2, frandom(2,5), "beampuff", 0, 0, 762, 1, 0.35, 0, "none", 0);

Now I get this error message: Expected ',', got '('.

 

Where did I mess up?

Share this post


Link to post
  • 0

Never mind.  I almost got it completed here.  Think it's gonna work just fine.  I had left in the "ammouse" parameter.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×