moving objects?

Post » Tue Mar 15, 2011 3:43 am

How can I make an object (any object) move by its self?

--MNPred
User avatar
suzan
 
Posts: 3329
Joined: Mon Jul 17, 2006 5:32 pm

Post » Mon Mar 14, 2011 7:10 pm

How can I make an object (any object) move by its self?

--MNPred


A bit more info would be helpful. Move like a creatures or NPC? Move on a fixed path? What kind of object? For what purpose?
User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm

Post » Tue Mar 15, 2011 4:34 am

Well, it would need to be an object. For example, I would like to have ships sail themselves to various ports. So that, if the player is at the right port at the right time, he or she could "catch their ship" in time for the trip. I fell this would make oblivion a little more realistic. I meen really, what kind of captin would just let his ship stay at one port? The ships need to sail!!

--Thanks
-MNPred
User avatar
Lisha Boo
 
Posts: 3378
Joined: Fri Aug 18, 2006 2:56 pm

Post » Mon Mar 14, 2011 5:52 pm

Dose no one know how to do this?
User avatar
Barbequtie
 
Posts: 3410
Joined: Mon Jun 19, 2006 11:34 pm

Post » Tue Mar 15, 2011 12:04 am

I've never tried it but I think the problem is it is a lot more complex than it sounds - for example when the ship moves the collision doesn't (at least not reliably) and during the time it takes to update the collision things (Like your NPC) fall through it - as well as having to deal with any item that was dropped as the ship was moving (how would they be tracked so they are moved along with the ship and not just stay where dropped) - also if you go inside the ship's cabin and come back out on deck the door will lead to the original position of the ship and the ship may no longer be there. Then there is trying to track the course it would take and handling running into any objects along the way and dealing with how to handle that and many many other things that come up.
User avatar
Siobhan Thompson
 
Posts: 3443
Joined: Sun Nov 12, 2006 10:40 am

Post » Tue Mar 15, 2011 1:48 am

The best way to do it is using SetPos and SetAngle (if you are not familiar with these functions, anolyze http://www.gamesas.com/index.php?/topic/632323-reqwip-modfood-snippets-tips/page__view__findpost__p__13319870)


I have an unfinished mod that does that (http://www.youtube.com/watch?v=XnazYdsRgWc).
I can tell you will need a lot of math do move the ship smooth and naturally.
You will also have to deal with the issues JDFan mentioned.

There is some code to move a ship along a predetermined path in the first prototype of my The Evolving Society. It is among my "http://www.tesnexus.com/downloads/file.php?id=20878". Check the file "QQUIX - The Evolving Society Engine Test Environment - Alpha v0_01"
User avatar
Kayleigh Mcneil
 
Posts: 3352
Joined: Thu Jun 29, 2006 7:32 am

Post » Tue Mar 15, 2011 2:44 am

Wow! No wonder I was not able to do this! It is so complex! Sounds intresting though, I will see if I can manage it. LOL my first attempt involved merging the rat.nif with my ship.nif and then making it a creature with a patrole route to travale. :blush:

Thanks for the detaled replies!


--Thanks all!!
-MNPred
User avatar
Matt Bee
 
Posts: 3441
Joined: Tue Jul 10, 2007 5:32 am

Post » Mon Mar 14, 2011 10:09 pm

http://cs.elderscrolls.com/constwiki/index.php/Scripted_Linear_Movement tutorial might help. If you set up a string of these activators that the ship would follow and move it from one to the other, checking distance and changing target when you get close enough, it might be possible, but just one ship would take ages to script.

EDIT: wait a minute, you mentioned a rat! It may well be possible to use a creature with AI that you could continually move your ship to. I might have to think about this, but imagine if you could make a slaughterfish which the ship is repeatedly placed at... It would be much easier.
User avatar
Megan Stabler
 
Posts: 3420
Joined: Mon Sep 18, 2006 2:03 pm

Post » Mon Mar 14, 2011 3:43 pm

Getting totally outside the box, wouldn't it be possible for a ship to BE a creature? All animations are the null static pose. The skeleton consists of just one bone to provide orientation for the whole ship. Mark it essential so it doesn't die, and don't mark it evil, or the guards will attack it when it docks.
User avatar
Anne marie
 
Posts: 3454
Joined: Tue Jul 11, 2006 1:05 pm

Post » Mon Mar 14, 2011 7:22 pm

Getting totally outside the box, wouldn't it be possible for a ship to BE a creature? All animations are the null static pose. The skeleton consists of just one bone to provide orientation for the whole ship. Mark it essential so it doesn't die, and don't mark it evil, or the guards will attack it when it docks.

It might be a bit odd that you could hit a ship and see its health decrease, but it's an interesting thought.
User avatar
laila hassan
 
Posts: 3476
Joined: Mon Oct 09, 2006 2:53 pm

Post » Mon Mar 14, 2011 8:13 pm

creatures can't have doors. I think using moveto and setangle z on the boat to follow a slaughterfish would be best, assuming you could keep the fish on the surface or set the ship's height with every check too.
User avatar
Claudz
 
Posts: 3484
Joined: Thu Sep 07, 2006 5:33 am

Post » Mon Mar 14, 2011 1:25 pm

creatures can't have doors. I think using moveto and setangle z on the boat to follow a slaughterfish would be best, assuming you could keep the fish on the surface or set the ship's height with every check too.

Or you could move the doors to the living ship. But really it would be easier to use a fish to prevent strange behavior from the boat. It might be an interesting experiment though.
User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am

Post » Mon Mar 14, 2011 7:22 pm

Ha ha ha! With a rats run cycle but replace it's body as a boat! just imagine seeing the boat leaping with each "step" just like a rat does. Oh that would be halarious!
User avatar
Vincent Joe
 
Posts: 3370
Joined: Wed Sep 26, 2007 1:13 pm

Post » Mon Mar 14, 2011 4:40 pm

The slaughterfish would probably have to be giant so it cant go too close to the land or in shallow water, so the ship doesn't clip with its surroundings. The fish could have 100% chameleon and SetGhost so it can't die, and SetDestroyed too, if that wouldn't mess up its AI processing. I just don't know how all of the ship parts would stay alligned as they moved, unless you turned them all into one model in nifskope or used a custom model.
User avatar
Brιonα Renae
 
Posts: 3430
Joined: Mon Oct 22, 2007 3:10 am


Return to IV - Oblivion