I understood how to move a PLC but it is not clear to me how to adjust the speed with which it moves.
Is this the code i need?
SetObjectVisualTransform(oPLC,OBJECT_VISUAL_TRANSFORM_ANIMATION_SPEED, 40.0);
If so, how to use it?
Second question. I noticed that once a plc has been moved via script by this function the portion of floor that was below result inaccessible for a character. This is an undesired effect in my case, how can i fix it?
The clues in the name of the function - SetObject Visual Transform. Basically placeables consist of two parts - the visuals you can see and a bounding box that prevents walking through the placeable. SetObjectVisualTransform() only alters the visual part. If you try your transformation again you will find that your PC is actually able to walk through your moved object. AFAIK there is currently no fix for this.
TR
thx for the explanation.
have you ever seen this?
Yep nice little trick. Start position of that bookcase is against the wall. Use a script to move its appearance in front of the door and position your PC where you want them. Then and only then start recording. That way you can walk where the door was after moving the bookcase’s appearance back to match the position of its walkmesh.
Two things give it away. The PC never tries to walk where the bookcase is and (assuming it is supposed to be usable) there is no glow to the bookcase when the cursor passes over it unlike the door itself and the wall lever.
Like I said in my previous - paint a bookcase and move its appearance using SetObjectVisualTransform()
. You will now be able to walk through it. I know this from a module that I and a friend were building last year (now on backburner). During testing the PC accidentally walked through the bookcase and you couldn’t walk through where it had been originally painted in the toolset.
TR
1 Like
For now, one crude way of fixing this is to remove the walkmesh from the placeable, toggling invisible walls to block movement into the current visual position.
1 Like