Gamer4Life Posted January 5, 2015 Share Posted January 5, 2015 I read a lot of blogs and your responses to peoples problems that they had before asking about this. I am using both the fpsprefap character and the monster prefab with the AI script built in. Placing both on the map the monster didn't move. I then added the NavMesh and now the monster activates and runs, but he seems flawed for some reason. He runs only to the location the character first stood when the programs first started running. He won't aggro or do anything but run in place at that location until i get right in his face then he aggros and starts attacking me. What might be happening / what do i need to change to have him search/follow to attack specific targets from all the way across a map even if they have moved after that game has started? Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 5, 2015 Share Posted January 5, 2015 Do you have a navmesh calculated for your map? They only navigate through navmeshes. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
MarkusR Posted January 5, 2015 Share Posted January 5, 2015 i beliebe the monsterai using a state, u can put it at postrender function on screen to see what he want do. Quote PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
Gamer4Life Posted January 5, 2015 Author Share Posted January 5, 2015 I just clicked the build Navmesh tool. I have massive terrain all over my map. The NavMesh seems to auto build itself based on the terrain so i'm not sure how much i can effect it to be any different... Quote Link to comment Share on other sites More sharing options...
macklebee Posted January 5, 2015 Share Posted January 5, 2015 I assume you are putting the player in as the target in the properties dialog. The target is intended for something like a waypoint pivot that the monster can actually reach. If you put the player as the target then move the player, the monster will do as you have described. So either put a static waypoint in as the target or just leave it blank and the monster will follow the player around the map. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Gamer4Life Posted January 5, 2015 Author Share Posted January 5, 2015 So very wise. That was indeed my flaw. Thank you so much haha that has been really irritating me. Removed player from target and works as advertised. Quote Link to comment Share on other sites More sharing options...
Gamer4Life Posted January 5, 2015 Author Share Posted January 5, 2015 New issue that rose up when i was testing the MonsterAI, the monster will not start running at me unless there is a line of sight, so if he is spawned on the other side of a hill; the monster will not aggro me and start moving unless he sees me over the hill. Is there something i can do or change in the monsterAI.script or a setting that needs changed to have him immediately target and run to the target to kill it no matter where it is? Quote Link to comment Share on other sites More sharing options...
macklebee Posted January 6, 2015 Share Posted January 6, 2015 Not without changing code as the monsterAI script uses a raycast to determine line of sight to the player. Another option is to do what the 'AI and Events' map shows and create an object as a waypoint target that would bring the monster within line of sight of the player. So basically just as you did before, place an object into the 'Target' of the property dialog. If you use a CSG object make sure that it either has mass or a script attached or it will not work due to being collapsed into the scene. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
MaybeMe Posted January 10, 2015 Share Posted January 10, 2015 New issue that rose up when i was testing the MonsterAI, the monster will not start running at me unless there is a line of sight, so if he is spawned on the other side of a hill; the monster will not aggro me and start moving unless he sees me over the hill. Is there something i can do or change in the monsterAI.script or a setting that needs changed to have him immediately target and run to the target to kill it no matter where it is? It is possible to have him go to a way point, say the top of the hill, where he will then have line of sight and attack the player. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.