Health bar when aimed
by Ricardo Cabral · in Torque Game Engine · 02/06/2005 (5:43 am) · 3 replies
Hey all,
with barely two days exposed to torque, i have to say this thing has worth the money. nice work garagegames!:D
i have a question, however, regarding the health bar that shows up when you aim at a bot in the fps starter kit.
where is this behaviour defined? why does AIPlayer has methods that concern LOS and the Player class doesnt? in starter.fps/server/scripts/aiPlayer.cs we find:
//-----------------------------------------------------------------------------
// AIPlayer callbacks
// The AIPlayer class implements the following callbacks:
// PlayerData::onTargetEnterLOS(%this,%obj)
// PlayerData::onTargetExitLOS(%this,%obj)
// PlayerData::onAdd(%this,%obj)
but i don't see the definitions for onTargetEnterLOS or exit whatsoever
thanks for your time,
Ricardo
with barely two days exposed to torque, i have to say this thing has worth the money. nice work garagegames!:D
i have a question, however, regarding the health bar that shows up when you aim at a bot in the fps starter kit.
where is this behaviour defined? why does AIPlayer has methods that concern LOS and the Player class doesnt? in starter.fps/server/scripts/aiPlayer.cs we find:
//-----------------------------------------------------------------------------
// AIPlayer callbacks
// The AIPlayer class implements the following callbacks:
// PlayerData::onTargetEnterLOS(%this,%obj)
// PlayerData::onTargetExitLOS(%this,%obj)
// PlayerData::onAdd(%this,%obj)
but i don't see the definitions for onTargetEnterLOS or exit whatsoever
thanks for your time,
Ricardo
About the author
#2
i just wonder, is there any script action that should be called when you aim at a player/object?
02/07/2005 (12:15 pm)
Thanks for that info howard.i just wonder, is there any script action that should be called when you aim at a player/object?
#3
02/07/2005 (12:56 pm)
I beleive advanced AIs use something similar to a radius container search, and then do vector tests. They also respond to things like sounds.
Torque 3D Owner Howard Dortch
Default Studio Name
For the AI it doesn't know how to aim like you do so the bots have to cast a ray in 3space to see if it knows what it's looking at. So if it sees you it will shoot you or not... The player (you) dont need this because you are smarter than the bot. The AI is really dumb so you have to help it along.