River KA
Veteran OT User
- Joined
- Feb 1, 2010
- Messages
- 535
- Solutions
- 27
- Reaction score
- 336
I was trying to make an function to stop the creature walking on TFS 1.2, but I just can't do that. Nothing works.
I appreciate any help to create a function that stops the creature walking. I am a coder also of C++.
Example:
1. A player clicked to walks to a far point. While walking, you execute this function on player:stopWalk(). It should stop the player and cancel the walking event.
2. A scripted monster walks to a far point (because all movements are coded, not just as normal monsters that are always walking). Then, the same should happen as the player example.
To me, only a Player:stopWalk() is enough, but I would like to be able to use this to scripted monsters also, so it's interesting to have a function Creature:stopWalk() instead.
Note:
I tried of of these already, but none worked properly.
The only one that worked almost as I wanted to, was the function creature->stopEventWalk() that really stops the creature and cancel the walking event, but you need to click to move 2 times to make your character move, don't know why.
Thanks in advance.
Regards,
River.
I appreciate any help to create a function that stops the creature walking. I am a coder also of C++.
Example:
1. A player clicked to walks to a far point. While walking, you execute this function on player:stopWalk(). It should stop the player and cancel the walking event.
2. A scripted monster walks to a far point (because all movements are coded, not just as normal monsters that are always walking). Then, the same should happen as the player example.
To me, only a Player:stopWalk() is enough, but I would like to be able to use this to scripted monsters also, so it's interesting to have a function Creature:stopWalk() instead.
Note:
I tried of of these already, but none worked properly.
C++:
player->setNextActionTask(nullptr);
player->setNextWalkTask(nullptr);
player->onWalkAborted();
player->stopEventWalk();
player->stopWalk();
The only one that worked almost as I wanted to, was the function creature->stopEventWalk() that really stops the creature and cancel the walking event, but you need to click to move 2 times to make your character move, don't know why.
Thanks in advance.
Regards,
River.
Last edited: