Announcement

Collapse
No announcement yet.

UT2004 Assault grenade style charge for speed

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

    UT2004 Assault grenade style charge for speed

    Starting to research the charge for momentum/speed function of the 2004 assault rifle. Has anyone made anything like it? I can go bug them for the code LOL

    Looking at the assaultgrenade.uc file its a bit beyond me to translate it to UT3.


    I know the biorifle has a charge code

    Code:
    	simulated event float GetPowerPerc()
    	{
    		local float p;
    		p = float(GlobStrength) / float(MaxGlobStrength);
    		p = FClamp(p,0.0,1.0);
    
    		return p;
    	}
    
    	simulated function bool TryPutdown()
    	{
    		bWeaponPutDown = true;
    		return true;
    	}
    
    	/**
    	 * Adds a rocket to the count and uses up some ammo.  In Addition, it plays
    	 * a sound so that other pawns in the world can here it.
    	 */
    	simulated function IncreaseGlobStrength()
    	{
    		if (GlobStrength < MaxGlobStrength && HasAmmo(CurrentFireMode))
    		{
    			// Add the glob
    			GlobStrength++;
    			ConsumeAmmo(CurrentFireMode);
    		}
    	}
    
    	function bool IsFullyCharged()
    	{
    		return (GlobStrength >= MaxGlobStrength);
    	}
    ect,ect

    Why do I think you can swap out GlobStrength/MaxGlobStrength for a momentum/speed variable.....mmmmmmmm

    #2
    Code:
    ProjetileInstance.Init(MomentumVector*ChargeTime);
    The bio weapon does not change any speed itself. The speed is caculated by the strength which is passed when the projectile is spawned. The projectile sets the initial velocity.

    PS: Wrong section. Programming is here.

    Comment

    Working...
    X