Scripted waypoints with the scripting engine.
Previously, I used a database to do this. This time, I've used the scripting engine. The performance is about the same, so far as I can tell.
You can try it out in the lab, just zone to butcherblock. Let me attach the script file I'm using before going into the code. This attached quest file will move the sirens bane in a kind of elipse around the shore in butcherblock. |
I had a problem with the triggers all going off at the same time. I fixed this by just assigning some really large random number.
In NPC.CPP, specifically in the constructor: Code:
SetWayPointStep(0); Code:
/********************************************* |
In npc.h, add these parts to the public members of the NPC class.
Code:
/****************************************************** Code:
Timer* waypoint_timer; |
Use this hacked and dirt wesquests.cpp:
|
Oh, and in npc.h in public: I have
Code:
void SetIsMovingHome(bool ToF) { ismovinghome=ToF;} float org_x, org_y, org_z, org_heading; up from protected to public. |
All times are GMT -4. The time now is 09:05 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.