Game Development Community

Mounting anything - making characters pick thing up

by Andy Hawkins · in Torque Game Engine · 06/11/2008 (3:57 pm) · 3 replies

I want to make my AI players pick up things like boxes and carry them around. How do I do this? Am I supposed to make all my pick-up-able things weapons so they can be mounted or is there another method?

#1
06/12/2008 (2:37 am)
Well, If you just have a bunch of staticshapes lying about, you could have a callback for collision, check whether the colliding object is an AIPlayer (who is allowed to hold boxes) and then ai.mountObject(box,slot)

The problem you may have is offsets for larger/smaller objects from the mount node. I've made a cool mod to the mountObject code which allows you to specify a mount offset XYZ and rotation, however I'll need to put that into a resource at some point since it's scattered around the engine currently.
#2
06/12/2008 (6:18 am)
Thanks Nick - I only plan for them to pickup specific objects so I should be able to control the mount points.
#3
06/18/2008 (10:59 pm)
IMHO what you seek is just across the street here in the forum. Platforms Players can Ride Version 1.1. Just tweak the code a bit to make the AIPlayer as the parent of the mounted object.