i made this so i have to press E to pick stuff up.
class SelectorGun extends InstantFire;
function Actor Fire(Pawn P)
{
local vector X, End, Start,HitLocation, HitNormal;
local Actor Other;
local rotator tempRotation;
local int range;
range = 75;
Instigator=P;
tempRotation = AdjustAim(P.location,0);
Start = P.Location;
X = Vector(tempRotation);
End = Start + range * X;
return P.Trace(HitLocation, HitNormal, End, Start, true);
}
it works so if your in need of something that works like this, there you go. Create it in your pawn class, look at your target, call fire and it will return that actor to whatever variable you declared for it. B sure to make your actor, bBlockActors=true.
class SelectorGun extends InstantFire;
function Actor Fire(Pawn P)
{
local vector X, End, Start,HitLocation, HitNormal;
local Actor Other;
local rotator tempRotation;
local int range;
range = 75;
Instigator=P;
tempRotation = AdjustAim(P.location,0);
Start = P.Location;
X = Vector(tempRotation);
End = Start + range * X;
return P.Trace(HitLocation, HitNormal, End, Start, true);
}
it works so if your in need of something that works like this, there you go. Create it in your pawn class, look at your target, call fire and it will return that actor to whatever variable you declared for it. B sure to make your actor, bBlockActors=true.
Comment