Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Alphawolf

How does BFG fire BFGBall?

Recommended Posts

I want to add the BFG ball to the BFG10K weapon found on realm667. I'd like it to fire the BFG ball BUT I want to customise the properties of that ball, in other words I want a SECOND BFGBall and am wondering how I would make that work.

I was hoping it would be as easy as copying it over and changing the name yet thats what I meant by "A_FireBFG"... if its called 'BFGBALL' in the decorate file why does it say:

"A_FireBFG"

and not

"A_FireBFGBall" ?

Learning the ropes is fun.

Share this post


Link to post

Because the full name of that function you're referring to is "A_FireBFG", and not "A_Fire". You can't just add the actor that you want to be fired to the end as a suffix (ie. A_FireBaronBall won't magically know that you want it to fire the Baron of Hell's attack. Also, "A_Fire" on its own is part of the arch-vile attack sequence, not a weapon function.)

Depending on what you want to customize and how you want the new weapon to work, you might want to try using A_FireCustomMissile instead. You should be able to set its first parameter to "BFGBall" (with quotes) in order to launch the BFG's projectile from the weapon. I'm not sure if the BFG tracer effect can be replicated with another projectile attack function though.

Share this post


Link to post

Yeah. DECORATE and DeHackEd/BEX action function names are not textual commands that get interpreted by the game engine. They are the hard-coded internal names of actual native-code functions, such as:

void A_SargAttack(Mobj *actor)
{
   if(!actor->target)
      return;
   A_FaceTarget(actor);
   if(P_CheckMeleeRange(actor))
   {
      int damage = ((P_Random(pr_sargattack)%10)+1)*4;
      P_DamageMobj(actor->target, actor, actor, damage, MOD_HIT);
   }
}
This is C/C++ code, which ends up inside the executable file when it is compiled and distributed.

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
Sign in to follow this  
×