Editing and Customization > Modding Help
How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
(1/1)
Joe:
Hi,
I would like to use this bot task to make a DAD mode bot stand next to one of its team's gravestones while it waits for the gravestone to resurrect a team mate.
Troy:
KM might be able to help you. I don't know anything about bot coding.
killermonkey:
WAIT_FOR_SCRIPT is actually intended for scripted movement (choreographed sequences). I will remove that from the API since its misleading and not terribly useful!
What you want to use is "SLEEP" which sleeps the bot for 0.2 seconds. Keep issuing this schedule until the desired action is completed.
Your flow would be:
Condition [ON_TOMB] -> SelectSchedule [SLEEP] -> 0.2 sec -> SelectSchedule [SLEEP] -> .... -> Condition [OFF_TOMB] -> SelectSchedule [BOT_PATROL]
Be forewarned, the Ai API is extremely flaky and will be receiving a major overhaul in 4.3 which will make things a lot clearer.
Joe:
Thanks for your help guys.
Navigation
[0] Message Index
Go to full version