Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: [how-to] Using 'Wait', interruptions outside the rules  (Read 1561 times)

Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
[how-to] Using 'Wait', interruptions outside the rules
« on: November 17, 2014, 11:56:12 AM »

Hi.

So the question is this - how to properly set up a wait() thingy outside the rules.csv (i.e. for interaction dialogues that are not based on rules).

Is it actually possible to do that?

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24126
    • View Profile
Re: [how-to] Using 'Wait', interruptions outside the rules
« Reply #1 on: November 17, 2014, 12:11:08 PM »

You can call the .execute() method on Wait directly, something like:

new Wait().execute(null, dialog, Misc.tokenize(<string with parameters to Wait>), memoryMap);

You'd have to set up the memoryMap yourself, read/write to it to detect Wait state changes, etc.


Alternatively, you could use Global.getFactory().createProgressIndicator() yourself and code whatever leashing/interruption/etc logic around that.
Logged

Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
Re: [how-to] Using 'Wait', interruptions outside the rules
« Reply #2 on: November 18, 2014, 11:38:44 PM »

Are there any examples of the leashing/interruption/etc logic coding for the non-rules-based interactions? I have some troubles figuring out how to set up and use LeashingScript() with progress indicator.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24126
    • View Profile
Re: [how-to] Using 'Wait', interruptions outside the rules
« Reply #3 on: November 19, 2014, 10:36:34 AM »

Aside from the Wait command itself, no.
Logged