Log in

View Full Version : Statemachine and cameras


Darkbluesky
05-26-10, 06:38 AM
Hello

I am stuck in the middle of my mod trying to solve an issue with statemachine controlers.

What I am trying to do is to make an animation of a 3D object (until here ok thanks to Anvart explanations in the forums and other modders' work) but at some point of the animation, I need that the camera change to another station automatically.

I guess it is possible, because in the game there is a "similar" situation: when you are in the conningdeck and order periscope depth, at some depth value the camera is changed automatically to Conning tower, I guess this is done using a statemachine approach, with a couple conditions, first to check if you are in conningdeck/flak gun/deck gun, and the second one, if depth is greater than some value. But which is the "action" that makes the camera to change station?

I have searched sh3.exe and statemachine files with an HEX editor, but unless I have missed something, I have not found any string that hints that. I have checked the dat files in library folder, but I have not found neither a clue.

I really need to do that... Have I missed some file? Could someone please, help me? even a little :DL? A hint? Tx

h.sie
05-26-10, 07:29 AM
Surely I'm totally wrong with this, but in Commands_en.cfg I've found camera entries assigned to some commands and, if I remember correctly, something like GO_BACK-camera entries. (out of my memory - I'm not at home).

Darkbluesky
05-26-10, 07:42 AM
Hey, thanks for answer!

I know that command, but then that would mean that we could use any command in the "Name" field of Conditions/Actions/Name of the StateMachineClass (and leave empty the "Value" field)?

For example, instead of PlayAnim or StopAnim? I didn't know that. When I get home I'll try, if it works, you'll make me happy :D

Tx

Darkbluesky
05-26-10, 01:03 PM
Tested but it does not work :cry:. I have tested different combinations of "Name" and "value" fields, but without luck.

I wonder still how is it done for the case described in my first post.