SaveIP
cheap diazepam cheap xenical nokia ringtones qwest ringtones zanaflex online diazepam online verizon ringtones free motorola ringtones order lortab prozac online ericsson ringtones but ortho cheap cyclobenzaprine cheap celexa free ringtones phentermine free cool ringtones cheap prozac free qwest ringtones cialis online sprint ringtones nexium online real ringtones sagem ringtones tracfone ringtones free nokia ringtones free punk ringtones mp3 ringtones sony ringtones ativan online but hgh free midi ringtones alltel ringtones cheap flexeril sony ericsson ringtones motorola ringtones vicodin online free tracfone ringtones buy soma levitra online free motorola ringtones cheap didrex cheap sildenafil pharmacy online online zoloft online hydrocodone online free sony ringtones cingular ringtones viagra buy paxil ambien online buy lortab order hydrocodone vigrx online cheap ativan hgh online sildenafil online buy viagra ortho online nextel ringtones lisinopril free funny ringtones free sony ericsson ringtones buy vicodin hydrocodone order ativan mono ringtones clonazepam levitra free sprint ringtones cialis online sony ringtones cheap levitra zanaflex online phentermine celexa online ultracet online wwe ringtones free sharp ringtones buy norco soma online cheap ultracet free cingular ringtones cheap adipex cheap xenical cheap albuterol cheap tenuate cheap ortho free music ringtones sagem ringtones cheap lisinopril meridia online cheap propecia cheap vigrx cheap diethylpropion cheap albuterol mp3 ringtones meridia online free ringtones cheap ultram soma online cheap lortab cheap sildenafil free nextel ringtones cheap lorazepam free funny ringtones diethylpropion online free ringtones funny ringtones cingular ringtones cheap soma nokia ringtones clonazepam online zyban online clomid online buy prozac online valium order lisinopril meridia online buy tramadol sharp ringtones free midi ringtones flexeril online real ringtones celexa online zoloft online free nextel ringtones ericsson ringtones free music ringtones mtv ringtones order ultram buy valium viagra online lorazepam online cheap cialis cheap phentermine buy nexium samsung ringtones cheap norco meridia online sprint ringtones buy rivotril order carisoprodol carisoprodol online cyclobenzaprine online free qwest ringtones free qwest ringtones cheap fioricet verizon ringtones punk ringtones cheap hoodia pharmacy online online tracfone ringtones tramadol cheap rivotril tramadol online didrex online cheap fioricet music ringtones cheap albuterol free nokia ringtones buy viagra buy alprazolam buy xenical pharmacy online online free funny ringtones order zanaflex free ericsson ringtones cyclobenzaprine online adipex online cheap xanax free alltel ringtones free qwest ringtones ultram online sonyericsson ringtones free samsung ringtones cheap lortab free mono ringtones free samsung ringtones zyban online cheap celexa free funny ringtones wwe ringtones cheap rivotril but clomid buy fioricet buy hgh cheap lipitor cheap hoodia clonazepam online cool ringtones tenuate online cheap vicodin real ringtones free sonyericsson ringtones buy hoodia buy tramadol nextel ringtones cheap alprazolam ambien online A command for Oblivion Script Extender Syntax:
SaveIP [labelID]
This command allows you to set up one or more named labels within a script. It is identical to Label. Using GoTo or RestoreIP causes script processing to jump to the label, allowing you to set up simple loops. By providing an optional label ID, multiple labels or nested loops can be defined.
Example:
begin onActivate ; declare a variable to keep track of the number of times we've gone through the loop long var set var to 0 ; save the current instruction pointer ; this records that the beginning of the loop is right before the PrintToConsole command SaveIP ; could also use Label ; print the current loop count PrintToConsole "loop %f" var ; update the loop counter set var to var 1 ; we only want to go through the loop three times, so check the loop counter if var < 3 ; jump back to the saved location RestoreIP ; could also use Goto endif ; if we get here, we're done with the loop end
When activated, this script will print:
loop 0.0000 loop 1.0000 loop 2.0000
To support nested loops, the SaveIP and RestoreIP commands take an optional integer parameter specifying which 'slot' to save the instruction location in. If you don't specify a number, it defaults to 0. There are 256 slots in the internal list.
A more familiar For-loop in a normal programming language would look like this:
for (i = 0; i < 5; i ) { for (j = 0; j < 3 ; j ) { //Do Something } }
To create the same loop using OBSE functions:
short i short j Label 0 ; top of outer loop, equivalent to SaveIP 0 set j to 0 Label 1 ; top of inner loop PrintToConsole "i = %.0f, j = %.0f" i, j set j to ( j 1 ) if ( j < 3 ) GoTo 1 ; equivalent to RestoreIP 1 endif set i to ( i 1 ) if ( i < 5 ) GoTo 0 endif
Note that unless the above loop is wrapped inside a conditional statement or a block like OnActivate, it will restart the very next frame and every frame thereafter.
Notes
- These functions are considered "beta", and may be unreliable. Further testing is needed.
- Issues may arise when two or more scripts use the same label codes.
- Be careful to make sure your loop has an exit condition, otherwise you run the risk of creating an infinite loop, which can freeze the game and make it impossible for the player to exit.