To stop it from going back to 1, you need to modify the code within the directional movement character, currently it has the following code block:
local function distance(vec1, vec2)
return math.ceil( math.sqrt( math.pow(vec1.x - vec2.x, 2) + math.pow(vec1.y - vec2.y, 2) ) )
end
local function moveCharacter(self)
local path, found = NAVGO.GET_PATH_FROM_DIRECTIONAL_ID(self.Start_path_ID, self.End_path_ID)
if not found then
print("Directional - NO PATH FOUND")
else
print("Directional - PATH FOUND")
local delay = 0
local lastPos = go.get_position(go.get_id())
for i=1, #path do
local newPosition = vmath.vector3(path[i].x, path[i].y, 1)
local time = distance(newPosition, lastPos) / self.speed -- move at a consistent speed
go.animate(go.get_id(), "position", go.PLAYBACK_ONCE_FORWARD, newPosition, go.EASING_LINEAR, time, delay)
lastPos = newPosition
delay = delay + time
end
timer.delay(delay, false, moveCharacter) --comment this out to prevent looping
end
end
To stop the character from looping, you just need to remove the “timer.delay” call from the end of the function and the character will no longer loop.
The code that controls that is within the NavGo_directionalScript.script, the code will wait until a message from the NavGo Handler to determine if it should show or not. The NavGO handler should automatically hide everything during runtime unless you specificy otherwise. The names shouldn’t matter, I rename them in the same way all the time and don’t have the same issue. The sprites within the game objects do have to be called sprite still, that’s the only think I can think of at this point that would cause some to be hidden while others remain. Are you getting an error message still? If you are still having issues, can you post a screenshot of the contents of the directional node you cut and pasted.
That depends on how you have it set up within your project. If you are pointing to the master branch on git, you just need to click project->fetch libraries and it should update them. If you are pointing to a specific release, you would need to change the release to get a newer one. As for the downloaded version you are testing with, you would have to download the newest version from git, which can be found at: https://github.com/DrCampbell2017/NavGO/archive/Alpha.13.zip
Does that answer your questions?