Jump to content

MonsterAI prefab


Gamer4Life
 Share

Recommended Posts

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?

Link to comment
Share on other sites

i beliebe the monsterai using a state, u can put it at postrender function on screen to see what he want do.

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

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.

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

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?

Link to comment
Share on other sites

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.

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

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...