party:onTurn
Posted: Mon Jan 25, 2021 9:50 pm
I am trying to get the party:onTurn component to work.
I created the following test code and placed it as a script in the dungeon editor...
function pmove()
party.party:addConnector("onMove", self.go.id, "move")
party.party:addConnector("onTurn", self.go.id, "pturn")
end
function move(self,dir)
print(self.go.name .. " move",dir)
end
function pturn(self,dir)
print(self.go.name .. " move",dir)
end
pmove()
The onMove connector works fine. I have tried onRest and onWakeUp also and they all work but I cannot get the onTurn commector to work and I am wondering why.
I created the following test code and placed it as a script in the dungeon editor...
function pmove()
party.party:addConnector("onMove", self.go.id, "move")
party.party:addConnector("onTurn", self.go.id, "pturn")
end
function move(self,dir)
print(self.go.name .. " move",dir)
end
function pturn(self,dir)
print(self.go.name .. " move",dir)
end
pmove()
The onMove connector works fine. I have tried onRest and onWakeUp also and they all work but I cannot get the onTurn commector to work and I am wondering why.