Jump to content

[LE] Scripting a spell to summon a group of creatures?


Recommended Posts

As the title says, I'm trying to create a spell that can summon a group of creatures where it is cast.

 

I've tried using similar spells such as Conjure Atronach for reference, but they don't have scripts to them.

 

My current code compiles, but it's empty and won't have any effect.

Scriptname Summon extends activemagiceffect  
{Trying to summon a random group of creatures.}
GlobalVariable Property SummonIndex Auto
 
Event OnEffectFinish(Actor Target, Actor Caster)
    SummonIndex.SetValue(Utility.RandomInt(0, 3) as Float)
    ; Possible output: 0 1 2 3
EndEvent

This code is valid, but I can't get it to allow for the random variable defines. It can't take any if/then or do/while statements without creating circular errors which define the if/then itself as the problem.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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