Targetting Location/Status

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

SoSilencer

Harry Goz (1932 - 2003)
Nov 27, 2000
834
0
0
43
unrealdev.net
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.
 

SoSilencer

Harry Goz (1932 - 2003)
Nov 27, 2000
834
0
0
43
unrealdev.net
Woo! Ok I just finished talking to a uscript god and he was able to give me all the answers. Just in case anyone was wondering...

Like Smoke39 said (thanks a ton for reply) I was able to do the following to check if the target was still alive:

if (pawn(seeking).health > 0)

In order to check visibility I was told to use the FastTrace function as follows. I have to wonder why none of the tutorials or reference pages I looked at had any info on this.

FastTrace(StartLocation, EndLocation) //returns true if it reaches EndLocation

And as it turns out I WAS saving the location properly. The problem was that my old trace function was returning none so the location it saved was 0,0,0 or something very close to that.

TargetsLastLocationVar = Targets.Location;

Thanks again, now for the next step: Making my rockets navigate around obstacles to find their target <evil laugh>.
 

Bytekeeper

Last of the Brunnen G
Jul 15, 2001
181
0
0
Germany
Visit site
You could use the navigationcode of UT to even make your rockets follow an enemy thru the whole level *ROFLOL*

Mod idea: Staying alife hahaha
Player gets no weapons, he only has his feets, and those are ready to RUN.