[Req]SetPos example

Post » Tue Oct 20, 2009 4:55 am

I literally just got the CS last night and I'm trucking right along with my Imperial Sewer tweaks, but now I need "scripture" clarity :laugh: .
I figured there was such a function to move a static object and there is, as the wiki showed me SetPos, but I just don't understand in what 'language'
it has to operate. I'm imagining at some point the object ID is referred to as well as the x, y, z coordinates + rotation, on activation... but how :P

Doubt this helps but this is the grate I wanna move - http://i20.photobucket.com/albums/b206/Dastwi/stf.jpg
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Tue Oct 20, 2009 1:28 am

SetPos is just going to reposition an item to a new place. It appears that you're really trying to animate an object, which is a different operation entirely - scripting would not be a good way to try to do it.

If it's just a simple rotation you may be able to add it to the mesh in NifSkope (http://cs.elderscrolls.com/constwiki/index.php/Basic_Animation_Tutorial) and then invoke the rotation with PlayGroup
User avatar
Bek Rideout
 
Posts: 3401
Joined: Fri Mar 02, 2007 7:00 pm

Post » Mon Oct 19, 2009 11:11 pm

SetPos is just going to reposition an item to a new place. It appears that you're really trying to animate an object, which is a different operation entirely - scripting would not be a good way to try to do it.


No, I understand it won't be animated, I just want it to go from where it is, to propped up against the wall. I figured I'd do a message box asking if you wish to move it, then (to lack of immersion) it would appear leaning against the wall. Plus I'm sure with all the sliding metal sounds in the game I can come up with at least a sound effect to compliment it, I just need to know how to get it to move.

Your edit doesn't help either, I'm not requesting an animation. The word animate, in any form was not present in this post until you replied. I am trying to move it & rotate it ("x, y, z coordinates + rotation") through a script, not the Grab key or an animation. I understand the object is static, hence why I want to accomplish this task this way
User avatar
Marina Leigh
 
Posts: 3339
Joined: Wed Jun 21, 2006 7:59 pm

Post » Mon Oct 19, 2009 3:14 pm

Easiest way to do it is to open up that area in the Construction set, place a second copy of the grate leaning against the wall. Set it to initially disabled, make the other grate the parent to it, set the enable state to opposite of parent. Then, in your script instead of moving the grate, you disable it and the second one will be enabled, making it appear as if it was moved.

Add a script to the second grate that does essentially the same thing, and the player will be able to put it back.

If you need to actually move it with setpos, then still place the second grate, double click on each of the two grates and write down the x, y, z, rot information for each one.

Then you can use the setpos command to move the grate to either set of coordinates. You'll have to disable and then enable it again to make the graphics update.

I don't see any point in actually moving it though.
User avatar
Jason White
 
Posts: 3531
Joined: Fri Jul 27, 2007 12:54 pm

Post » Mon Oct 19, 2009 7:54 pm

Easiest way to do it is to open up that area in the Construction set, place a second copy of the grate leaning against the wall. Set it to initially disabled, make the other grate the parent to it, set the enable state to opposite of parent. Then, in your script instead of moving the grate, you disable it and the second one will be enabled, making it appear as if it was moved.

Add a script to the second grate that does essentially the same thing, and the player will be able to put it back.

If you need to actually move it with setpos, then still place the second grate, double click on each of the two grates and write down the x, y, z, rot information for each one.

Then you can use the setpos command to move the grate to either set of coordinates. You'll have to disable and then enable it again to make the graphics update.

I don't see any point in actually moving it though.



Thank you very much showler, I couldn't have asked for more haha. That explanation makes more sense than SetPos. As to why you don't see any point in it being moved (or "Houdini'd"); the archway you can see in the picture is going to have an un-open-able gate blocking it, with the only way around being to "crawl" (ie activate a small door underneath that pops you up in the other side) through Imperial City waste :P
User avatar
Amber Ably
 
Posts: 3372
Joined: Wed Aug 29, 2007 4:39 pm

Post » Mon Oct 19, 2009 1:43 pm

No, I just meant that the enable/disable function, especially with the "opposite state of parent" function is the main method of simulating something being moved. Actually moving the mesh is more difficult, and can produce less desirable results.

You should try and make people actually crawl through it, though, if you can :)
User avatar
Leilene Nessel
 
Posts: 3428
Joined: Sun Apr 15, 2007 2:11 am


Return to IV - Oblivion