Menu

#83 Charging Weapons

open
nobody
None
5
2012-11-26
2005-07-13
Snarboo
No

Another simple suggestion here. Basically, this feature
would allow the player to charge a weapon so that it
either fires a more powerful projectile or a completely
different attack, kind of like the Charge Beam from
Megaman, heh. This could also be used to make a weapon
that can fire more than one kind of projectile, as seen
in the ZDoom Community Weapons Project.

I'm not sure how one would go about defining this, but
maybe a new Command flag could be made for it, like
say, CHARGE_ATTACK.

Another flag would set how long it takes for the weapon
to charge up to the next attack, and such a Command
flag could be called CHARGE_INTERVAL.

The weapon would also need to know whether or not it
should fire after it reaches the highest attack, to
shoot immediately after the highest attack is reached,
or whether the weapon cycles through the attacks after
each interval. A Command flag for that type of feature
might be called CHARGE_STYLE.

This might be how a weapon that uses a charging attack
would be set up:

[MEGAMAN_BLASTER]
BLAH...
CHARGE_ATTACK=PISTOL, SHOTGUN;
CHARGE_INTERVAL=3; //3 second pause
CHARGE_STYLE=HOLD; //Holds once it reaches SHOTGUN
attack and doesn't fire until the trigger is released
BLAH...

How the attacks are listed in the CHARGE_ATTACK flag is
the order the weapon charges in. For the example above,
the weapon would fire the pistol attack first, and if
charged for three seconds, would fire the shotgun
attack. If the designer wants the secondary fire to
charge up, but not the primary, the designer would
simply put SEC_ before the various Commands(ie
SEC_CHARGE_ATTACK). This sounds fairly complicated, but
it's not if you think about it, atleast I hope not.

This part is a little more complicated and really needs
to be worked out for this to work. Now, a new kind of
Special STATE would need to be used for a charging
weapon. This would seperate it from the regular ATTACK
state. This state would be called CHARGE for primary
fire and SECCHARGE for secondary. The frames for the
charging state would need to sync up with how the
CHARGE_INTERVAL command was set up so the frames don't
go out of sync with the actual charge. The action for
every frame would need to be set to something like
CHARGE(ATTACKONE:1) so the weapon knows which state to
jump to upon firing that attack, like, if you hold it
long enough that it cycles to the second attack in the
charge que, it would jump to the specific Attack state
for that attack. This part can be ignored for those
that don't understand or think there is a better way to
set up and handle the charging function of a weapon.

I hope this wasn't too confusing and that I'm not
asking for too much or something too hard to implement.
I think it would be really cool to be able to charge a
weapon up before firing it, and it would be the perfect
thing for a Megaman mod. :)

Discussion

  • Snarboo

    Snarboo - 2005-07-13

    Logged In: YES
    user_id=1152106

    I just realized something here. You could probably eliminate
    most of the stuff I just typed here and instead use a
    Command flag called CHARGING_WEAPON. This flag would tell
    the game whether or not this weapon would function like
    normal, or act like a charging weapon. If the flag is not
    set, the default value is NO. If the flag is set to yes(ie
    CHARGING_WEAPON=YES; ), however, the weapon would then look
    for the CHARGE states I listed above. How the frames for the
    CHARGE state are listed would determine how the weapon
    behaves while charging. Here's an example:

    [WEAPON_1]
    BLAH...
    CHARGING_WEAPON=YES;
    BLAH...

    STATES(CHARGE)=ABCD:A:2:NORMAL:CHARGE(ATTACKONE:1),
    ABCD:B:2:NORMAL:NOTHING,
    ABCD:C:2:NORMAL:CHARGE(ATTACKTWO:1),
    #CHARGE;

    The above weapon would fire attack one upon tapping the
    primary attack key, and if held down for four seconds, would
    cycle through frames A and B, and if released upon frame C,
    would fire attack two. If the fire button is held down for 6
    seconds, it would start all over again.

    I believe this would be a far better and simpler way of
    handling a charging style weapon. If you like, you can
    completely ignore my first suggestion since it was
    complicated and messy. Sorry. :(

     
  • Jack Walker

    Jack Walker - 2005-07-13

    Logged In: YES
    user_id=124442

    Hehe... I'm a Megaman fan too, and I never would've thought
    to ask about this. This is one of the more creative ideas I've
    seen lately. If I can think of anything for this, I might return
    and add it here. :P

     

Log in to post a comment.

MongoDB Logo MongoDB