Jump to content

Can't get this script to work properly (Summoning rats)


Jjiinx

Recommended Posts

So I'm trying to add a new spell that summons a hoard of rats to fight for the player, for the most part is works, however, once the rats are summoned they are VERY aggressive, they even attack eachother. I've tried lowering the creature's agression both through the creature editor and through script and I've tried adding playerfaction and removing all factions, nothing seems to work...

 

Scriptname summonratswarm extends ActiveMagicEffect  


ACTORBASE PROPERTY rat AUTO
Faction Property PlayerFaction  Auto  

Actor rat1
Actor rat2
Actor rat3
Actor rat4
Actor rat5



EVENT onEffectStart(Actor akTarget, Actor akCaster)

		rat1 = akCaster.placeatme(rat, 1) as actor
		rat2 = akCaster.placeatme(rat, 1) as actor
		rat3 = akCaster.placeatme(rat, 1) as actor
		rat4 = akCaster.placeatme(rat, 1) as actor
		rat5 = akCaster.placeatme(rat, 1) as actor

endEVENT 


EVENT onEffectFinish(Actor akTarget, Actor akCaster) 
	
	rat1.disable()	
	rat2.disable()	
	rat3.disable()	
	rat4.disable()	
	rat5.disable()

endEVENT

 

Link to comment
Share on other sites

Why don't you use Summon Creature effect instead and set the Equip Ability to an ability which allows multiple rat summoning effect (through perk)

By the way, if you only disable the rats with the script, they will not get deleted and your save size will increase. About the aggression of the rats, did you set it to help friends and allies?

Link to comment
Share on other sites

and set the Equip Ability to an ability which allows multiple rat summoning effect (through perk)

Could you explain this in a little more detail? I have no idea how to do that T_T

 

Got it working, thanks a ton!

Edited by Jjiinx
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...