Line | |
---|
1 | -- Register Classes to use |
---|
2 | thisscript:registerClass("AttractorMine") |
---|
3 | thisscript:registerClass("ScriptTrigger") |
---|
4 | |
---|
5 | trigger = ScriptTrigger() |
---|
6 | trigger:setScript("attractor.lua") |
---|
7 | trigger:setFunction("tick") |
---|
8 | trigger:setAbsCoor(-84, 19, 77) |
---|
9 | trigger:setTarget("Player") |
---|
10 | trigger:setRadius(100) |
---|
11 | trigger:setDebugDraw(true) |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | created = true |
---|
16 | function tick(timestep) |
---|
17 | |
---|
18 | if not created then |
---|
19 | am = AttractorMine() |
---|
20 | am:setAbsCoor(-84, 19, 77) |
---|
21 | created = true |
---|
22 | end |
---|
23 | |
---|
24 | return false |
---|
25 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.