View unanswered posts | View active topics It is currently Thu Apr 18, 2024 8:32 am



Reply to topic  [ 4 posts ] 
 Actor.AIMODE_BRAINDEAD 
Author Message
User avatar

Joined: Mon May 18, 2009 11:48 pm
Posts: 205
Location: The swamps of Stuporia!
Reply with quote
Post Actor.AIMODE_BRAINDEAD
I've been trying to spawn enemies with the brainhunt AIMode, but the command itself seems unresponsive. I know there's something I'm missing because I've made it work once before. The problem is that to my eyes, I've copied the code exactly as it was in the working example and it stubbornly insists on the enemies standing around in sentry mode. Here's an example of my code when I'm creating the enemy:

Code:
example = CreateAHuman("Ima Example", "Example.rte");
chip = CreateHeldDevice("Control Chip","Base.rte");
example:AddInventoryItem(chip);
example.Team = 1;
example.Pos = Vector(2885, 710);
MovableMan:AddActor(example);
example.AIMode = Actor.AIMODE_BRAINHUNT;


I have no instances that send his AIMode back to sentry because every single instance of the enemy in the mission is sent to brainhunt. Other lesser enemies are sharing his curse, too.


Wed Jun 10, 2009 3:31 am
Profile YIM
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Actor.AIMODE_BRAINDEAD
Code:
         local zombie1 = CreateAHuman(zlist[math.random(#zlist)]);
         zombie1:AddAISceneWaypoint(Vector(3000,playerActor.Pos.Y));
         zombie1.Pos = Vector(400,850);
         zombie1.Team = 0;
         zombie1.AIMode = Actor.AIMODE_GOTO;
         zombie1:AddInventoryItem(CreateHDFirearm(wlist[math.random(#wlist)]));
         zombie1:AddInventoryItem(CreateTDExplosive(blist[math.random(#blist)]));
         MovableMan:AddActor(zombie1);


I got nothin', cause the above works fine.


Wed Jun 10, 2009 3:34 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Actor.AIMODE_BRAINDEAD
AgentBaron wrote:
I've been trying to spawn enemies with the brainhunt AIMode, but the command itself seems unresponsive. I know there's something I'm missing because I've made it work once before. The problem is that to my eyes, I've copied the code exactly as it was in the working example and it stubbornly insists on the enemies standing around in sentry mode. Here's an example of my code when I'm creating the enemy:

Code:
example = CreateAHuman("Ima Example", "Example.rte");
chip = CreateHeldDevice("Control Chip","Base.rte");
example:AddInventoryItem(chip);
example.Team = 1;
example.Pos = Vector(2885, 710);
MovableMan:AddActor(example);
example.AIMode = Actor.AIMODE_BRAINHUNT;


I have no instances that send his AIMode back to sentry because every single instance of the enemy in the mission is sent to brainhunt. Other lesser enemies are sharing his curse, too.


Just have goto and set the brain as the waypoint.


Wed Jun 10, 2009 3:55 am
Profile
User avatar

Joined: Mon May 18, 2009 11:48 pm
Posts: 205
Location: The swamps of Stuporia!
Reply with quote
Post Re: Actor.AIMODE_BRAINDEAD
I was thinking of that, and I may do it as a last resort. The only problem is that the "brain" in this case is Dafred, and if the enemies (particularly the major one) reach him, they'll stop and revert to sentry behavior. Though I suppose that wouldn't be too much of an issue... I'll check that out, thanks.

EDIT: Ah ha! I figured it out. Brainhunt mode must automatically set waypoints for units in the Brains group. But since I set the brain to a non-Brain unit... they had nothing to waypoint. So I set the waypoints for them along with a timer that auto-updates every second to to Dafred's position.

Thanks, guys! I'm quite close to having a working scene ready to release.


Wed Jun 10, 2009 4:03 am
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.040s | 15 Queries | GZIP : Off ]