Script Timing Issues: Difference between revisions

From HLKitWiki
Jump to navigationJump to search
Line 10: Line 10:
==How to Recognize a Timing Issue==
==How to Recognize a Timing Issue==


when to recognize a timing issue - everything looks good via info windows but the expected behavior still isn't being performed properly
It doesn't matter how experienced you are as an author, script timing issues will crop up if the game system has even a modicum of complexity. The trick is in being able to recognize when you are dealing with a timing issue.
 
The first diagnostic step is always to review each of the tasks involved in the behavior you're implementing. For each task, you need to double-check the associated tag expressions and/or script code. Then check the appropriate info windows to see whether all of your assumptions are being satisfied. Do fields contain the values they should? Are all the proper tags assigned where they should?
 
 
You may also find it useful to insert a few "debug" or "notify" statements into pertinent scripts to verify that values and tags are
 
appropriate info windows.
 
 
There are two primary types of timing issues that can arise, and each has slightly different symptoms. For both, however, the first diagnostic step is to review the appropriate info windows.
 
 
 
contents of info windows is wrong, but the scripts are performing the correct actions
 
everything looks good via info windows but the expected behavior still isn't being performed properly


==Using the Task List==
==Using the Task List==

Revision as of 23:15, 21 November 2008

[Context: HL Kit … Basic Concepts and Terminology … Debugging Mechanisms]

Overview

We'll start this section off by answering the obvious question. What's a timing issue?

The evaluation cycle controls the order in which everything is processed for each character, and it's up to the author to make sure that every task is assigned an appropriate phase and priority. A timing issue is the result of scheduling a task in the wrong sequence, which causes the evaluation cycle to yield the wrong final results. This section provides some tips on how to recognize and resolve timing issues.

How to Recognize a Timing Issue

It doesn't matter how experienced you are as an author, script timing issues will crop up if the game system has even a modicum of complexity. The trick is in being able to recognize when you are dealing with a timing issue.

The first diagnostic step is always to review each of the tasks involved in the behavior you're implementing. For each task, you need to double-check the associated tag expressions and/or script code. Then check the appropriate info windows to see whether all of your assumptions are being satisfied. Do fields contain the values they should? Are all the proper tags assigned where they should?


You may also find it useful to insert a few "debug" or "notify" statements into pertinent scripts to verify that values and tags are

appropriate info windows.


There are two primary types of timing issues that can arise, and each has slightly different symptoms. For both, however, the first diagnostic step is to review the appropriate info windows.


contents of info windows is wrong, but the scripts are performing the correct actions

everything looks good via info windows but the expected behavior still isn't being performed properly

Using the Task List

intra-hero timing issues inter-hero timing issues (masters/minions)

Script Timing Output

debug output of script timing

Debug Output Tracing

debug output of each step in evaluation to monitor the timing and flow