| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
hpl2:tutorials:script:funcdef [2011/08/14 20:49] apjjm [Solving a basic problem with function pointers] |
hpl2:tutorials:script:funcdef [2011/08/15 01:09] (current) apjjm [Solving a basic problem with function pointers] |
||
|---|---|---|---|
| Line 153: | Line 153: | ||
| AddDebugMessage("Dawg!", false); | AddDebugMessage("Dawg!", false); | ||
| } | } | ||
| - | |||
| - | |||
| // The actual stuff that does the descision making | // The actual stuff that does the descision making | ||
| Line 160: | Line 158: | ||
| void bigFunction() { | void bigFunction() { | ||
| @outputChoice = @output1; // Initially point to output 1 | @outputChoice = @output1; // Initially point to output 1 | ||
| - | subFunction(); // Call whith 1/4 chance of changing outputChoice | + | subFunction(); // Call with 1/4 chance of changing outputChoice |
| outputChoice(); // Call whichever output has been chosen | outputChoice(); // Call whichever output has been chosen | ||
| } | } | ||