• Npc ai
    300 replies, posted
[QUOTE=-TB-;14644347]Well I dont understand every bit of garrys mod seeing as how this is the first thing i've made, but im guessing it should be. [code]AI=GetConVar( "NPC_ai" ):GetBool()[/code] edit* well i dont know how to add a Concommand starting as true.[/QUOTE] You don't need the variable. [code]if GetConVar("NPC_ai"):GetBool() == true then ... end [/code]
[code]concommand.Add("NPC_ai")[/code] well if I just add this it's a nil value how do I make it start as true? I've just been reading the wiki and the way I did it was how it was on the wiki.
[QUOTE=-TB-;14644520][code]concommand.Add("NPC_ai")[/code] well if I just add this it's a nil value how do I make it start as true? I've just been reading the wiki and the way I did it was how it was on the wiki.[/QUOTE] That's because it's a conVar not a comCommand [code]CreateConVar( "NPC_ai", "1", { FCVAR_NOTIFY, FCVAR_ARCHIVE } ) [/code] There's more info on the Wiki: [url]http://wiki.garrysmod.com/wiki/?title=G.CreateConVar[/url]
Is it possible to make the rebels and combine use the rpg properly? I'm sick of the rebels always running 500ft away to shoot a rocket just to come closer, then farther (repeating)
thanks danharibo, that worked. [QUOTE=timmyboi;14644594]Is it possible to make the rebels and combine use the rpg properly? I'm sick of the rebels always running 500ft away to shoot a rocket just to come closer, then farther (repeating)[/QUOTE] Yup there sure is sorry i forgot to add rpg.
Sorry but I am not to experienced with LUA scripting but why does this make your performance drop? 10 FPS...seems pretty high to me. And considering I mostly use GMOD for NPC battles I don't know if this would be a logical update.
[QUOTE=Raserisk;14645506]Sorry but I am not to experienced with LUA scripting but why does this make your performance drop? 10 FPS...seems pretty high to me. And considering I mostly use GMOD for NPC battles I don't know if this would be a logical update.[/QUOTE] The reason it drops your FPS is because it's based on arithmetic.
[QUOTE=Raserisk;14645506]Sorry but I am not to experienced with LUA scripting but why does this make your performance drop? 10 FPS...seems pretty high to me. And considering I mostly use GMOD for NPC battles I don't know if this would be a logical update.[/QUOTE] Yes like i said its based on arithmetic which means, instead of the npc follow a set path pre-loaded by the server(nodes). This makes a path for the npc to follow no matter where you are so it has to do alot of calculations with math. And that fps drop was based on 10 rebels fighting 10 metro police. The more npcs and players the worse it will be and the less there is the less it will be affected.
[QUOTE=-TB-;14647617]Yes like i said its based on arithmetic which means, instead of the npc follow a set path pre-loaded by the server(nodes). This makes a path for the npc to follow no matter where you are so it has to do alot of calculations with math. And that fps drop was based on 10 rebels fighting 10 metro police. The more npcs and players the worse it will be and the less there is the less it will be affected.[/QUOTE] Can it be done so that you b4 you join the server it loads that arithmetic math thingy so u dont lagg while playing?lol
No because It has to calculate your position everytime you move.
AI without nodes? AWESOME! Time to test methinks.
Very nice! Just loaded up GM_Bigcity with it and the npc's don't suck balls anymore. Think you might be able to step it up a notch and add in npc squads and patrols?
[QUOTE=Duckmurderer;14651659]Very nice! Just loaded up GM_Bigcity with it and the npc's don't suck balls anymore. Think you might be able to step it up a notch and add in npc squads and patrols?[/QUOTE] Lol. Sure can, thanks for the suggestion.
I hope you can make this work with Striders too, they're my favorite when you can't run from them around a corner without having them following. :D Also I liked the song in the video. :3: Mind giving me the name?
[QUOTE=Mislum;14660726]I hope you can make this work with Striders too, they're my favorite when you can't run from them around a corner without having them following. :D Also I liked the song in the video. :3: Mind giving me the name?[/QUOTE] I don't know if I can make Striders work because I'm unsure of the animation to make them move because they use air nodes to move, just like the helicopters use. The song is Interlude by Attack Attack! it might also be called Intro
Ah. Understood. Well with the command toggle that you included in your post I can simply flick it off if it becomes a burden. By the way, with this addon do the NPCS still have that crappy distance thing? like for example, SQUAD A HERE <CLEAR OPEN DISTANCE> SQUAD B HERE They clearly can see each other but by the distance, until they step over the "imaginary boundry" they will start firing.
[QUOTE=Raserisk;14662149]Ah. Understood. Well with the command toggle that you included in your post I can simply flick it off if it becomes a burden. By the way, with this addon do the NPCS still have that crappy distance thing? like for example, SQUAD A HERE <CLEAR OPEN DISTANCE> SQUAD B HERE They clearly can see each other but by the distance, until they step over the "imaginary boundry" they will start firing.[/QUOTE] Well there is a distance, Cant change it, but if it were further it would be pointless because they have such bad accuracy. Garry if you read this I hope at some point you'll add a option to change npc spread.
So when is the next version coming? :D
Already finished the menu to disable and enable features fixed a few bugs and made performance a little better. Squads are almost finished and then ill release.
Ok there is a bug with squads im not sure how to fix this, but when the npc's try to follow their squad leaders and you're abit away they just shuffle their feet and move real slow, but if you walk up to them they start walking normal. And that just randomly happens sometimes they walk just fine. Edit* nvm fixed UPDATE 1.1 is now up. Enjoy! and don't forget to leave feedback (;
OMG DOOD!But, how to put squad leaders and squads anyways?lol
When I finally get Garry's mod 10 ill test this for sure, keep up the good work. BTW might it be possible to make the npc go cover behind a wall when they are pint down? or do they already do that :)
....I love you.
QUICK!!!!! PLZ FIXED THIS BUGS : and sorry for my bad eng i'm not an american 1.when i change and NPC Max Squad to 10 but they won't happen It can follow you only 4 rebels!!!!!!! 2.NPC not refresh when I change setting :( 3.and PLZ I hope you fixed this it wil be useful things
[QUOTE=Galion;14691108]QUICK!!!!! PLZ FIXED THIS BUGS : and sorry for my bad eng i'm not an american 1.when i change and NPC Max Squad to 10 but they won't happen It can follow you only 4 rebels!!!!!!! 2.NPC not refresh when I change setting :( 3.and PLZ I hope you fixed this it wil be useful things[/QUOTE] mmm? work for me and follow 10....
Good work. I'll try this out :)
[QUOTE=hole2score;14687876]OMG DOOD!But, how to put squad leaders and squads anyways?lol[/QUOTE] You dont they automaticly pick a squad leader. [QUOTE=Domistroy;14688050]When I finally get Garry's mod 10 ill test this for sure, keep up the good work. BTW might it be possible to make the npc go cover behind a wall when they are pint down? or do they already do that :)[/QUOTE] They already do this on a map with nodes, but as this is a addon for maps with out nodes. No they do not do this. I dunno if this will be added but ill try my hardest. [QUOTE=Galion;14691108]QUICK!!!!! PLZ FIXED THIS BUGS : and sorry for my bad eng i'm not an american 1.when i change and NPC Max Squad to 10 but they won't happen It can follow you only 4 rebels!!!!!!! 2.NPC not refresh when I change setting :( 3.and PLZ I hope you fixed this it wil be useful things[/QUOTE] I already said they do not refresh you have to respawn them. Onlt 4 rebels may follow you cause thats garrys mod squads try and run abit further and see if more follow you. Edit* weird the very first post got like half way deleted, but I fixed it. If it was a admin tell me what I did wrong please.
:kiddo::hf::fuckyou: This is a really cool addon and I hope you will keep developing new features to it.
Fantastic. You got my download sir and a SMILE!
Hi! Nice addon but hunters act pretty wierd O_O you should check it out: They simply come to you, they don't shoot flechettes. Edit: Same for antlion workers: they don't shoot acid. Your addon doesn't seem to like ep2 npcs. Edit2: I think you should make the npcs come in a range, not straight to you, then let the normal AI take control. That should solve the problem.
Sorry, you need to Log In to post a reply to this thread.