I've decided to try and make a gun that fires projectiles that when it hits a pawn, they increase slightly in fatness.
Then at a certain point they explode.![Big Grin :D :D](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Now the above code is from ShockProj, which is the altfire of the Shock Rifle.
Now the questions.![Big Grin :D :D](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
1) What's that auto doing infront of the state?
2) What's the differance between a processtouch and a touch?
3) What exactly is going on here? This is what I thought.
If the actor hit is not the firer and the actor is a projectile or the actor has a collision radius of none then Explode.
Is this correct?
4) If the above is correct then how does it tell if it's hit any walls or other players?
5)When does the function BeginState get called?
Then at a certain point they explode.
Code:
auto state Flying
{
function ProcessTouch (Actor Other, vector HitLocation)
{
If ( (Other!=Instigator) && (!Other.IsA('Projectile') || (Other.CollisionRadius > 0)) )
Explode(HitLocation,Normal(HitLocation-Other.Location));
}
function BeginState()
{
Velocity = vector(Rotation) * speed;
}
}
Now the above code is from ShockProj, which is the altfire of the Shock Rifle.
Now the questions.
1) What's that auto doing infront of the state?
2) What's the differance between a processtouch and a touch?
3) What exactly is going on here? This is what I thought.
If the actor hit is not the firer and the actor is a projectile or the actor has a collision radius of none then Explode.
Is this correct?
4) If the above is correct then how does it tell if it's hit any walls or other players?
5)When does the function BeginState get called?