Jump to content

Virtual Player Which Follows A Creature?


Guest detekt

Recommended Posts

Hello, I am wotking on a part of the Bot system and experiencing the following problem:

When the bot goes outside the players visibility range it freezes there until a player approach it. I know why that happens (everybody know)

The creature go to a non-active grid so it stops updating.

My question is how to add a virtual player which will follow the bot with

v_player->GetMotionMaster()->MoveChase(m_bot);

Where v_player is the virtual player and m_bot is the creature(bot).

If you have another ideas with setting the grid state (where the bot is located) to active please chare it.

Thanks, Detekt.

Link to comment
Share on other sites

Player* v_player = new Player(NULL);

v_player->GetMotionMaster()->Initialize();

v_player->SetMapId(m_bot->GetMapId());

v_player->Relocate(m_bot->GetPositionX(),m_bot->GetPositionY(),m_bot->GetPositionZ(),m_bot->GetOrientation());

tried this at every bot update loop, result - none. Any ideas?

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use