GoldenEye: Source Forums

  • March 28, 2024, 06:57:37 pm
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?  (Read 4764 times)

0 Members and 1 Guest are viewing this topic.

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline
How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
« 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.
Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org

Troy

  • GE:S Coder
  • 00 Agent
  • ***
  • Posts: 821
  • Reputation Power: 260
  • Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!Troy is awe-inspiring!
  • Offline Offline
Re: How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
« Reply #1 on: April 02, 2013, 08:13:30 pm »

KM might be able to help you.  I don't know anything about bot coding.
Logged
Complete - Arsenal, One Bullet is Enough, Tournament DM v2, TurboDM
Defunct - Agent Under Fire
VC - Being such a dick, KM must be stroked before springing into action.

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
« Reply #2 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.
« Last Edit: April 02, 2013, 08:57:08 pm by killermonkey »
Logged

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline
Re: How can Python scripts stop the "WAIT_FOR_SCRIPT" bot task?
« Reply #3 on: April 05, 2013, 04:08:04 pm »

Thanks for your help guys.
Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org
Pages: [1]   Go Up