Author Topic: Stationary Machine Gun  (Read 5108 times)

This is easy to do
with or without v9
Feed me models and I will discharge your turret.

Sadly its actually quite tough to make it work right. The turret part would actually have to be a player meaning you then need to work out how you're going to make the turret point at where the player is looking. Good luck.

Tri

(Turret + Seat) + Mounted Player = Turret + Player Vehicle = Rotational Turret
Turret + Player Vehicle = Rotational Turret
Rotational Turret + 0 or so Vehicle Speed = Stationary Turret
Stationary Turret + Player with a "blank" weapon mounted = Stationary Turret w/ Firing
Stationary Turret w/ Firing + Turret "Base" (stand) = Complete Stationary Turret w/ Firing

"Yay!"

Make a player type with no movement, custom model which looks like the top of a turret and a "look" animation for up and down. Mount this to a static base and give players control of this when they use the turret. Add some trigger codes for firing.

Quote
Feed me models and I will discharge your turret.

I need:
- Player Base Model for a turret mounted to a round base and a seat + control set behind it (mount0 = End of barrel; mount1 on the seat; mountPoint = Feet)
- DSQ animations for "look" (looking up 90 degrees) and "root" (doing nothing)
- Turret base that covers an 8x8 vehicle spawn and maybe a slot for the turret to go in (also a mount in this or on top of the platform)
« Last Edit: May 15, 2008, 01:17:41 PM by Space Guy »

(Turret + Seat) + Mounted Player = Turret + Player Vehicle = Rotational Turret
Turret + Player Vehicle = Rotational Turret
Rotational Turret + 0 or so Vehicle Speed = Stationary Turret
Stationary Turret + Player with a "blank" weapon mounted = Stationary Turret w/ Firing
Stationary Turret w/ Firing + Turret "Base" (stand) = Complete Stationary Turret w/ Firing

"Yay!"
This takes the phrase Easier said than done to a whole new level.

Its the animation part that gets you. As far as I know, only Badspot and myself even know how to make DSQ files, despite how easy it is - I have yet to see anyone else manage it. Plus the look animation is one of the most fiddly player animations that has to be done.

Isn't there tutorials and things on the Torque website? I don't know, I'm not a modeller. I think a script would be relatively simple. (an hour or two, no guarantees)

Yeah, I'm saying the model part of the look animation is a pain in the ass (and to get that right with the player min/maxLookAngles). There are very basic tutorials on TDN which the majority of you don't have access to.

The script part is pie.

Exactly how many frames long does the look animation need to be?

30 frames at 30fps, going from +90 to -90, I think.

http://www.garagegames.com/docs/tge/general/ch07s08.php
Quote
simpleBox Animation Setup

Now that simpleBox is animated and the DTS hierarchy is setup, the shape needs to be prepared for exporting animations.

There are two methods for doing this:

The first method is to create multiple sequence nodes in the Maya scene file, name each sequence accordingly, and set the start and end frames to match the frames during which each animation occurs. Then, the entire scene can be exported as a single DTS file. This method is fairly simple, but it does not allow for customization of export options for each individual sequence.

The second method is to save each of the animations as individual Maya scene files. Each Maya file with animation will have a single sequence node corresponding with the desired animation. The Maya file with the base shape will contain all of the meshes and nodes but will not have any sequence nodes. Each file will be exported individually: the base shape will be exported as a DTS file, and the animations will each be exported as DSQ files. All of the files will then be merged together in the engine using a .CS script file.

This method is obviously more complex, but it does allow for a greater degree of customization. For example, you could create a character's upper body motions (e.g. aim, look, shoot, etc.) and lower body motions (e.g. walk, run, sidestep, etc.) as separate Maya scene files. Then you could use a configuration (.CFG) file to specify exactly which nodes export for each DSQ file. These DSQs can then be played back on separate threads in the engine and combined to create a wide variety of movement combinations. You can read more on configuration files, threads, and sequences in the Maya2DTS General Reference.

This tutorial will use the second method. You will create and export separate DTS and DSQ files, create a .CS script, and then view the animations in the ShowTool. Configuration files will not be used for this tutorial. Consult the Maya2DTS General Reference for more information.

Because simplyBox is already animated, continue working with mySimpleBox.mb from the previous section.

   1.

      Examine the animations closely and take note of the frames on which each motion begins and ends.

Code: [Select]
      Table 7.1.
      Animation startFrame endFrame
      bend side to side 0 60
      jump forward 61 80
      look right to left 91 120
      jump up 130 150
      bend front and back 150 170
      bend front and back 175 210

      Because all of the animations were created in the same file, there are some "transition" frames that may look odd. Those frames can be ignored.
   2. Create a sequence node named Sequence_bendSide.
   3. Set startFrame to 0 and endFrame to 60
   4.

      Save the Maya scene file as mySimpleBox_bendSide.mb.

      Since the sequence node has already been created, and there should be only one sequence node per animation file, simply rename the existing sequence node and adjust the start and end frames.
   5. Rename Sequence_bendSide to Sequence_jumpForward.
   6. Change startFrame to 61 and endFrame to 80.
   7. Save the Maya scene file as mySimpleBox_jumpForward.mb.
   8.

      Repeat the previous steps for the remaining animations. You may use the following settings:

Code: [Select]
      Table 7.2.
      Maya file name Sequence name startFrame endFrame
      mySimpleBox_bendSide.mb Sequence_bendSide 0 60
      mySimpleBox_jumpForward.mb Sequence_jumpForward 61 80
      mySimpleBox_look.mb Sequence_look 91 120
      mySimpleBox_jumpUp.mb Sequence_jumpUp 130 150
      mySimpleBox_bendFrontBack.mb Sequence_bendFrontBack 150 170
      mySimpleBox_fallBack.mb Sequence_fallBack 175 210

As you work through the files, make sure that there is only one sequence node per Maya file. Also make sure that you do not change the DTS hierarchy.
Might help?

Tri

I really don't think this requires animation.  Look at the horse, it is a vehicle that rotates as the player looks around.  What my previous post means is to take that same element, use it with the turret + seat, restrict motion, and mount a blank weapon image to the player which will act as the turret.  Then mount the whole vehicle itself onto a stand or base to rotate off of a joint.  When I get to my house tonight, I will draw up a picture and post it.

actually i think thats a animation.....

Tri

Its rotation I believe.

i mean the up/down part

Tri

I am sure it is all rotation.