| Next revision | Previous revision | ||
|
hpl2:tutorials:script:random_scares [2013/04/23 09:30] justanotherplayer created |
hpl2:tutorials:script:random_scares [2013/04/23 09:33] (current) justanotherplayer [Random Scares] |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| - | ==== //FIRST SECTION// ==== | + | ==== Random Scares ==== |
| - | <code>''void OnStart() | + | <code> |
| + | void OnStart() | ||
| { | { | ||
| AddEntityCollideCallback("Player", "ScriptArea_1", "PlrCollideSwitch", true, 1); | AddEntityCollideCallback("Player", "ScriptArea_1", "PlrCollideSwitch", true, 1); | ||
| - | }'' | + | } |
| </code> | </code> | ||
| Line 36: | Line 37: | ||
| - | <code>''void PlrCollideSwitch(string &in asParent, string &in asChild, int alState) | + | <code> |
| + | void PlrCollideSwitch(string &in asParent, string &in asChild, int alState) | ||
| { | { | ||
| int x = RandInt(1, 5) | int x = RandInt(1, 5) | ||
| Line 56: | Line 58: | ||
| //Scare 5 | //Scare 5 | ||
| break; | break; | ||
| - | } '' | + | } |
| </code> | </code> | ||