Jump to content
Sign in to follow this  
Bbartram

One unit carrying another in MP - possible?

Recommended Posts

I want to be able to have one player be able to carry another wounded player. I have created the pose for the "carried" unit in OfpAnim, and I have a way to attach an object to another object (a tow script for vehicles).

I need to know if there's a way to turn off collision on the "carried" model somehow. Remember this is a player, so swapping models (deleteVehicle then recreate or similar) will likely screw up the carried player's viewpoint.

Any tips on how to proceed from the OpFlash Sages?

Muchos Gracias,

B

Share this post


Link to post
Share on other sites

You could temporarily move the wounded unit way off the map and then place a substitute there in his place with no Geometry LOD. Even just an object that was crafted to look like a soldier would do this well enough. Then run a camera script on the client (assuming the wounded soldier is the client) machine with the camera pointing backwards behind the carrier and pointing towards the ground. Easily done with a camsetrelpos command targetted at a game logic unit which follows the carrier on the ground. If you're really clever you could script a bounce effect using a time update loop to make the camsetrelpos offset magnitude oscillate. If I've got some time (unlikely) I might have a go at this myself.

As for AI units not firing on the carried 'object' you might be able to get around this somehow by making the object from an infantry class of the relevant side but make sure it has no Geometry LOD, just a Fire Geometry LOD. Wouldn't cause any collisions and the AI would still shoot at it. When ready to unload the casualty simply delete the dummy unit and swap him for your real guy using a setpos command back to where you want him.

Note you may experience some issues in mp with camera scripts, make sure it only executes on the right machine.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×