Moving (animate) multiple objects as 1

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
DarkHelmet

Moving (animate) multiple objects as 1

Post by DarkHelmet »

Hi all

I'm new at GT.
< off topic > Well... I've been here for 2.5 months as an unregistered guest but now it's time to sign up. < /off topic >

I have a question.
I'm making a spacemap where the rebel fleet is stationary on 1 side of the map and the empire fleet is moving in to attack.

For now the attacking fleet has 4 frigates (going to add more later).
I've created an animation so the frigates move towards the rebel fleet and arrive after a certain time.

The problem:
The default empire frigate (spa1_prop_minidestroyer2.odf) has no autoturrets.
Placing the turrets is not a problem. But the turrets won't move with the ship automatically (obviously).

Is there a way to move the turrets with the ship?

Creating a separate animation for the turrets is not an option because:
1. the turrets will continue to move even when the ship is destroyed;
2. the ships maneuvre to strategic positions when arriving so it's very difficult the create an accurate path for the turrets.

I couldn't find an option to animate a group object or a multi selection.

If any1 knows a way.....


Thanks,
Marvin
OGEB1103

RE: Moving (animate) multiple objects as 1

Post by OGEB1103 »

Yeah before you go into animation mode use Multi-select (undernealth Select and Place) to select objects as one, then you might be able to animate them as one thing.
DarkHelmet

Post by DarkHelmet »

Thanks for replying.

But... the option Anim Mode isn't there when Multi Select is active.
only when Select or Place is selected.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Post by [RDH]Zerted »

You can group the turret animations with the ship animation, then call them as a single animation. Read the animation guide.

If the ship gets destroyed, you can always code the turrets to blow up too.

If you want to see examples of some animations, I'll be releasing the second version of the elevator map late tonight (EST).
PvtParts
Jedi
Jedi
Posts: 1001
Joined: Mon Apr 03, 2006 9:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: plundering yer booty

Post by PvtParts »

i dont think its possible. normally there are ways around things like this, but to be honest i think this is one of those things you just cant do.

unless of course you gave each turret the same animation as the assault cruiser, but that would take loads of time...

or you could make the turrets already there, and have the imperial cruiser fly and stop under the turrets - if it happened quick enough you might not notice, but it would make animating pointless, so in this situation i'd just leave them there.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Post by [RDH]Zerted »

All you need to do is create the animation that moves the ship. Next, create a group animation. Using the first animation, add it to the group animation along with the objects you want it to move (ship and turrets). Last, run the animation from the Lua, or set it to start with your map. Its easy.

You can use a single animation to move everything, but you have to make sure all the objects are facing the same direction.
DarkHelmet

Post by DarkHelmet »

All you need to do is create the animation that moves the ship. Next, create a group animation. Using the first animation, add it to the group animation along with the objects you want it to move (ship and turrets)....
I tried that. It works if
1 the ship only moves in the x/z plane and not moves upwards
2 there is only 1 turret. And it's center needs to be exactly alligned with the ships center.
3 ship only flies a straight line. Then I can add anything anywhere I want.

In a group each animation path is copied and ajusted to the location and allignment of each object.

My ships also fly upwards. During the "climb" the turrets move to the inside of the ship a bit and come out again when the ship is level again.
Not very handy when the ship is at the same time firing. It would be firing at itself.
I guess for now I'll have to keep the ships in the x/z plane and with 1 turret.

I was also planning an extra isd to move in. That 1 will have to fly a straight line.

I'll post a couple of screendumps later.
Post Reply