PDA

View Full Version : JumptoLocation Problem?


darkwarrior
08-20-2005, 08:33 PM
I'm trying to restore a cutscene between Nihilus and Sion but rather than having Sion walk the entire walkway of the ravager, I want him to move great lengths at a time as the camera changes so I'm trying to use the jump to location method but I keep getting a 'type mismatch error in paramater 1 in call to "Location" '.

object oArea = GetArea(OBJECT_SELF);
vector vPosition = GetPosition(OBJECT_SELF);
float fOrientation = GetFacing(OBJECT_SELF);

location locTarget = Location(oArea, vPosition, fOrientation);

It says the problem is with the bolded line. I took this straight from the lexicon though so I don't know where to look to fix it.

I then use:

AssignCommand(oDarthSion, ActionJumpToLocation(locTarget));

To invoke it. Any advice?

Doc Valentine
08-21-2005, 04:42 AM
Where is the object oDarthSion referenced in the script? Or did you just not show that part?

darkwarrior
08-21-2005, 05:21 AM
Oh, that object line is the wrong one ><

object oArea = GetArea(OBJECT_SELF);
vector vPosition = Vector(20.0, 20.0, 0.0);
float fAngle = 90.0;
location locTarget = Location(oArea, vPosition, fAngle);

That's closer, the above was what I used when I was getting frustrated. I assumed by area it meant the module it was in at the moment but it seems to think that there is a type mismatch in the first space.

I've tried it other ways like referencing invisible001.utp as a jumptoobject but it still doesn't seem to have any affect.

Tupac Amaru
08-21-2005, 06:38 AM
object oArea = GetArea(OBJECT_SELF);
vector vPosition = Vector(20.0, 20.0, 0.0);
float fAngle = 90.0;
location locTarget = Location(oArea, vPosition, fAngle);

The location constructor only requires a vector and a float, not an object:
location locTarget = Location(vPosition, fAngle);

darkwarrior
08-22-2005, 09:27 PM
vector vPosition = Vector(200.0, 41.0, 12.0);
float fAngle = 90.0;
location locTarget = Location(vPosition, fAngle);


I tried that with:

DelayCommand(5.0, AssignCommand(oDarthSion, JumpToLocation(locTarget)));


At 5 seconds, he just stops walking and thats it on the board of the ravager. If it matters, he is following a waypoint to Darth Nihilus during this. He does not jump though.

darkwarrior
08-22-2005, 09:36 PM
Nevermind, it started working. I think because I wasn't being massively specific with the numbers, i.e. 12.43423523523523 it wouldn't allow it because I was jumping into the floor or something. Once I used them it worked fine.