mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
aitriggers a navtool. not ready for general consumption just yet
This commit is contained in:
parent
91ff953c19
commit
b160017c7d
|
|
@ -929,26 +929,3 @@ DefineEngineMethod( Trigger, getObject, S32, ( S32 index ),,
|
|||
else
|
||||
return object->getObject(U32(index))->getId();
|
||||
}
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(AITrigger);
|
||||
AITrigger::AITrigger()
|
||||
{
|
||||
for (S32 i = 0; i < AI_NAVCHOICES; i++)
|
||||
{
|
||||
mProbability[i] = 100 / AI_NAVCHOICES;
|
||||
mWaypoints[i] = StringTable->insert("-1");
|
||||
}
|
||||
};
|
||||
|
||||
AITrigger::~AITrigger()
|
||||
{
|
||||
};
|
||||
|
||||
void AITrigger::initPersistFields()
|
||||
{
|
||||
addField("waypoint", TypeString, Offset(mWaypoints, AITrigger), AI_NAVCHOICES,
|
||||
"waypoint name\"\n");
|
||||
addField("probability", TypeS32, Offset(mProbability, AITrigger), AI_NAVCHOICES, "chance of picking this object to path to.");
|
||||
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,20 +175,5 @@ inline GameBase* Trigger::getObject(const U32 index)
|
|||
return mObjects[index];
|
||||
}
|
||||
|
||||
#define AI_NAVCHOICES 8
|
||||
class AITrigger : public Trigger
|
||||
{
|
||||
typedef Trigger Parent;
|
||||
public:
|
||||
AITrigger();
|
||||
~AITrigger();
|
||||
|
||||
StringTableEntry mWaypoints[AI_NAVCHOICES];
|
||||
S32 mProbability[AI_NAVCHOICES];
|
||||
static void initPersistFields();
|
||||
// SimObject
|
||||
DECLARE_CONOBJECT(AITrigger);
|
||||
};
|
||||
|
||||
#endif // _H_TRIGGER
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue