In previous games made in Pulp, I was able to fairly easily script this feature. However, with the addition of smoothly animated movement, I'm struggling to find where within the existing script where this needs to be coded. I've been banging my head against this for a few days now.
Since Pulp automatically will move the player according to directional input, the variables 'lastposx' and 'lastposy' are intended to store the previous player position before this directional input. The player can then be moved to this previous position if a turn without moving is detected, as stored in the variable 'turn=1'. At least that seemed to me to be the most straightforward way of doing this. But I've been unable to find where to place a 'goto lastposx,lastposy' statement without running into various problems due to the number of other events running at the same time.
If anyone would be willing to have a look at the attached file and help me out, it would be much appreciated!
(NOTE: the smooth animation script is derived from the excellent previous work of orkn with a few tweaks.)
Walk&TurnDemo.json.zip (7.1 KB)