Jump to content

Recommended Posts

Posted

I am attempting to raise a plane of lava DweSpecialForgeLava01. The object is a static. When I use TranslateTo for my other moving objects I alter the collision of the object in Nifskope to make it moveable. This static has no collision and I haven't found a way to add collision without getting errors in Niksskope, so I decided the onlt other way to move it is with MoveTo and While.

The script compiles fine until I add the line LavaPlane.MoveTo(Xpos, Ypos, Zpos)

Error: (19,10): type mismatch on parameter 1 (did you forget a cast?)

Any other advice on scripting this also welcome.

 

  Reveal hidden contents

 

Posted

You are missing the first parameter of the MoveTo function. You need to enter the target object in which to move the LavaPlane. The X,Y,Z coordinates are relative to that object reference.

 

So if you have a neighboring object that you do move with TranslateTo, move this stubborn object with MoveTo to that neighboring object and set up the X,Y,Z coordinates so that it will end up in the correct position.

Posted

I don't get it. In other scripts where I use MoveTo, I use a xmarker for the x, y, z co-ordinates, Such as MyObject.MoveTo(MyMarker). This is fine for moving objects while player isn't looking - I use it to move an object back to its starting position after a TranslateTo has moved it. The first parameter is ObjectReference akTarget. That would be the xmarker when using a xmarker so what is it when I using co-ordinates that change as in the script I posted?

Posted

This is the line you have:

LavaPlane.MoveTo(Xpos, Ypos, Zpos)

It is missing the first parameter which should be an object reference. The Papyrus Compiler cannot use a float value as an object reference. This is why it is complaining and not compiling.

Posted

Possibly. Or a separate object (possibly invisible) that the TranslateTo works on. Move that with the TranslateTo and then use MoveTo to move this object to that object.

Posted (edited)
  On 5/3/2021 at 1:26 PM, IsharaMeradin said:

Possibly. Or a separate object (possibly invisible) that the TranslateTo works on. Move that with the TranslateTo and then use MoveTo to move this object to that object.

No offence dude but you cold have said that at the beginning.

Thanks.

 

EDIT:

All said and done can't get the lava object to move. Might need to give up on this. Final script attempt...

 

  Reveal hidden contents

 

Edited by antstubell
Posted

Re-read my first reply. I did state you might need to move one object with TranslateTo and then this object to that object with MoveTo. But whatever...

 

Is the object you are trying to move persistent in some way? Persistence tends to prevent movement of objects.

If you can or have not, test on a game that has not seen the mod at all. Just to rule out save game oddities.

 

Can you create a different type of object that you can use TranslateTo with and give it the appearance of this rather stubborn object? As a last resort...

  • 3 weeks later...
Posted

When in doubt, turn the object into an activator. All movement functions work on those, though the collision updating is a different matter.. but still useful if collision isn't a concern.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...