Jump to content

Creation Kit Help - Way to Count Number of Actors in Radius?


Scarecrow

Recommended Posts

Posted

I'm trying to force a follower to use an AOE Reanimate spell whenever a certain number of dead actors are around him.

 

Is there a way to count how many actors are within a certain radius from a target (dead or alive)? I'd be happy to know of any way I could do this in the Creation Kit or through scripting, but I am trying to get this done specifically using Conditions, so if anyone has any ideas, they are welcome.

 

 

Posted

You can do this with scripts (heavy or light but you need some.)

 

Option 1: Use a cell scan. A little bit heavy but stable. Does not work well in exterior cells close to the border of the cells.

Option 2: Use a light cloak spell to count the actors around (light on scripting but may be heavy on the game engine)

Option 3: Use aliases that will auto fill (you will not have the perfect results but probably it is the lightest option)

 

In all cases you need to store somewhere the "count", and you need a script for that.

You can store it as conditional property in your main quest, in this case you can condition your packages with this script variable.

 

Posted

You can do this with scripts (heavy or light but you need some.)

 

Option 1: Use a cell scan. A little bit heavy but stable. Does not work well in exterior cells close to the border of the cells.

Option 2: Use a light cloak spell to count the actors around (light on scripting but may be heavy on the game engine)

Option 3: Use aliases that will auto fill (you will not have the perfect results but probably it is the lightest option)

 

In all cases you need to store somewhere the "count", and you need a script for that.

You can store it as conditional property in your main quest, in this case you can condition your packages with this script variable.

 

I tried to do a cloak spell that increments a conditional variable in a conditional script I put in a Reference Alias of the follower, but in the package, if I select the refalias as the target under the getvmscriptvariable condition, it doesn't show any variables. Am I doing something wrong?

Posted

 

I tried to do a cloak spell that increments a conditional variable in a conditional script I put in a Reference Alias of the follower, but in the package, if I select the refalias as the target under the getvmscriptvariable condition, it doesn't show any variables. Am I doing something wrong?

 

 

ReferenceAliases are not updated real time.

So if it is conditioned in some way, it is checked (about) once. Then whatever the result was, it is stored, also if the variable changes its value.

You need to stop/reset/start the quest again to see the value to be re-calculated.

Posted

If you need further help, just ask.

 

I just completed a part of one of my mods to have it to scan the actors around the player in 3 different ways: cell scan, alias, and cloak.

I think I get some experience on it.

Including some performance analysis.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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