View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Beginner BeginnerMember since: 07.09.2011, 10:24Posts: 47 Likes: 0
 

 Post Topic: making a AI spawnpoint that follows the PC
PostPosted 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   24/7 Modder 24/7 ModderMember since: 16.06.2008, 22:11Posts: 4307Location: Oulu, Finland Likes: 7
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 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 -
  Beginner BeginnerMember since: 28.11.2010, 14:18Posts: 39 Likes: 0
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 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   24/7 Modder 24/7 ModderMember since: 16.06.2008, 22:11Posts: 4307Location: Oulu, Finland Likes: 7
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 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 -
  Beginner BeginnerMember since: 28.11.2010, 14:18Posts: 39 Likes: 0
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 15.01.2012, 18:01 
Quote by Talvipakkanen:
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   24/7 Modder 24/7 ModderMember since: 16.06.2008, 22:11Posts: 4307Location: Oulu, Finland Likes: 7
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 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 -
  Beginner BeginnerMember since: 28.11.2010, 14:18Posts: 39 Likes: 0
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 15.01.2012, 21:13 
Quote by Talvipakkanen:
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   24/7 Modder 24/7 ModderMember since: 16.06.2008, 22:11Posts: 4307Location: Oulu, Finland Likes: 7
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 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 -
  Beginner BeginnerMember since: 28.11.2010, 14:18Posts: 39 Likes: 0
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 16.01.2012, 16:00 
Quote by Talvipakkanen:
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   24/7 Modder 24/7 ModderMember since: 16.06.2008, 22:11Posts: 4307Location: Oulu, Finland Likes: 7
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 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 -
  Beginner BeginnerMember since: 28.11.2010, 14:18Posts: 39 Likes: 0
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 16.01.2012, 17:09 
Quote by Talvipakkanen:
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 102 times
User avatar   24/7 Modder 24/7 ModderMember since: 16.06.2008, 22:11Posts: 4307Location: Oulu, Finland Likes: 7
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 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 -
  Beginner BeginnerMember since: 28.11.2010, 14:18Posts: 39 Likes: 0
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 16.01.2012, 17:35 
Quote by Talvipakkanen:
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   24/7 Modder 24/7 ModderMember since: 16.06.2008, 22:11Posts: 4307Location: Oulu, Finland Likes: 7
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 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 -
  Beginner BeginnerMember since: 28.11.2010, 14:18Posts: 39 Likes: 0
 

 Post Topic: Re: making a AI spawnpoint that follows the PC
PostPosted 16.01.2012, 18:02 
Quote by Talvipakkanen:
If there's some other error in the flowgraphs? Picture about related nodes could be helpful.



Perhaps, that can help you.
Attachments:

FG.png