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? My goal is pretty simply but I can't seem to figure it out. All I want to do is trace from point A (location of missile) to point B (location of target) and return what it hits. Basically I want to know if the rocket can see the target or not.
TraceShot(HitLocation,HitNormal,EndTrace,StartTrace);
2: What is the proper way to save a location to a variable? I have a vector variable I've named SeekingLast so to me it would make sense that SeekingLast = Seeking.Location would save the location of Seeking into the SeekingLast variable for later use. This does not work (for what is most likely an obvious reason to all of you). What am I missing? I have a feeling it has something to do with the magnitude (or lack of) of the SeekingLast vector but I really have no idea why this won't work or how to properly save the coordinates of a location for later use.
3: Is there an easy way to say that PawnVariable = ActorVariable? Even though the Seeking variable is a pawn, it is declared as an actor by the rocket launcher. That prevents me from typing seeking.health (to make sure the target is still alive). I tried doing something like PawnVariable = SeekingActor but that returns an error. Is there any way I can check the health of an actor or set a pawn variable to that of the actor 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? My goal is pretty simply but I can't seem to figure it out. All I want to do is trace from point A (location of missile) to point B (location of target) and return what it hits. Basically I want to know if the rocket can see the target or not.
TraceShot(HitLocation,HitNormal,EndTrace,StartTrace);
2: What is the proper way to save a location to a variable? I have a vector variable I've named SeekingLast so to me it would make sense that SeekingLast = Seeking.Location would save the location of Seeking into the SeekingLast variable for later use. This does not work (for what is most likely an obvious reason to all of you). What am I missing? I have a feeling it has something to do with the magnitude (or lack of) of the SeekingLast vector but I really have no idea why this won't work or how to properly save the coordinates of a location for later use.
3: Is there an easy way to say that PawnVariable = ActorVariable? Even though the Seeking variable is a pawn, it is declared as an actor by the rocket launcher. That prevents me from typing seeking.health (to make sure the target is still alive). I tried doing something like PawnVariable = SeekingActor but that returns an error. Is there any way I can check the health of an actor or set a pawn variable to that of the actor 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.