Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: TrashMan on November 08, 2007, 01:54:03 pm
-
Allsmot done...all lods are complete (more or less...damn mapping.. there's allways 1 or two tiny faces that get away, and then you have t do it all over....gah!)
(http://img155.imageshack.us/img155/2977/galaxytestqu9.th.png) (http://img155.imageshack.us/my.php?image=galaxytestqu9.png)
I jsut have to make debris and then it is finished. ;)
-
Cool. This is the one with the internal fighterbays, right?
-
Yay he is close to finish!
-
Now if only someone can give me instructions on how to make those doors open when launching fighters...
-
http://www.hard-light.net/wiki/index.php/Animation_Code
-
Hrk...I'm having trouble wrapping my head around this one..too tired to think dammit.
Le'ts se..
I got 2 doors on fighterbay 1 (tehy open up, left towards left, right towards right)
fighterbay 2 has one big door that goes donw
fighterbay 3 is hte same as 1.
So:
$Subsystem: door1_1, 5,0.0
$animation: triggered
$type: door
+relative_angle: 90,0,0
????
Ugh..I don't want it to rotate, just move to the right by 40 meters or so...gah. :hopping:
:blah:
:blah:
:blah:
-
you want the doors to slide open like on aircraft hangers right?
the animation code doesn't support that kind of movement it only rotates objects. BUT...there is a way to cheat i think. i have not tried this myself yet.
ok, everything pivots and rotates on its axis... so what you do is set the axis way off of the submodel model, so when it rotates, it will look like it is sliding. you'll have to use your modeling program (or TS if you use it to set up the hirarachy), and play with the rotation values to figure out how much of an angle to rotate an object by in in the table. the pic is there to illustrate.
i hope this helps if this effect is what you were aiming for.
(http://i67.photobucket.com/albums/h308/t64smyhotrod/knowhow.jpg)
-
Drat. Double drat...Tripple drat! :hopping:
This messes everythng up...damn.. I guess I'll make those doos rather static for hte moment then..untill we get support for actualy movement that is...
-
Dude, what are you doing getting it into pof stages before you know how you're going to handle something like this? :p
The best way to do sliding is to use 2 separate extra subobjects - basically just invisible rectangular prisms, each one exactly half the length of the distance you want the object to slide. You then arrange them like this:
/\__ (with the bars being the / and \, and the __ being the door or whatever you want to slide.) The door is the child of the bar that touches it, and then that bar is a child of the second bar which is a child of the ship hull. Each one is then a rotating subobject that can be animated to slide using only rotations.
In the model, you have their default position fully extended - so the doors would be closed in the pof. Set each animated subobject up in the pof as a 'rotating' along any axis, and in the properties field put
$special=subsystem
$triggered:
In the ships table, you would then have something like:
$Subsystem: Door1, 5,0.0
$animation: triggered
$type: door
+reverse_delay: 1000 ;;Time until door closes again
+relative_angle: 90,0,0 ;;How far the door should rotate relative to its parent
+velocity: 10,0,0 ;;How fast it's max speed should be while rotating
+acceleration: 5,0,0 ;;How fast it gets to that max speed
+time: 1700 ;;How long until the game will say the animation is complete
$Subsystem: Door1BarA, 5,0.0
$animation: triggered
$type: door
+reverse_delay: 1000 ;;Time until door closes again
+relative_angle: -90,0,0 ;;How far the door should rotate relative to its parent
+velocity: 10,0,0 ;;How fast it's max speed should be while rotating
+acceleration: 5,0,0 ;;How fast it gets to that max speed
+time: 1700 ;;How long until the game will say the animation is complete
$Subsystem: Door1BarB, 5,0.0
$animation: triggered
$type: door
+reverse_delay: 1000 ;;Time until door closes again
+relative_angle: 90,0,0 ;;How far the door should rotate relative to its parent
+velocity: 10,0,0 ;;How fast it's max speed should be while rotating
+acceleration: 5,0,0 ;;How fast it gets to that max speed
+time: 1700 ;;How long until the game will say the animation is complete
This would make the setup go from this: _ _ __ to this: /\__ to this: |__ and back again after 10 seconds <- the doors open and then close.
-
I get it...but for all the doors I'd need 20 sub-objects...complicates stuff. Sounds like a lot of hussle for a minor gain.
No thank, you.. I'll just have the doors opened by default.
Since I have the treuspace scene before conversion saved, It's no problem adding changed later, once REAL sliding becomes possigle (I'm looking at you code wizzards - make our life easier)
-
Ok, well in that case use the method Steve-O described. It will result in a jerkier and less finely controlled animation but it will work.
Failing that you can do it via scripting. I don't have any examples of that on hand, but it can be done. Look for WMCoolmons demonstration, though the code used in it has long since changed syntax significantly.
I may be wrong, (and hope I am) but I really doubt subobject translation is going to happen any time soon, so don't hold your breath.
And actually, what would be wrong with animating your doors using only rotations anyway? Do they _have_ to slide?
-
And actually, what would be wrong with animating your doors using only rotations anyway? Do they _have_ to slide?
Yes, the hangarbay and doors are made that way.
When's the last time you've seen a hangarbay door in sci-fi open like a normal house door? They either slide up, down or to the sides.
-
I meant that they can still do this: __ __ -> /\ /\ -> | |
But failing that, just do as Steve-O suggests.
-
I jsut left the doors 2/3 of the way open. The ship works in the game.
I had some trouble with debris so I'm re-using the old debris, but with some tweaks for now.
Also, red glows seem to be missing and the bounding box when you select the ship seems to encompass just the front door???? :wtf: