Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Resetting Character's Queued Actions  (Read 2400 times)

0 Members and 1 Guest are viewing this topic.

greg

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 18
    • View Profile
Resetting Character's Queued Actions
« on: September 17, 2007, 03:52:31 PM »

Often a character's action will consist of multiple parts.  For example, suppose the character tries to open a gate:

Code: [Select]
on "Open" {
   Ego.GoTo(walkto.x, walkto.y);    // walk to the gate
   Ego.TurnTo(turnto.x, turnto.y);  // face the gate
   Ego.Talk("The gate is locked."); // say "The gate is locked."
}

If, while the character is walking toward the gate, the player clicks elsewhere, I'd like to cancel all the pending actions (walk, turn, talk) except for the player's new click.  Ego.Reset() cancels just the walk, but the character will still perform the Turn and Talk.  Is there a way to override Reset() to cancel all the character's queued actions?

Thanks,
Greg
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Resetting Character's Queued Actions
« Reply #1 on: September 17, 2007, 03:58:42 PM »

Are you using a custom overriden GoTo method? I suppose so. In that case WME 1.8 beta 4 should solve your problem.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.044 seconds with 21 queries.