Results 1 to 20 of 20

Thread: Intermediate Guide to Scripting Discussion

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Intermediate Guide to Scripting Discussion

    Ya that was exactly what I meant ;)
    However, you should theoretically also be able to differentiate different sequential parts of a script (for example PreEvent and AfterEvent parts) by specifying a counter loop like this example:

    Code:
    declare_counter event_triggered
    .
    .
    .
    monitor_event
    set_counter event_triggered 1
    terminate_monitor
    end_monitor
    
    while I_CompareCounter event_triggered = 0
    end_while
    .
    .
    .
    while TrueCondition
    end
    What this does is loop the first part until event_triggered is set to 1, which happens when you reach your desired event, and then starts looping the second part. This struct is what I meant with "escape condition"; if you want to use it, make sure that all your monitors in the first part look like this:
    Code:
    monitor_*
    if I_CompareCounter event_triggered = 0
    ...code...
    end_if
    if not I_CompareCounter event_triggered = 0
    terminate_monitor
    end_if
    end_monitor
    So that they are destroyed when we hit our event.
    I'm not sure whether monitors are pre-loaded when the script starts executing, but if they are, you also need to make the monitors of the second part look like this:
    Code:
    monitor_*
    if I_CompareCounter event_triggered = 1
    ...code...
    end_if
    end_monitor
    Might be useful for some stuff, I don't know ;) I just derived this from my programming skills.
    Last edited by alpaca; 11-17-2005 at 16:44.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO