CMaNGOS - WoW Emulation
Make creature stop and stay on waypoint - Printable Version

+- CMaNGOS - WoW Emulation (https://oldforum.cmangos.net)
+-- Forum: Developer's Corner (https://oldforum.cmangos.net/forum-7.html)
+--- Forum: General Discussion (https://oldforum.cmangos.net/forum-8.html)
+--- Thread: Make creature stop and stay on waypoint (/thread-7798.html)



Make creature stop and stay on waypoint - stavaren - 02-28-2017

Hi

Is there a way which I am unaware of to make a creature completely stop and stay at a specified waypoint (not with waittime)?

I've tried DBscript commands Pause waypoints and change movement flag but that just makes the NPC go back to WP 1 instead of staying on the one which executes the script.

Any help appreciated!

Thanks


RE: Make creature stop and stay on waypoint - SADraco - 02-28-2017

did you try using event ai for this - if you create a event it might work


RE: Make creature stop and stay on waypoint - stavaren - 03-01-2017

(02-28-2017, 10:40 PM)SADraco Wrote: did you try using event ai for this - if you create a event it might work

I looked at it but couldnt really find anything related to what I'm looking for. Any suggestions?


RE: Make creature stop and stay on waypoint - grz3s - 03-01-2017

(..)Is there a way which I am unaware of to make a creature completely stop and stay at a specified waypoint (not with waittime)?(..)
So you have creature with waypoints....
You can use:
(xxx,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,'movement chenged to 0:idle'), -- DBscripts command 20.


Quote:20 SCRIPT_COMMAND_MOVEMENT resultingSource = Creature
* datalong = MovementType (0:idle, 1:random or 2:waypoint)
* datalong2 = wanderDistance (for random movement)
* data_flags & SCRIPT_FLAG_COMMAND_ADDITIONAL: RandomMovement around current position


or more complicated:
Creature without waypoints can be forced by another one (or quest/spell/event) to move to your xyz (and will stay there) by using:
(xxx,0,3,0,0,buddy,searchradius,flag,0,0,0,0,x,y,z,o,'move'), -- DBscripts command 3


Quote:3 SCRIPT_COMMAND_MOVE_TOresultingSource = Creature

Quote:If position is very near to current position, or x=y=z=0, then only orientation is changed
* datalong2 = travel_speed*100 (use 0 for creature default movement)
* data_flags & SCRIPT_FLAG_COMMAND_ADDITIONAL: teleport unit to position
* x/y/z/o



RE: Make creature stop and stay on waypoint - stavaren - 03-02-2017

@grz3s

Thank you for your answer. I tried using command 20 in dbscripts and It only results in NPC running back to its first waypoint and staying there.

I will try out the buddy method and give some feedback Smile

THanks again! Much appreciated!