Movement Loop Speed bug
Posted: Mon Apr 27, 2009 7:19 am
I noticed when trying to build a boat movement path... if the speed param starts slow, but you want it to speed up at certain waypoints, the speed is never increased. The boat will only move as fast as the first encountered speed setting.
This is my movement code for the Overlord's Edge - the boat to Kylong Plains (rough, as I road that boat in Live and just did a bunch of /loc's everytime the heading changed)
If you use this script, but change the Speed to start at 3, go a few clicks then change to 4, 5...10, you will notice when you run the boat that it always stays at speed 3, very slow on water.
As you see in this script, I finally set speed to 10 for all movements just for testing.
To make the boat, go to Commonlands docks.
Run these commands:
You should now see your boat take off out of the bay. This is just a circular trip for now, just to test the speed change stuff.
On live, boats start off, and end, slower than they travel on the open sea. That is the effect of this test.
This is my movement code for the Overlord's Edge - the boat to Kylong Plains (rough, as I road that boat in Live and just did a bunch of /loc's everytime the heading changed)
Code: Select all
function spawn(NPC)
-- Commonlands Docks to Kylong Zone Line
MovementLoopAddLocation(NPC, -1065.64, -144.066, -690.65, 10, 0)
MovementLoopAddLocation(NPC, -1062.95, -144.066, -692.65, 10, 0)
MovementLoopAddLocation(NPC, -997.90, -144.066, -736.85, 10, 0)
MovementLoopAddLocation(NPC, -951.75, -144.066, -761.14, 10, 0)
MovementLoopAddLocation(NPC, -922.66, -144.066, -776.86, 10, 0)
MovementLoopAddLocation(NPC, -808.12, -144.066, -839.04, 10, 0)
MovementLoopAddLocation(NPC, -767.78, -144.066, -861.77, 10, 0)
MovementLoopAddLocation(NPC, -744.01, -144.066, -881.71, 10, 0)
MovementLoopAddLocation(NPC, -729.18, -144.066, -897.49, 10, 0)
MovementLoopAddLocation(NPC, -713.65, -144.066, -918.18, 10, 0)
MovementLoopAddLocation(NPC, -703.59, -144.066, -940.17, 10, 0)
MovementLoopAddLocation(NPC, -699.87, -144.066, -961.95, 10, 0)
MovementLoopAddLocation(NPC, -700.55, -144.066, -984.20, 10, 0)
MovementLoopAddLocation(NPC, -703.65, -144.066, -1000.82, 10, 0)
MovementLoopAddLocation(NPC, -711.45, -144.066, -1026.06, 10, 0)
MovementLoopAddLocation(NPC, -721.09, -144.066, -1047.60, 10, 0)
MovementLoopAddLocation(NPC, -735.20, -144.066, -1068.14, 10, 0)
MovementLoopAddLocation(NPC, -748.49, -144.066, -1084.06, 10, 0)
-- Kylong Zone Line to Commonlands Docks
MovementLoopAddLocation(NPC, -1288.45, -144.066, -728.51, 10, 0)
MovementLoopAddLocation(NPC, -1277.95, -144.066, -718.89, 10, 0)
MovementLoopAddLocation(NPC, -1271.58, -144.066, -713.85, 10, 0)
MovementLoopAddLocation(NPC, -1264.31, -144.066, -708.28, 10, 0)
MovementLoopAddLocation(NPC, -1255.45, -144.066, -701.77, 10, 0)
MovementLoopAddLocation(NPC, -1246.91, -144.066, -695.71, 10, 0)
MovementLoopAddLocation(NPC, -1238.49, -144.066, -689.90, 10, 0)
MovementLoopAddLocation(NPC, -1228.15, -144.066, -682.98, 10, 0)
MovementLoopAddLocation(NPC, -1217.15, -144.066, -675.94, 10, 0)
MovementLoopAddLocation(NPC, -1205.81, -144.066, -669.05, 10, 0)
MovementLoopAddLocation(NPC, -1193.87, -144.066, -662.25, 10, 0)
MovementLoopAddLocation(NPC, -1182.67, -144.066, -656.51, 10, 0)
MovementLoopAddLocation(NPC, -1172.20, -144.066, -652.04, 10, 0)
MovementLoopAddLocation(NPC, -1162.56, -144.066, -649.21, 10, 0)
MovementLoopAddLocation(NPC, -1153.27, -144.066, -648.42, 10, 0)
MovementLoopAddLocation(NPC, -1143.01, -144.066, -650.39, 10, 0)
MovementLoopAddLocation(NPC, -1135.75, -144.066, -653.62, 10, 0)
MovementLoopAddLocation(NPC, -1127.99, -144.066, -658.26, 10, 0)
MovementLoopAddLocation(NPC, -1121.25, -144.066, -662.45, 10, 0)
MovementLoopAddLocation(NPC, -1114.17, -144.066, -665.95, 10, 0)
MovementLoopAddLocation(NPC, -1108.28, -144.066, -668.40, 10, 0)
MovementLoopAddLocation(NPC, -1102.97, -144.066, -670.86, 10, 0)
MovementLoopAddLocation(NPC, -1097.51, -144.066, -673.55, 10, 0)
MovementLoopAddLocation(NPC, -1092.09, -144.066, -676.35, 10, 0)
MovementLoopAddLocation(NPC, -1086.62, -144.066, -679.25, 10, 0)
MovementLoopAddLocation(NPC, -1082.99, -144.066, -681.22, 10, 0)
MovementLoopAddLocation(NPC, -1078.14, -144.066, -683.88, 10, 0)
MovementLoopAddLocation(NPC, -1072.68, -144.066, -686.89, 10, 0)
MovementLoopAddLocation(NPC, -1069.09, -144.066, -688.84, 10, 0)
MovementLoopAddLocation(NPC, -1066.10, -144.066, -690.41, 10, 0)
-- Wait 60 Seconds at Commonlands Docks
MovementLoopAddLocation(NPC, -1065.64, -144.066, -690.65, 10, 60)
endAs you see in this script, I finally set speed to 10 for all movements just for testing.
To make the boat, go to Commonlands docks.
Run these commands:
Code: Select all
/spawn create NPC 7940 1 1 "Overlords Edge"
(target the boat you just created)
/move -1062 -144.066 -693.148
/summon
(that should put the boat at the dock)
/spawn add new "OverlordsEdge"
(that adds the spawn to your DB permanently)
(add the SpawnScript above to the new boat spawn ID)
/luadebug start
(starts lua debugging to your chat box)
/reload spawnscripts
/reload spawns
On live, boats start off, and end, slower than they travel on the open sea. That is the effect of this test.