I've started working on the "AI" of a new type of seeking rocket I've been making and have run into a few minor problems.
1: What do HitLocation and HitNormal mean when it comes to a trace function? All I want to do is trace from point A (location of missile) to point B (location of target) and return what it hits so I can figure out if the rocket can see its target or if something is blocking the way (like a wall).
TraceShot(HitLocation,HitNormal,EndTrace,StartTrace);
2: What is the proper way to save a location to a variable? What I'm trying to do is take Seeking.Location, the current location of the target, and save this to a variable for later use. The code below though simply returns 0,0,0. Is there ANY way to store a location or set of coordinates to variable?
Var vector SeekingLast;
SeekingLast = Seeking.Location;
3: Is there an easy way to say that PawnVariable = ActorVariable? I want to be able to check the health of the target but since Seeking is declared as an actor the game won't let me do Seeking.Health. Somehow I need to make a pawn variable and set that to the same actor as the Seeking variable.
Once I figure those things out I can make my rockets a tad smarter so that when their target dies they find a new one and when they lose sight of their target they go to it's last known position and continue looking. Thanks in advance.
1: What do HitLocation and HitNormal mean when it comes to a trace function? All I want to do is trace from point A (location of missile) to point B (location of target) and return what it hits so I can figure out if the rocket can see its target or if something is blocking the way (like a wall).
TraceShot(HitLocation,HitNormal,EndTrace,StartTrace);
2: What is the proper way to save a location to a variable? What I'm trying to do is take Seeking.Location, the current location of the target, and save this to a variable for later use. The code below though simply returns 0,0,0. Is there ANY way to store a location or set of coordinates to variable?
Var vector SeekingLast;
SeekingLast = Seeking.Location;
3: Is there an easy way to say that PawnVariable = ActorVariable? I want to be able to check the health of the target but since Seeking is declared as an actor the game won't let me do Seeking.Health. Somehow I need to make a pawn variable and set that to the same actor as the Seeking variable.
Once I figure those things out I can make my rockets a tad smarter so that when their target dies they find a new one and when they lose sight of their target they go to it's last known position and continue looking. Thanks in advance.