Page 1 of 1

Moving objects animated by scripts

PostPosted: Mon Mar 11, 2013 1:33 pm
by Zatiria
Hi.

I am working on machinima project in Myst Online (if you're wondering: yes the same one as the one mentioned by Locutus in this topic) and I need to be able to move objects like the Egg in the Egg Room and the flying Bahros that you can page in.

I am aware that both the Egg and the flying Bahros are composed of several objects. This should not be a problem because if I understand the attaching mechanics correctly I should be able to attach the individual objects to one object that will be moved and thus be able to move all of them while maintaining their relative distance to each other.

The problem is these objects are animated by scripts and because of that I am unable to move any of them. I assume there has to be a way to turn these scripts off or suspend them using the Plasma console but I have not been able to find a function that would look like it could serve that purpose. As such any input on this problem is welcome.

Re: Moving objects animated by scripts

PostPosted: Tue Mar 12, 2013 3:01 am
by Christopher
I don't think that objects like the egg or the flying Bahros are animated through a script... AFAIK the animation of these objects is started and controlled through a responder. In that case you can't stop these animations unless you modify the PRPs.
But if I am wrong, you have to delete or rewrite these scripts, so the object isn't animated.

Christopher

Re: Moving objects animated by scripts

PostPosted: Tue Mar 12, 2013 3:21 am
by diafero
The animation does not affect whether you can move them or not. The important part is whether these objects have their own coordinate interface or not. Object with coordinate interface can be moved around in Python. The Offline KI can take such objects in flymode, so you can control it with the arrow keys - but you can also move objects using KI commands like "/xyz 1 1 1 object object2" to move the given two objects by one unit on each axis. To find out the object name, you can use PrpShop and scroll through the list of Scene Objects - later versions can even render a preview of single objects. Then you can test whether the object is movable in-game with the Offline KI.

Re: Moving objects animated by scripts

PostPosted: Tue Mar 12, 2013 3:42 am
by Locutus
Heya!

If I may barge in here. :) We are using the CWE client which doesn't have the offline KI, but access to the Python console. I already found out the object names for the egg, and tried to move it using the physics.warp function. The objects do have coordinate interfaces. I can query the coordinates and check the X Y Z values. But when I try to modify the X and Y values, they immediately get reset to what they were before.

Also the coordinates cycle back and forth slightly on their own, probably caused by the slight back-and-forth animation the egg does. That's why we figured there was an automated process at play that sets those coordinates.

Re: Moving objects animated by scripts

PostPosted: Tue Mar 12, 2013 8:34 am
by Christopher
diafero wrote:The animation does not affect whether you can move them or not.


I think the animation can affect it. AFAIK the egg is animated to move up and down a bit. I think animations are exported in World coordinates and not in Local coordinates, which means if you move the object, it is moved back with the next keyframe of the animation.

Christopher

Re: Moving objects animated by scripts

PostPosted: Wed Mar 13, 2013 3:32 am
by diafero
Strange, I think I already moved animated objects... but maybe I actually moved the parents of animated objects, and the coordinates were relative to that, or something. It's too long ago to remember exactly, sorry.