Scripting Help?

Post » Fri Apr 30, 2010 7:34 am

I've been trying to make a mod where you have a guardian for a short time. I've got everything set up except for how to make the guardian attack your enemies. I was testing on both guards and bandits and he (the guardian) started attacking the bandits right away because they are inherently aggressive. However, I had to attack the guard first in order for him to want to attack me. This is where I start running into problems. I get attacked by the guard, yet my guardian does not protect me. Why? I turned the guardian's aggression to 5, but he doesn't attack the guard.

Can anyone help me?
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am

Post » Fri Apr 30, 2010 2:36 pm

I've been trying to make a mod where you have a guardian for a short time. I've got everything set up except for how to make the guardian attack your enemies. I was testing on both guards and bandits and he (the guardian) started attacking the bandits right away because they are inherently aggressive. However, I had to attack the guard first in order for him to want to attack me. This is where I start running into problems. I get attacked by the guard, yet my guardian does not protect me. Why? I turned the guardian's aggression to 5, but he doesn't attack the guard.

Can anyone help me?

The Guardian's Aggression is to low for him to attack a guard. Try setting it to 18.
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm

Post » Fri Apr 30, 2010 4:54 pm

Hah! Some NPCs just wont attack your enemies no matter how high you set their aggression. ( or course I mean they are in follow mode )

I had to give them a scripted ability that monitors the players crosshair ref (OBSE), checks if it is an NPC and if it is hostile towards the player -> if so .. my NPC with the attached scipted ability attacked my attacker.
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am


Return to IV - Oblivion