home *** CD-ROM | disk | FTP | other *** search
-
-
- Actor(Satan)
- {
- file(SatanHeader);
- rank(_RankGeneral);
-
- startstate(statenormal);
- startaction(SatanIdle);
-
- /* printi("PathDestDist: ",VPathDestDistance);
- printi("PathDestAngle: ",VPathDestAngle);
- printi("PickDestAngle: ",VPickDestAngle);
- printi("TargetDistance: ",vtargetdistance);
- printi("TargetAngle: ",vtargetangle);
- */
-
- float(_declare,ambR,255);
- float(_declare,ambG,255);
- float(_declare,ambB,255);
-
- call(GlobalAmbient,ambR,ambG,ambB);
-
- if(vkey==key_w)
- {
- float(_add,ambR,1);
- float(_add,ambG,1);
- float(_add,ambB,1);
- }
- elseif(vkey==key_e)
- {
- float(_sub,ambR,1);
- float(_sub,ambG,1);
- float(_sub,ambB,1);
- }
-
-
- if(vtrigger==_DIRdepossesion)
- {
- callsub(Sub_InitDepossesion,SatanWound,SatanWound,SatanWound);
- }
- elseif(vtrigger==_DIRpossesion)
- {
- SpawnAction(SatanWound);
- }
-
- CallSub(BackGroundTriggerChecks);
-
- Direction(_clr,_DIRaiRemoveFlags);
- // call(AIchangeplayertoenemy);
-
- call(AIupdateAIvars);
- if(aivisiontoggle==0)
- {
- call(AIcheckfortarget,10);
- }
-
- if(VAItargetfound==_AIenemy)
- {
- print("Satan found a victim");
- call(AIselecttarget,_AIenemy);
- }
-
- if(VAIhastarget!=0 && VActorFlag!=_AFLAGattached)
- {
- print("Satan has target");
- call(AIPickdest,10); //follow path
-
- callsub(Sub_AI1WayAlignToTarget);
- if(VTrigger==_DIRleft)
- {
- print("Turning left");
- turn(0,-30,0);
- }
- elseif(VTrigger==_DIRright)
- {
- print("Turning right");
- turn(0,30,0);
- }
-
- if(VTargetAngle<100 && VTargetAngle>-100)
- {
- Direction(_or,_DIRforward);
- }
-
- }
-
- }
-