Jump to content
devildog664

After 288 AI spawns names run out. How would one fix?

Recommended Posts

Ill explain this as short as i can. So i have a script that spawns AI civilians at each town (One town at a time) get their name (using name _Unit) and other information and then logs it into a data array and then finally removes the units. This repeats for every valid location and needs to be done at the start of the mission to mostly get the name of the civilian but also other info as well. The problem is after 288 spawns the ai seem to run out of names so their names become "Error: No Vehicle" even though they do successfully spawn. My question is there a way to clear all names so they can just start to reuse them or something along the lines of that?

 

Better explanation. 

Process of events.

1. Mission starts

2. A town location is selected

3. A number of AI will spawn

4. Data from that AI just spawned will get gathered and logged

5. AI is deleted

6. Repeat steps 2-5 until all towns are done

7. Player get close to town and AI Spawn in based on logged data in step 4

Everything works perfect if the ai number is below 288. Once ai spawns hit 288 using the name command will return "Error: No Vehicle". How does one get around this.

 

Share this post


Link to post
Share on other sites

We are not naming the civilians i need to get the random names ai spawn with to make persistent AI. So example a civilian named Jon doe is logged at this town so when ever i come back to that town i get the ai data and names of ai who live there then spawn a civilian named Jon doe. Each town depending on its size has about 10-25 civilians that live there. The overall goal of this is because im making a bio metric scanner. Within the scanner you are able to look up names of civilians and get information on them. This all works and is really cool but unfortunately after 288 names it craps out. I hope that makes sense i feel like im bad at explaining these things. @wogz187

Share this post


Link to post
Share on other sites

That seems due to the hard coded limitation for nbr of groups on each side (see notes). As civilians are not grouped (by default), you create one group for each of them.

Usually, civilian life is spawned/de-spawned along with players' distances.

Share this post


Link to post
Share on other sites

@devildog664
@pierremgi,

Quote

As civilians are not grouped (by default)...


So make groups of civilians instead of individual units. Perhaps each town has 2-3 groups of known occupants.

 

Quote

I hope that makes sense i feel like im bad at explaining these things

It totally makes sense and it's a cool idea.

Share this post


Link to post
Share on other sites
5 minutes ago, pierremgi said:

That seems due to the hard coded limitation for nbr of groups on each side (see notes). As civilians are not grouped (by default), you create one group for each of them.

Usually, civilian life is spawned/de-spawned along with players' distances.

@pierremgiWithin my scripts civilian life is spawned/de-spawned along with players' distances. But when the mission starts i spawn AI in every town to get their information like their name and then delete them. Then when the player gets within range of the town the AI will spawn in based on the data gather at the beginning of the mission. This is also the same data the scanner uses. I will try making large groups but still think its something to do with the names generated for AI when they spawn in.

Share this post


Link to post
Share on other sites
53 minutes ago, devildog664 said:

How does one get around this.

Spawn AIs in the same group or use agents

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
7 minutes ago, killzone_kid said:

Spawn AIs in the same group or use agents

Thanks you the agent does work. Weird how that fixes the name issue would have honestly never of thought that. Again thanks everyone for quickly solving this issue for me.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×