MoveToLocation change

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

Post Reply
Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

MoveToLocation change

Post by Jabantiz » Thu Jun 07, 2018 7:47 pm

Having a spawn move along a path using MoveToLocation resulted in the spawn teleporting around, especially if the distance between points was small. To fix this I have allowed MoveToLocation to build a path, there is now an optional bool parameter at the very end that is set to true it will not start the path letting you add more points. The final point in the path has to be false. If not included the parameter defaults to false so the function works the same as it always has.

Here is an example of building a simple path

Code: Select all

	MoveToLocation(NPC, -2248.49, -44.91, 295.61, 2, "", true)
	MoveToLocation(NPC, -2232.10, -45.97, 289.68, 2, "", true)
	MoveToLocation(NPC, -2226.69, -46.02, 271.76, 2, "", true)
	MoveToLocation(NPC, -2202.71, -46.43, 275.88, 2, "", true)
	MoveToLocation(NPC, -2198.43, -46.72, 299.24, 2, "Move6")

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: MoveToLocation change

Post by Ememjr » Tue Jun 12, 2018 5:50 am

Awesome hope this fixes the pathing issue i have on the Toturial Boat cant wait to get in to test it

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: MoveToLocation change

Post by Jabantiz » Tue Jun 12, 2018 2:50 pm

Ememjr wrote: Tue Jun 12, 2018 5:50 am Awesome hope this fixes the pathing issue i have on the Toturial Boat cant wait to get in to test it
It should. I also did some other movement changes that over all has made movement smoother with far less warping.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests