Jump to content

Animation problem with gear.


Recommended Posts

Without looking at the script I can't tell. I know what you're doing with the script, roughly, because it's what I do with my Dwemer transporters and lifts. My script may be different to yours and may work better? I just used Darkfox127's script and left the remark in that credited him, as he wanted.

 

It looks like the script is still using the original object for the next step, rather than swapping from one movable static to the other.

 

I love what you are trying to do, btw! Sweet!

 

If you use the same object twice on the vertical 'pole/gear rack' but have one object there rotated about the correct axis, 180 degrees, it will look right. Then there is no need for any other gears to be in the cell. It simplifies things and I like simple. I mean that I don't think the gears to the left are needed at all. You only need 2 gears, next to the pole, one at the bottom and one at the top. They can even be the same item, if you rotate them around the correct axis. You just enable one and make the other disabled at any time the player pulls the lever. Only one is ever visible. I think you may have done this already but I couldn't work it out from the vid.

 

You could then add a script to the lever that enabled one and disabled the other, when the first gear has travelled to the top. So use event 'OnActivate' and use 'RegisterForSingleUpdate(MyFloatTime)'. In the Event 'OnUpdate', disable the one that moved first (The bottom one) with no fade and enable the one you want to move next (The top one), again with 'no fade', so that they swap instantly, then translate that reference. The script on the lever will have states for each item you want to enable, disable and translate. Maybe you did this too.

 

Ie Auto State waiting, holds the instruction to activate the gear for the first movement. At the end of this state, you tell the script to go to 'MyNextTranslateState'. In this state you handle moving the top gear down to the bottom again. You can just keep adding states for any gears you want to move.

 

I take it these are the gears that can be activated to make them start and stop spinning?

 

Does this make any sense?

 

Edit: just a thought, if you add more levers, You can have a lever that is move gears up, move gears down, etc. The other levers are just dummy items that get swapped for the real ones each time the player uses the lever before. So Lever 1 is dedicated to moving the first stage gear up. When it is done after a timer, it swaps the next lever for the working one and that lever just handles the next move

Link to comment
Share on other sites

TranslateRef.TranslateTo(PosX1, PosY1, posZ1, RotX1, RotY1, RotZ1, SpeedVal, RotationVal)


RotationVal is zero because the object does not rotate when translating


First sentence of my post "I've made a video explaining the issue I have, it has descriptions."

Edited by antstubell
Link to comment
Share on other sites

It might seem simplistic and stupid (I get that way from time to time), but if instead of making the second gear one that is rotated, have you tried just putting the gear in that has the 'wrong' rotation?

 

If there's something going on when you translate it that reverses the rotation, maybe it will reverse the rotation of the 'wrong' one, so that it looks right?

Link to comment
Share on other sites

Simple was the answer. Took me an hour to work out but a combination of a property not filled and adding another global variable (both gears were checking the same global for translated state) fixed it.

Thanks for your patience. My Bad.

Link to comment
Share on other sites

Not at all. Just glad you sorted it. It's going to look really good. I take it you just need a few more movable statics and get them synchronised with the gear translations... just!

 

I spent almost 2 days trying to find out why a quest wouldn't start a week or so back... it turned out that I'd assigned the same reference to 2 of my 8 Falmer actor aliases. Neither were flagged as 'allow reuse in quest', because they shouldn't have needed the flag.

 

The answer was staring me in the face all the time. I'd even given them all unique IDs FalmerA through to FalmerH. 2 were set to FalmerH and poor old FalmerE never got a look-in! It took me so long to spot because unless you drag out the fields in the quest alias tab, the end of the ID is cut off. I just remembered trying to be ever so careful when I assigned their aliases... not careful enough, obviously! I corrected that and off we go!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...