• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

can collision objects work with animations?

Started by TheJamsh, November 30, 2008, 01:23:42 PM

Previous topic - Next topic

TheJamsh

basically, im trying to get a drop-ship (take the ISDF one for example)

i want it too swoop in from the distance, hover and shudder while opening its doors about 35 metres above ground, wait for five seconds, then close them and fly forward and out again

obviously i need its collision frame to follow the animation, AND i need to be able to get into the dropship when its open as well. is this possible?


BZII Expansion Pack Development Leader. Coming Soon.

mrtwosheds

#1
The single player dropships work by having the dll switch models, one flys in and lands, it is replaced by a solid one(building like), when this has served its purpose it is replaced by one that then takes off again.

Animations do not collide.



TheJamsh

well its not an animation, would still be a building, not a ship, with a terrain plate.


BZII Expansion Pack Development Leader. Coming Soon.

mrtwosheds


Assuming that this is for single player use, you would need to alter the landed dropship to appear as if it is hovering, and both the other two to alter their positions.
If it is for multiplayer, you would need to build a whole new class of unit and probably mp dll too. Nobody has succeeded in doing this yet.

Void

.....its always been my dream to have a a workable dropship in multiplayer =(

Zero Angel

QuoteAwareness, Teamwork, Discipline
Constantly apply these principles, and you will succeed in a lot of things, especially BZ2 team strat.
{bac}Zero Angel
Victory through superior aggression

Nielk1

Quote from: Void on December 01, 2008, 10:41:08 AM
.....its always been my dream to have a a workable dropship in multiplayer =(

It can't be difficult, what is the issue?

The trick being the items inside don't spawn till it switches to stable collideable building mode.

If you wanted you could make one that is a unit, that deploys, any then detects any units inside, seamlessly moves them into a 'holding area' object somewhere off map or something, and then puts them back when it lands again elsewhere. You can even detect the human player in that bunch and for their camera for that of the dropship, or give them control of it! Also, if it dies, you can make the ships appear where it just was, or blow them up and place the pilots there, or kill everyone but the human pilot, or just plain kill everyone!

You have to be a C++ DLL programmer though.

Click on the image...

TheJamsh

can buildings be commanded to move using the 'moveobject' part of the .dll scriptor, or does it only work on vehicles?

anyway. this is for a single player mission. didnt want to go into details but apparently i must. you are being chased down a canyon, in the distance, the dropship flies in, then rotates its engines forward to stop, and then downwards to hover about 35 metres above the ground, in front a a ramped piece of terrain. The player has to use the terrain to land himself inside the dropships container. The dropship then moves forwards and upwards, closing the doors as it goes.

why cant i just use a building with one animation for this? (the dropship only has to stay hovering for 5 seconds and the animation can make it shudder and that. ill just use an extractor class with a deploy animation, controlled to deploy by .dll

the terrain plate can be a 4x4 plate, but im sure the dropship will be able to move outside the plates boundaries...



BZII Expansion Pack Development Leader. Coming Soon.

Nielk1

When I pass a vehicle's position matrix into a building it sometimes disappears :(

Click on the image...

OvermindDL1

Quote from: Nielk1 on December 02, 2008, 05:27:41 PM
When I pass a vehicle's position matrix into a building it sometimes disappears :(
That is because you are not normalizing it to the grid then.  BZ2 does not always know how to handle a building not placed perfectly normalized to the grid.  Found that out quite well with a map-mod I made a while back that had lots of dll controlled buildings.

Generated by OvermindDL1's Signature Auto-Add Script that OvermindDL1 did manually since Greasemonkey does not work in Firefox 3.1 yet...


Nielk1

How would I normalize it? That would be a great help. Also, what does it mean to normalize it? Will I still be able to pivot it at any angle?

Click on the image...

OvermindDL1

To normalize it means that you move the center of the building to the nearest center BZ2 building grid position, pivoting has nothing to do with that.

Generated by OvermindDL1's Signature Auto-Add Script that OvermindDL1 did manually since Greasemonkey does not work in Firefox 3.1 yet...


Nielk1

Won't that make the thing jump instead of smoothly move?

I asked about pivots because that is what was triggering the disappearance in some cases, and in others it was certain areas of the map. IE: look a certain direction at a certain elevation made the structure disappear (with that error message about defaulting to 0,0,0)

Click on the image...

OvermindDL1

As stated, BZ2 acts really odd if buildings are not placed on normalized grid points (and rotated on a 90degree axis)...

Generated by OvermindDL1's Signature Auto-Add Script that OvermindDL1 did manually since Greasemonkey does not work in Firefox 3.1 yet...


Avatar

Quote from: mrtwosheds on November 30, 2008, 03:25:26 PM
The single player dropships work by having the dll switch models, one flys in and lands, it is replaced by a solid one(building like), when this has served its purpose it is replaced by one that then takes off again.

Animations do not collide.

This is your correct answer...  although I'd say "Collisions can't animate."   :)

If it moves smoothly it's got to be a vehicle, meaning it has a box or bubble collision, meaning it can't 'open' and other ships can't get inside it.

Only a building can collide in that manner, IF they own terrain, meaning they can't move smoothly across the ground.  Collision objects/meshes of any kind can't animate or move.  You can move them if you want, but the collision is fixed when the object is created.  Anything that happens after that is ignored.

There are a few cutscenes in the SP missions where you can actually see ships enter a Dropship, then the dropship take off, at which point the ships 'inside' spill out through the mesh.

The solution to this is to have the DLL move the ships inside the 'Dropship' in the same manner as the dropship is moving, OR to have the DLL remove those ships when the Dropship takes off.  If you want a working Dropship you have to do the first, if it's just for looks in an SP mission it's easier to do the second.

Building collisions will drive you nuts if you insist on trying to make them more than they are.  Believe me, I know.

-Av-