Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Dark AI Question

Author
Message
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 9th May 2011 16:06
Hey guys. Just wondering if I give an entity a start script to add as ally and the alwaysactive command and I have another entity in team 2, will that cause the entity on my side to auto target team 2 or do I need a settarget command somewhere? (Of course I have to add all of the shooting and stuff) Thanks.


Cheers.

God help me, Please.
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 10th May 2011 15:35
Anyone?

God help me, Please.
Anigma
13
Years of Service
User Offline
Joined: 25th Mar 2011
Location:
Posted: 10th May 2011 15:53
In looking at Errant's scripts that shipped with MP53, it looks to me like you need to do 2 things - first, you use aiaddenemy and aiaddally to set who is friend or foe, then aiaddteam to let the entity know which team it's on. Here's an example from one of Errant's startup scripts:



In the above example, when the script runs, the first thing that happens is the entity is told that teams are 1,4 and 6 are enemies, team 3 is neutral and team 5 is an ally of team 2, then it's assigned to team 2 before the state is switched to 1 and the main script is run.

Hopefully that should get you started.

It compiled! Ship it!
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 10th May 2011 16:07 Edited at: 10th May 2011 16:08
Quote: ";//Team 2 (Enemy team)
:state=0:aiaddenemy=2 1|4|6,aiaddneutral=2 3,aiaddally=2 5

;//Start & Team Settings
:state=0:state=1,addaiteam=2
:state=1:state=2,runfpidefault=1"


Ok thanks for that. That aiaddenemy comand and add ally command... the 1,4,6 are enemies but how do I set up an entity with numbers? This command are some of the few that I never understood. I DO know that X(which in this case is 2) is the team number. Wait! So is everyone in team 1,4,6 an ally to team 2? Or do I have this wrong? Also, the "ai" part at the beginning of the commands... is that needed, because in some manuals I found that they cut off the "ai" part in the example. Anyways, Thank You for your response. Yet does this mean that they must be controlled by the Dark AI or can I controll them? (Do I need the aialwaysactive command for team to work?) I'd rather control them. But, this will make them an automatic target, right? Either way, thanks.


Cheers.

God help me, Please.
Anigma
13
Years of Service
User Offline
Joined: 25th Mar 2011
Location:
Posted: 11th May 2011 08:54
Quote: "Wait! So is everyone in team 1,4,6 an ally to team 2?"


Nope, quite the opposite actually! 1,4 and 6 are enemies of team 2 if that statement is run.

Quote: "Also, the "ai" part at the beginning of the commands... is that needed, because in some manuals I found that they cut off the "ai" part in the example."


Hmmm... not sure there, I've only had luck using the commands in the way Errant did it.

Quote: " Yet does this mean that they must be controlled by the Dark AI or can I controll them?"


They will be under dark ai control, but you can still exert some control over them if you stick to dark ai commands.

Quote: "Do I need the aialwaysactive command for team to work?"


Looks like so (looking at Errant's scripts as a reference) but you want to do that in main, not appear. Maybe not though. Experiment and see. I haven't had the time to delve into it properly just yet.

Quote: "But, this will make them an automatic target, right?"


Yep. And they will automatically go after the player as well.

It compiled! Ship it!
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 11th May 2011 15:26
@Anigma
Ok, thanks for all of your help.


Cheers.

God help me, Please.

Login to post a reply

Server time is: 2024-11-24 08:44:02
Your offset time is: 2024-11-24 08:44:02