Announcement

Collapse
No announcement yet.

Works for player but not vehicle?

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

  • replied
    hmm.. will test it

    thanks

    Leave a comment:


  • replied
    yup what Hsoolien said Karma actors can only be moved using karma functions

    try replacing

    P.AddVelocity(ChuckVelocity); with
    p.KAddImpulse( ChuckVelocity, vect(0,0,0) );
    the second paramater is where the impulse should be applied, using vect(0,0,0) sets it to the vehicles location.
    I'm not sure if you will have to multiply ChuckVelocity by 50 to scale it up for karma, but if you do have to dont do it in the function as it wont work
    eg KAddImpulse( ChuckVelocity * 50 , vect(0,0,0) );

    Leave a comment:


  • replied
    Odd thing is it should work for vehicles as well since they are pawns
    Though P.Addvelocity might not work withthem beig Karma actors..

    Leave a comment:


  • started a topic Works for player but not vehicle?

    Works for player but not vehicle?

    I got some code here that only works for players and not vehicles (most of the code is irrelevant) does anyone have any ideas on how to make this work for vehicles?

    function Touch(Actor Other)
    {
    if (Pawn(Other) != None)
    {
    Other.PendingTouch = self;
    PendingTouch = Other;
    }
    }

    function PostTouch(Actor Other)
    {
    local Pawn P;

    P = Pawn(Other);
    if (P != None)
    {
    Explode(Location, vect(0,0,1));
    P.AddVelocity(ChuckVelocity);
    P.Died(None, DamageType, P.Location);
    }
    }

    blip2 :up:
Working...
X