Question GSC spawning NPC AI on single player.

ing32

New Member
Messages
3
Reaction score
1
Points
3
Hello. I've been recently trying to spawn NPC AI on my single player campaign, and I managed to do it with a gsc file I've found online:
1593361334581.png

However, my 1st question is:
I want to read the array, but I can't use println for that. How can I read the array and see the list of the NPCs?

My 2nd question is:
I want to spawn only ALLIES as NPCs, (No civils/neutrals, no enemies) but with the code showed above I can only spawn a random number from my array (which I can't see ... ). How can I make it spawn allied NPCs?

I am using a mod loader fixed from P!x and a test script you can find
Please, Log in or Register to view URLs content!
.
Ty for reading and I hope you have an answer!
 

P!X

Head Moderator
Staff member
Head Staff Team
Messages
408
Reaction score
577
Points
878
I searched them manually just using .classname & .targetname
Please, Log in or Register to view URLs content!
 
Messages
12
Reaction score
2
Points
8
Don't mean to bump but this is for someone who might be searching for this

To spawn only allies, replace spawners = GetSpawnerArray(); with spawners = GetSpawnerTeamArray( "allies" );
 

P!X

Head Moderator
Staff member
Head Staff Team
Messages
408
Reaction score
577
Points
878
Don't mean to bump but this is for someone who might be searching for this

To spawn only allies, replace spawners = GetSpawnerArray(); with spawners = GetSpawnerTeamArray( "allies" );
not every mission/map has allies
 
Top