Announcement

Collapse
No announcement yet.

Quick question on Weapon Scripting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Quick question on Weapon Scripting

    Hello all,
    I am coding a weapon in UT2004. The alt-fire is set to "fire upon release". The idea is that this weapon will charge like the bio-rifle alt fire, except it will fire automatically after a certian length or time charging or when it runs out of ammo. I have it partially working in that pressing the button "charges" the weapon up to it's maximum charge, and fires when the button is released. It is doing this within a state much like 'biochargefire's "hold" state.
    I guess what I'm asking, ii what is the command/keyword that tells the code that the button has been released, even if momentary, if it has not?
    Everything I have tried has proven to me that although I can force the code to exit the state "hold", the actual fire effects only happen when the button is released. If anyone has an Idea for me, I will be grateful. Thanks, GHouck

    You should start drinking prune juice and KY jelly cocktails right now,
    that will make things a lot smoother.
    -Felatio Love

    #2
    you can't simulate the keypress without going into interactions, which for this is unnecessary. just go into your weapon's tick function and when you're ready to force the weapon to fire, call StartFiring() and whatever your fire method is (usually ModeDoFire).
    StartFiring just gets your 3rd person effects going, modeDoFire (or whatever yours is) does everything else.

    Comment


      #3
      Thanks, That worked 'mostly'. I have a small issue with it "double firing" under certian circumstances, but I'll figure it out (I hope). Thanks

      Comment

      Working...
      X