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.