View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:28 am



Reply to topic  [ 1 post ] 
 How to check for enemy brain? 
Author Message

Joined: Fri Jul 13, 2012 9:54 am
Posts: 15
Reply with quote
Post How to check for enemy brain?
I added this into the Crobotech mod so that some of my actors spawn on brain hunt instead of sentry....

Code:
   if weps[1].PresetName == "ASSLT: Ballistic Rifle" then
      newactor.AIMode = Actor.AIMODE_BRAINHUNT;
      end
   if weps[1].PresetName == "ASSLT: Ballistic Pistol" then
      newactor.AIMode = Actor.AIMODE_BRAINHUNT;
      end
   if weps[1].PresetName == "ENRGY: Energy Rifle" then
      newactor.AIMode = Actor.AIMODE_BRAINHUNT;
      end
   if weps[1].PresetName == "ENRGY: Energy Pistol" then
      newactor.AIMode = Actor.AIMODE_BRAINHUNT;
      end
   if weps[1].PresetName == "GTLNG: Gatling Cannon" then
      newactor.AIMode = Actor.AIMODE_SENTRY;
      end
   if weps[1].PresetName == "SUPRT: Laser Cannon" then
      newactor.AIMode = Actor.AIMODE_SENTRY;
      end
   if weps[1].PresetName == "ASSLT: Machine Gun" then
      newactor.AIMode = Actor.AIMODE_BRAINHUNT;
      end
   if weps[1].PresetName == "ENRGY: Plasma Gun" then
      newactor.AIMode = Actor.AIMODE_BRAINHUNT;
      end
   if weps[1].PresetName == "EXPLO: Rocket Launcher" then
      newactor.AIMode = Actor.AIMODE_SENTRY;
      end
   if weps[1].PresetName == "EXPLO: Rocket Propelled Grenade" then
      newactor.AIMode = Actor.AIMODE_SENTRY;
      end
   if weps[1].PresetName == "CLOSE: High Velocity Shotgun" then
      newactor.AIMode = Actor.AIMODE_BRAINHUNT;
      end
   if weps[1].PresetName == "SUPRT: Particle Disruption Rifle" then
      newactor.AIMode = Actor.AIMODE_SENTRY;
      end


But it only works when there is an enemy brain. So I want to add the condition that an enemy brain exists otherwise sentry, but I don't know the command to check for enemy brains.


Thu Jul 19, 2012 8:55 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.059s | 13 Queries | GZIP : Off ]