Alphawolf Posted April 8, 2011 If in the decorate it says: Fire: .... .... A_FireBFG .... but the BFG ball is called 'BFGBall' how does it know to fire a BFGBall from the gun if it says 'BFG'? http://zdoom.org/wiki/A_FireBFG 0 Share this post Link to post
Mithran Denizen Posted April 8, 2011 Because it's a hard-coded attack function that fires the BFGBall? I'm not really sure what you're trying to ask, or why. 0 Share this post Link to post
Alphawolf Posted April 9, 2011 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. 0 Share this post Link to post
Mithran Denizen Posted April 9, 2011 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. 0 Share this post Link to post
Quasar Posted April 9, 2011 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. 0 Share this post Link to post
skib Posted April 10, 2011 A_FIREBFG is A_Firecustommissile ("BFGBALL") 0 Share this post Link to post