Announcement

Collapse
No announcement yet.

i just cant fkn find it

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

  • replied
    Are you sure you're spawning the right grenade?

    Cause in AssaultGrenade (the class called when you al fire on the assault rifle)
    Code:
    function projectile SpawnProjectile(Vector Start, Rotator Dir)
    {
        local Grenade g;
        local vector X, Y, Z;
        local float pawnSpeed;
    
        g = Weapon.Spawn(class'Grenade', instigator,, Start, Dir);
        if (g != None)
        {
            Weapon.GetViewAxes(X,Y,Z);
            pawnSpeed = X dot Instigator.Velocity;
    
    		if ( Bot(Instigator.Controller) != None )
    			g.Speed = mHoldSpeedMax;
    		else
    			g.Speed = mHoldSpeedMin + HoldTime*mHoldSpeedGainPerSec;
    		g.Speed = FClamp(g.Speed, mHoldSpeedMin, mHoldSpeedMax);
            g.Speed = pawnSpeed + g.Speed;
            g.Velocity = g.Speed * Vector(Dir);
    
            g.Damage *= DamageAtten;
        }
        return g;
    }
    You have to make sure you have in your subclass the above function spawning your grenade

    Leave a comment:


  • replied
    Actually it didnt work.

    I did remove all that bounce code before just like i did then and nothing changes it still bounces.

    Btw, i copied all the code from the assault rifle and changed the names of the classes etc etc to make a new weapon so id be extending weapon instead of whatever weapon is the closest relation to the weapon im creating.

    Leave a comment:


  • replied
    Ta, i thought those were the key areas.

    Leave a comment:


  • replied
    Subclass Grenade (In xWeapons)

    Then you want to put the following code in:
    Code:
    simulated function ProcessTouch( actor Other, vector HitLocation )
    {
        if ( (Other != Instigator || bCanHitOwner) )
        {
    		Explode(HitLocation, Normal(HitLocation-Other.Location));
        }
    }
    This takes out !Other.bWorldGeometry in the if statement which is causing ot not to blow up on some walls
    and you want to add
    Code:
    simulated function HitWall( vector HitNormal, actor Wall )
    {
         Explode(Location, HitNormal);
    }
    Which removes the bounce routine originally found in this area of the code.

    Leave a comment:


  • started a topic i just cant fkn find it

    i just cant fkn find it

    Im creating a weapon closely related to the assault rifle. Everything is all good except i want the grenade to explode on impact, wall, floor player or otherwise but i cant find the code for it.

    Iv looked and looked and tried different things but nothing has worked.
Working...
X