Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Help with AI in MP
Help with AI in MP
2009-06-26, 6:24 PM #1
I am making a MP level for MotS with AI in it using the " AI - MP Enemy Generator " cog found on this site
For some reason, I am experiencing problems including

1- more AI are spawning into the map than are suposed to
2- some AI are invisible to clients (the rancor for example)

The next are linked (I think)

3- some AI are spawning in huge quanity and are only visible to clients
4- out of #3's some are invincible

If anyone can help or is having the same problem , please post
"The quality of the levels you make is determined by the skill of the person not by the editor in which they use!"-Michael Kyle
Ogel's City
2009-07-11, 8:30 PM #2
A thought occured to me is there a way to make the AI - Synched cog non client\server . [/SIZE]
"The quality of the levels you make is determined by the skill of the person not by the editor in which they use!"-Michael Kyle
Ogel's City
2009-07-19, 5:57 AM #3
That'd defeat the purpose...
2009-07-19, 8:46 PM #4
I don't realy know how cogs work. Could you please explain?

Or is there a way to make it simpler to use (A.K.A. Less flags)
"The quality of the levels you make is determined by the skill of the person not by the editor in which they use!"-Michael Kyle
Ogel's City
2009-07-20, 10:28 AM #5
I'm not good with writing cogs, so your best bet is to wait around for someone like GBK or Emon to show up.

However, part of the problem looks like that your first cog creates spawns based off of the local player position.

Code:
distance = VectorDist(GetThingPos(generator_pos), GetThingPos(GetLocalPlayerThing()));
My understanding is that each player would be seen by the cog as a local player. As soon as one of the players was within range, it would start generating one set of enemies at the generator_pos location.

It looks like it counts the enemies to see if it has created the right number, but it does this locally for each client who comes within range (but only those clients). So, this could explain 1 and part of 2, 3, & 4 as well.

Perhaps removing "local" from beside the "int enemy local" variable? That might fix the spawning issue. However, you will still be left with the sync issue. The two cogs may have to be combined with the enemy generator being a function called by the AI - Sync cog.

Again, this is speculation and you'll have to wait for an expert to confirm or correct me. Maybe this'll get you moving in the right direction...or at least some direction.
2009-07-28, 7:33 AM #6
Thank for the help Alco.

I have never really looked inside a cog befor untill now. I understand what you said but when I whent to implement it in to the cog , I got compleatly lost.

I also tried to use the AI - Sync cog but coludent get it to work.

Also, I and almost done with the map, would you like to beta test it for me.
"The quality of the levels you make is determined by the skill of the person not by the editor in which they use!"-Michael Kyle
Ogel's City
2010-04-05, 8:04 PM #7
OK its been almost a year now and i havent gotten Synced AI working, and am wondering. how hard would it be to create a client side to the EnemyGenorator .cog and change the spawning from local to a timed respaawn after the AI's death?

It would be nice to be able to asign teams to the AI as well (stormies on team 1 and Rebels on team 2) but this is compleatly unessisay if it cant be done.

As always, any help would be appreashiated.

Thank you,
Ogel45
"The quality of the levels you make is determined by the skill of the person not by the editor in which they use!"-Michael Kyle
Ogel's City
2010-05-18, 9:17 PM #8
I read your post and I could almost help you with cog files, but Im not really all that great, I have only been able to modify slightly some of them or altered a few parameters within the file. I think if you PM someone like Emon, Xzero, or a member on JKhub called Edward, if you could get in contact with him somehow, he has created alot of Cog files that blew my mind. Sorry thats all the suggestions I have.
He who controls the spice controls the universe-

↑ Up to the top!