home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- int Initialize(string type) {
- global int gState;
- global int hitValue = 1;
- global real gOutRadius = 150.0;
- Reset("");
- }
-
- int Reset(string dummy)
- {
- gState = 0;
- wakeupTime = -1.0;
- }
-
- int outradius(string radius)
- {
- gOutRadius = Str2Real(radius);
- }
-
- int startsound(string soundname)
- {
- gStartSound = GetSoundIndex(soundname);
- }
-
- int endsound(string soundname)
- {
- gEndSound = GetSoundIndex(soundname);
- }
-
- int progresssound(string soundname)
- {
- gProgressSound = GetSoundIndex(soundname);
- }
-
- int start(string msg)
- {
-
-
-
- if (gState == 0)
- {
- print(thisObject);
- print("lasercone start");
- if (SetTargetPoint( thisObject,gOutRadius) == 1)
- {
- gState = 1;
- wakeupTime = GetTime(thisObject);
- FireSaveInfo(thisObject,1,1,0.0,1);
- }
- }
- else
- {
- print("lasercone off");
- gState = 0;
- wakeupTime = -1.0;
- }
-
- }
-
- int damage(string str)
- {
- hitValue = Str2Int(str);
- return 0;
- }
-
- int TimedEvent(int input)
- {
- if (gState == 1)
- {
- LaunchBeam(thisObject,0,1.0,3.0,"laser",0.0,1.0);
- if (FireSaveInfo(thisObject,hitValue,1,0.0,1) == 1)
- HitTarget(thisObject,hitValue);
- }
-
- return 0;
- }
-