Game Development Community

Turret & AITurret classes, Version 1.20 for TGEA 1.8.1

by kcpdad · 06/03/2009 (3:05 am) · 13 comments

Credits - To those that did the heavy lifting
This was tested with the TGEA Stronghold game example.

Click to Download

Instructions

**** MOST IMPORTANT **** -> Make a backup of your existing TGEA 1.8.1 installation!!!
Merge changes from the zip file into your TGEA 1.8.1 installation.
Add a new filter/folder called turrets to your project under T3D.
Add the two .cpp files(turret.cpp and aiTurret.cpp) as existing items to the filter/folder you just added.
Rebuild the engine.
Read the original Readme.txt for instructions on adding turrets to a mission.

Gotchas

If you add a turret to a mission, use the mission editor to set the value of the dynamic field "locked" to either true or false.
Otherwise the engine will crash if you execute a dump() method on the turret object in the console.

#1
06/03/2009 (9:11 am)
Thank you.
#2
06/03/2009 (9:40 am)
just some minor changes(5X "ShapeBase*" to "SceneObject*" in turret.cpp, and remove the "void unmount();" from turret.h ) and it works in T3D.
#3
06/03/2009 (3:30 pm)
Very nice, I appreciate the update, also thank you to the orginal developers too!
#4
06/04/2009 (11:40 am)
Nice, thx.
#5
06/16/2009 (5:50 pm)
hmmm... I get an error when compiling the aiTurret class..
"no matching function for call to 'AITurret::getAnglesFromAimLocation(Point3F&, Point3F, F2&, F32&)"
Any ideas?
#6
08/07/2009 (4:27 am)
this is not an error in objectypes.h, two BIT(27) ?:

// phdana turrets ->
   TurretObjectType =            BIT(27),
   // <- phdana turrets
   /// @}

   /// @name Other
   /// The following are allowed types that can be set on datablocks for static shapes
   /// @{

   ///
   DamagableItemObjectType =     BIT(27),
   /// @}

   ShadowCasterObjectType =	BIT(28)
};
#7
08/08/2009 (3:48 am)
¿tips for fixing the choppy movement?
#8
08/12/2009 (12:06 am)
I have another issue that I want to see if any of you have had so I can tell if it is my own modifications causing this or this code.

If you have an AITurret on a map and try to throw an object (It doesn't matter what) it will just float and gradually raise into the sky.

Take out the AITurret and even use a regular turret and no problem.

I would really like to know if anyone else sees this.
#9
08/23/2009 (3:48 am)
At this moment i have another issue, i have the teams implementation, and only 1 aiturrent works with several aiturrets, i tried many things without lucky..., i am thinking make my own aiturrent from aiplayer...
#10
08/23/2009 (10:59 am)
I did find the source of my issue and it is stock to TGEA 1.81. I have submitted my findings and a temporary solution here:

www.garagegames.com/community/forums/viewthread/100221
#11
08/29/2009 (10:15 am)
hello everybody, i'm trying to implement this resource in T3D and on my game.cs i put the code:
%obj.mountImage( smallTurretGun, 0);
to mount the barrel on the turret, and it doesn't do it and shows an error
"unable to instanciate non-conobject class turret data"

thanks in advance.
#12
09/03/2009 (8:17 am)
deepscratch, you make it work in T3D????? and what changes do you make, because i'm having some problems if you can help me???Thanks
#13
09/07/2009 (7:09 am)
everything is fine now i got it working outstanding resource thanks for the help.