Forums Gallery Downloads LOGIN |REGISTER

making a AI spawnpoint that follows the PC

Seeking artificial intelligence? Waypoint queries? Post it here!


 

User avatar
dakkafex
Just getting started
Just getting started
 
Posts: 47
Member since: 07.09.2011, 10:24
Likes: 0

making a AI spawnpoint that follows the PC

Postby dakkafex » 10.12.2011, 05:59

so how could this be done, instead of making a whole load of different spawnpoints for the npc's on the map, make one following the player at a distance spawning x number of npc's at a set distance of the PC that will hunt you down
User avatar
Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 7

Re: making a AI spawnpoint that follows the PC

Postby Talvipakkanen » 10.12.2011, 11:21

Instead of utilizing spawnpoint, using "Entity:SpawnArchetype"-node included in FGPS is one possibility.

SpawnArchetype.jpg

In sample, algorithm used for calculating spawn position is somewhat rudimental, but there's many possible ways for doing it. Grunts are spawned when player triggers either of the area triggers, number of which can be unlimited.
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
cpt.ahab
Just getting started
Just getting started
 
Posts: 39
Member since: 28.11.2010, 14:18
Likes: 0

Re: making a AI spawnpoint that follows the PC

Postby cpt.ahab » 13.01.2012, 15:48

you sure this works for FreeSDK too?

i get this Error :[Warning] XML reader: Can't open file (game/Libs/EntityArchetypes/.xml)

some ideas?


thanks!
User avatar
Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 7

Re: making a AI spawnpoint that follows the PC

Postby Talvipakkanen » 13.01.2012, 18:13

Yep, SpawnArchetype works is FreeSDK too. I cannot say what's causing your error. Have you set up the archetype library as it should?
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
cpt.ahab
Just getting started
Just getting started
 
Posts: 39
Member since: 28.11.2010, 14:18
Likes: 0

Re: making a AI spawnpoint that follows the PC

Postby cpt.ahab » 15.01.2012, 18:01

Talvipakkanen wrote:Yep, SpawnArchetype works is FreeSDK too. I cannot say what's causing your error. Have you set up the archetype library as it should?



I added a new library.
i gave it a name.
Then i added a new Item and choose by Scripts---> Ai--->Grunt.
Anything else`?
I wrote the path in from the grunt into the Spawnarchetype box under Archetype.

?
User avatar
Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 7

Re: making a AI spawnpoint that follows the PC

Postby Talvipakkanen » 15.01.2012, 20:02

That's how it works for me. If there's spaces in the names of library or archetypes, it might cause problems.
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
cpt.ahab
Just getting started
Just getting started
 
Posts: 39
Member since: 28.11.2010, 14:18
Likes: 0

Re: making a AI spawnpoint that follows the PC

Postby cpt.ahab » 15.01.2012, 21:13

Talvipakkanen wrote:That's how it works for me. If there's spaces in the names of library or archetypes, it might cause problems.



Nope. No spaces.
User avatar
Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 7

Re: making a AI spawnpoint that follows the PC

Postby Talvipakkanen » 15.01.2012, 21:20

If you can attach your archetype library xml on the post, i'll take a look in it..
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
cpt.ahab
Just getting started
Just getting started
 
Posts: 39
Member since: 28.11.2010, 14:18
Likes: 0

Re: making a AI spawnpoint that follows the PC

Postby cpt.ahab » 16.01.2012, 16:00

Talvipakkanen wrote:If you can attach your archetype library xml on the post, i'll take a look in it..


I dont know why the editor or engine is trying to open .xml ? Why it doesnt try to open, in this case : Test.xml?

http://www.fileuploadx.de/815450
User avatar
Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 7

Re: making a AI spawnpoint that follows the PC

Postby Talvipakkanen » 16.01.2012, 16:52

Could you just attach the file in a post; link you posted leads to a spam site.
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
cpt.ahab
Just getting started
Just getting started
 
Posts: 39
Member since: 28.11.2010, 14:18
Likes: 0

Re: making a AI spawnpoint that follows the PC

Postby cpt.ahab » 16.01.2012, 17:09

Talvipakkanen wrote:Could you just attach the file in a post; link you posted leads to a spam site.


ok.
i must change it to txt, because xml isnt allowed.
Attachments
Test.txt
(2.11 KiB) Downloaded 105 times
User avatar
Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 7

Re: making a AI spawnpoint that follows the PC

Postby Talvipakkanen » 16.01.2012, 17:21

Thanks :)

File works fine and grunt is spawning as it should. Typo in archetype name detected  ;)

spawn_archetype_a.jpg
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
cpt.ahab
Just getting started
Just getting started
 
Posts: 39
Member since: 28.11.2010, 14:18
Likes: 0

Re: making a AI spawnpoint that follows the PC

Postby cpt.ahab » 16.01.2012, 17:35

Talvipakkanen wrote:Thanks :)

File works fine and grunt is spawning as it should. Typo in archetype name detected  ;)

spawn_archetype_a.jpg



Wow. i am getting crazy. i dont know why it doesnt open the correct XML-File. I think i try everything?! Its a bug or what? i think i will rebuild the hole flowgraph.
User avatar
Talvipakkanen
Executive Producer
Executive Producer
 
Posts: 4307
Member since: 16.06.2008, 22:11
Location: Oulu, Finland
Likes: 7

Re: making a AI spawnpoint that follows the PC

Postby Talvipakkanen » 16.01.2012, 17:39

If there's some other error in the flowgraphs? Picture about related nodes could be helpful.
Zip-line release 2012-04-24 (for CE2 & CE3) · C1 mod project: A mod called Entry
Assets · Blender: Destroyable object tutorial for CryBlend

- currently lost in New Eden -
cpt.ahab
Just getting started
Just getting started
 
Posts: 39
Member since: 28.11.2010, 14:18
Likes: 0

Re: making a AI spawnpoint that follows the PC

Postby cpt.ahab » 16.01.2012, 18:02

Talvipakkanen wrote:If there's some other error in the flowgraphs? Picture about related nodes could be helpful.



Perhaps, that can help you.
Attachments
FG.png


 
Connect and collaborate with CRYENGINE developers in the official Forums.
Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
Community