Fixed traceback issue, improved animqueue primitives

This commit is contained in:
2021-06-03 13:29:19 -04:00
parent 427c82ea8b
commit 5b19d407fb
7 changed files with 79 additions and 91 deletions

View File

@@ -7,27 +7,32 @@ function player.interface(actor, place)
gui.menu_item("west", "Go West")
end
function player:printanimstate()
graphic,plane,x,y,z,facing = tangible.animstate(self)
print("Resulting state: ", graphic, plane, x, y, z, facing)
end
function player.action.north(actor, place, dialog)
print("Moving north")
x,y,z = tangible.xyz(place);
tangible.animate(place, {action="walk", dy=1})
actor:printanimstate()
end
function player.action.south(actor, place, dialog)
print("Moving south")
x,y,z = tangible.xyz(place);
tangible.animate(place, {action="walk", dy=-1})
actor:printanimstate()
end
function player.action.east(actor, place, dialog)
print("Moving east")
x,y,z = tangible.xyz(place);
tangible.animate(place, {action="walk", dx=1})
actor:printanimstate()
end
function player.action.west(actor, place, dialog)
print("Moving west")
x,y,z = tangible.xyz(place)
tangible.animate(place, {action="walk", dx=-1})
actor:printanimstate()
end