Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Well, i have some idea of what type of soldier you wanna create. If ididn't understood wrong, you basically want to create an AI similar to DOOM from 1993. But how that AI is made and works will depend of how you are making your game. There is not a 'universal' AI that works in al games (at least not drag and drop).I am not an expert but. I can try to give you a hand. Can you share something about the game you are creating?  Not plot or lore if not' needed, but in design. How the enemies should  behave exactly?  Are you expecting to use the NPC pathfinding from this game? should the enemies 'hear' the player? are the levels linear like... Max Payne 1 or semi open like DOOM or Duke Nukem 3D? I can try to pinpoint some directions or if you want a piece of code  transformed in an action/behaviour script i can try to make it for you.

Sure, it's a linear game like Max Payne etc, i want enemies to hear player just like you said, i want them to take cover by moving to a waypoint, so for example when player enters and shoots, some of them should take cover at a waypoint node, while others directly fire, when player decides to just run away, i want enemies to not lose the player by running into  unnecessay walls, they should follow pathnodes in respect  to where player went, and attack them, similar to how the characters move to certain pathnodes in your Coppersons.ccb, I would like the code if it wouldn't be a burden to you :)

Yeah, and no. The thing is, it's not a matter of burden. Even using AI like chatGPT, a system like the one you're describing takes months to build. In the best-case scenario, it could take two months (and I'd be being extremely optimistic with that number). You don't want a simple script, but a more complete system. :-/ I can try to guide you, or as I said, by writing small, specific pieces of code, like generating random numbers or calculating distances. Now, if you're looking for me to build the entire system for you, well, not for free, sorry.

Can I suggest you make the enemies more limited? For example, I might make an action/shooter game in Coppercube in the future, but I was thinking of making the enemies stay in position (not move) and always facing the direction the playable character has to pass, as if 'waiting' for them.

Making video-games is like making illusions, you don't need to create smart NPC's, but make them look smart. :-) 

i believe so, no need to worry about making the screipt then, its not much of a necessity though, Sven (i dont know if you know him CopperCube AI (take cover) by 5v3n) has done something similar, only problem is that the enemies have snappy rotations from one path node to another, and i think they only attack a TPS Actor he made, if they were smoother , it would be better :)

but yeah,you are right, creating the illusion too might help!

looking forward to your shooting game 😁

Oh, that's better. I check the link you gave me. I think the problem is inside 'behavior_svcAI100.js' If you open the file (you can use notepad)  go to 'Edit-Search' type '//smooth rotation' you should reach these lines: 


    MoveAI(this.AI,AIpos,waypointPos,this.MoveSpeed*Delta); //not smooth rotation

    //MoveToNPC(this.AI,waypointPos,this.MoveSpeed*Delta ,Delta/3); //smooth rotation #######################SMOOT ROTATE

 The // before MoveToNPC is to comment that line (basically deactivating it). You could try commending MoveAI (just type // before it) and uncomment MoveToNPC, i think it's only there where you have to make that change. (Only uncomment the first couple of / not the part: '//smooth rotation')


'i think they only attack a TPS Actor he made' I think you have to indicate the player character in the behaviour, in the 'PLAYER' slot. I think another problem i may be present is if the player is too small. Try to scale it to the size of coppercube's prefab character. 

Hope it may help. :-)

Oh thanks!!