GoldenEye: Source Forums

Editing and Customization => Modding Help => Topic started by: Joe on April 02, 2013, 07:41:36 pm

Title: How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
Post by: Joe on April 02, 2013, 07:41:36 pm
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.
Title: Re: How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
Post by: Troy on April 02, 2013, 08:13:30 pm
KM might be able to help you.  I don't know anything about bot coding.
Title: Re: How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
Post by: killermonkey on April 02, 2013, 08:54:59 pm
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.
Title: Re: How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
Post by: Joe on April 05, 2013, 04:08:04 pm
Thanks for your help guys.