PDA

View Full Version : get position of an actor in kismet



ugu
04-09-2008, 11:41 AM
Hi everyone

I need to grab the X and Y position of an actor for a particular kismet script. I tried to do it with a "get property" node but it doesn't seem to work right.

I found the "location" property in the object, buuuuuuuut, I can only get a string variable out of it. This string variable looks like (X=512 ; Y= -16 ; z=4096)
If I try to get a float variable, it gives me a weird result.

Is there a way to get a "location.X" ,or whatever it's called, float variable from the object properties.

Or, if this kind of thing isn't designed to work this way, is there any way to get the X and Y position of an actor.

I hope I've been clear (but I doubt it) and thanks a lot everyone.

mikepurvis
04-10-2008, 04:21 PM
Hi:

This is how to get it from script. Sorry, I don't know how to just in Kismet.

First make set the tag in the level editor for an individual name. Like "MyActorTag".

Then, where is best for you. I did this in the PlayerController class. This script snippet would teleport you to the location of "MyActorTag".




local YourActorClass YAC;

foreach DynamicActors(class'YourActorClass', YAC)
{
if ( YAC.Tag == 'MyActorTag' )
{
Pawn.SetLocation( YAC.Location );
}


Hope that helps.

ugu
04-11-2008, 06:33 PM
Thanks a lot for the answer but it won't help me since I can't do scripts :-(
That was nice anyway.