Jump to content
  • 0

Make mobs attack both players and monsters?


GreenMagic793

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Hello,

 

I have some custom mobs I've created that are essentially acting like fake players. They have player sprites, skills, etc. However, what I'd like to do is make it so that they will attack any mob they see, but also retaliate if attacked by a player.

 

I tried using event label 8 when setting up spawns, but unfortunately, all this does is make it such that my custom mobs attack monsters but sit there and do nothing when attacked by a player. I want the mobs to be able to attack humans as well as monsters, is this possible?

 

Any help is greatly appreciated. Thank you.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  354
  • Reputation:   108
  • Joined:  01/30/13
  • Last Seen:  

When I put a normal spawn with salve AI, the agressive monsters attack the players back, not tested with passive type.

Example:

map,x,y,xs,ys   monster    Name   ID,ammount,time1,time2,event,size,AI (-> If I put 1 the monster attack another monsters and help the players, but if you attack him, he attack you back)

glast_01,0,0,0,0    monster    Shaman    3987,2,9000,4500,1,0,1

 

The "Shaman" Monster is agressive and datector type.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Thanks for your reply.

 

So if I make my mob an aggressive type in the mob_db, and then spawn it with event label 1, this should work? Or am I misunderstanding.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  354
  • Reputation:   108
  • Joined:  01/30/13
  • Last Seen:  

Thanks for your reply.

 

So if I make my mob an aggressive type in the mob_db, and then spawn it with event label 1, this should work? Or am I misunderstanding.

 

I'm saiyng my example mob, he attack other monsters (like a summon slave) and ignore the players (but buff them if he can) if he's attacked be a player he'll counter. And He is agressive type.

 

But I not tested with passive-type mobs.

Edited by FXFreitas
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

I tried spawning my mob using your script but it doesn't work. If I make the mob aggressive (mode 133), he attacks the player without being attacked. If I'm understanding correctly, I need to use AI 1 and mode 133, but that combination only results in an aggressive mob, what am I missing? Thanks again for your input.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  354
  • Reputation:   108
  • Joined:  01/30/13
  • Last Seen:  

I'dont know why exactly, because here works ok, I'll take more tests.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

I'm still trying to get this to work if anyone is interested.

 

My main concept here is to create NPC's that look like human players that will go around the map attacking monsters like humans do, but when attacked by a human, will attack back. I've been successful in getting my mobs to attack each other, and to attack players, but not both. Kind of at a loss here, if this is even possible.

  • Like 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  354
  • Reputation:   108
  • Joined:  01/30/13
  • Last Seen:  

try Another mobAI (up to 7 i think) and check the result

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.

Guest
Answer this question...

×   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.

×
×
  • Create New...