Data Realms Fan Forums
http://forums.datarealms.com/

How to check for enemy brain?
http://forums.datarealms.com/viewtopic.php?f=73&t=31466
Page 1 of 1

Author:  MafiaPuppet [ Thu Jul 19, 2012 8:55 am ]
Post subject:  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.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/