Looking around the forum this issue is the one that deals with the problem I have though in my tests does not work.
To summarize them say that I have a game client / server I tested in the same PC and use Parallel to move to the player with the mouse only.
Try to eliminate the interval (Parallel) with the code I found here and put below but after a few consecutive clicking an error is generated in the interval:
if self.playerMovement:
self.playerMovement.pause()
self.playerMovement = None
After studying the classes and their methods to modify the code as follows:
def mover(self,destino):
# Rota y mueve al jugador
self.destino = destino
self.nodedestino = NodePath('destino')
self.nodedestino.reparentTo(render)
if self.moverjugador != None:
if self.moverjugador.isPlaying():
self.moverjugador.pause()
manejador = self.moverjugador.getManager()
manejador.removeInterval(self.moverjugador)
self.moverjugador = None
self.actorNode.lookAt(self.destino)
self.nodedestino.setPos(self.destino)
duracion = self.actorNode.getDistance(self.nodedestino)/self.velocidad
self.desplazamiento = self.actorNode.posInterval(duracion, self.destino)
self.ajustaraltura = LerpFunc(self.altura, duration = duracion)
self.animacion = ActorInterval(self.actor, 'correr', loop = 1, duration = duracion)
self.moverjugador = Parallel(self.desplazamiento, self.ajustaraltura, self.animacion)
self.moverjugador.start()
Sorry that the code is in Spanish but I am speaking hizpana and forgive my English.
With one client open takes time to make the error but with 3 or 4 gives fast:
Someone can help halt and eliminate Parallel intervals without generating an error? I have 2 weeks in this and I see no light.
Please.