Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make NPC's attack eachother.
Author Message
Jonaleth
Apprentice
*

Posts: 42
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #1
Make NPC's attack eachother.
I've problems in scripting monsters to attack eachother. I want npc's to act aggressive towards eachother. For example; I want earth elementals to be friendly to all creatures but orcs and ogres.

I've tried to use on=@NPCSEECHAR trigger, but I think it only triggers with PC and not NPC. I know of the method of using beserk brain, and make him not attack all others but orcs and ogres, but I thought that it might excist an easier way?

Thank you for your help!
04-24-2012 08:16 PM
Find all posts by this user Like Post Quote this message in a reply
Nachtmusique
Journeyman
*

Posts: 89
Likes Given: 0
Likes Received: 6 in 6 posts
Joined: Mar 2012
Reputation: 0



Post: #2
RE: Make NPC's attack eachother.
Npcseechar does work with other npcs. It's been a while, but I think it was as simple as:

On=@npcseechar
If (your checks here)
Attack
Endif

I think one problem I did have
was that a lot of npcs were too smart to fight. They would see the enemy and flee instead of attacking.
04-24-2012 10:43 PM
Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #3
RE: Make NPC's attack eachother.
also check Monsterfight in sphere.ini
04-25-2012 12:50 AM
Find all posts by this user Like Post Quote this message in a reply
Jonaleth
Apprentice
*

Posts: 42
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #4
RE: Make NPC's attack eachother.
Hello again.

This is what I've done, that didn't work;

ON=@NpcSeeChar
If <src.tag0.orc> == 1
ATTACK
ELSE
RETURN 0
ENDIF

I've added tag0.orc=1 to all orcs and Monsterfight in sphere.ini is at 1. So I do not understand why this doesn't work, IF on=@NpcSeeChar works on other NPC's. I've to even use;

ON=@NpcSeeChar
Say Hello!

Still doesn't work. What can then be wrong?
04-25-2012 06:30 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #5
RE: Make NPC's attack eachother.
you have to turn on the trigger in your sphere.ini
04-25-2012 07:32 PM
Find all posts by this user Like Post Quote this message in a reply
Jonaleth
Apprentice
*

Posts: 42
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #6
RE: Make NPC's attack eachother.
@Admin Phoenix

You mean this option or is there any other option;

// Monsters may fight each other
MonsterFight=1

Still no change.
04-25-2012 08:35 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #7
RE: Make NPC's attack eachother.
sphere.ini check out EF_New_Triggers
04-25-2012 09:48 PM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #8
RE: Make NPC's attack eachother.
Did this resolve the issue?
04-29-2012 12:54 PM
Find all posts by this user Like Post Quote this message in a reply
Jonaleth
Apprentice
*

Posts: 42
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #9
RE: Make NPC's attack eachother.
Yes thank you! It solved the problem. :-)
04-29-2012 10:57 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)