Moving objects animated by scripts

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Moving objects animated by scripts

Postby Zatiria » Mon Mar 11, 2013 1:33 pm

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.
Zatiria
 
Posts: 2
Joined: Mon Mar 11, 2013 1:18 pm

Re: Moving objects animated by scripts

Postby Christopher » Tue Mar 12, 2013 3:01 am

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
User avatar
Christopher
 
Posts: 276
Joined: Mon Jul 19, 2010 3:25 am

Re: Moving objects animated by scripts

Postby diafero » Tue Mar 12, 2013 3:21 am

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.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Moving objects animated by scripts

Postby Locutus » Tue Mar 12, 2013 3:42 am

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.
Locutus
 
Posts: 29
Joined: Sat Mar 09, 2013 9:41 am

Re: Moving objects animated by scripts

Postby Christopher » Tue Mar 12, 2013 8:34 am

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
User avatar
Christopher
 
Posts: 276
Joined: Mon Jul 19, 2010 3:25 am

Re: Moving objects animated by scripts

Postby diafero » Wed Mar 13, 2013 3:32 am

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.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany


Return to Scripting

Who is online

Users browsing this forum: No registered users and 6 guests