Game Development Community

Object Inheritence

by Cyberkada · in Torque Game Engine · 01/25/2010 (6:50 am) · 4 replies

I have implemented the turret resource and it works great in TGEA 1.0.3. It tracks and fires at enemy ships as it should. I do want to inherit energy from the mount it is attached to. The built-in inheritEnergyFrom Mount does not seem to work. I kludged in the mountpoint by adding to the turret datablock.

Edit: Maybe I'm asking the wrong question. Question I should be asking is:
Is there a built-in function to get the parent object a turret or whatever (shapebase-derived) child object is attached to. Only things I see in searching is for TGB.

#1
01/26/2010 (7:20 am)
Code-side, you can access mMount.object. Try doing a 'find all references' on that and see if any console methods expose it - there should be one, but I can't think of it right now.
#2
01/26/2010 (10:23 am)
well it was in ShapeBase... now to make a couple of console methods and test...

Edit: couldn't get that to work, so I extended the turret class datablock to hold the mountpoint and the parent. Works now, and takes energy from the parent mountpoint.
#3
02/22/2010 (2:23 pm)
Cyberkada, please I have to speak with you.
Please read the last message of your own post, and answer me there if you want:

http://www.torquepowered.com/community/blogs/view/14616


Thanks =)

Emi.*-
#4
02/22/2010 (8:14 pm)
Turrets work great now... extended them further to add data and console functions instead of the TorqueScript.... selectable manual/ auto-targeting (AI is always auto-target).