Trying to make a skeever horde mod, but it's not working.

Post » Tue Jun 19, 2012 4:42 am

The mod idea is to shrink and weaken the Skeevers and whenever a Skeever spawns: a script generates a random number out of 10, if the generated number is 7 or less then it spawns another Skeever near the original one, the new Skeever also runs the same script and it continues until the random number generated is 8, 9, or 10, thus creating a random horde of Skeevers.

Basically so far I've created a quest that auto starts with the attached script:

Scriptname aaSkeeverSwarm  extends QuestActorBase Property EncSkeever  AutoObjectReference selfRefint randomEvent OnLoad()random = Utility.RandomInt(10)if(random <= 7)  selfRef.PlaceAtMe(EncSkeever)endifendEvent

The script itself says it has no errors, but it just doesn't work... I'm probably doing something very wrong xD
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Tue Jun 19, 2012 6:26 am

Anyone know what I'm doing wrong, or if this mod is even possible?
User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm

Post » Tue Jun 19, 2012 8:34 am

Does it spawn just one skeever or none? If it spawns one try put the if statement in a loop.
(I havent scripted anything myself yet just a thought)
User avatar
Bee Baby
 
Posts: 3450
Joined: Sun Jun 18, 2006 4:47 am

Post » Mon Jun 18, 2012 7:06 pm

Does it spawn just one skeever or none? If it spawns one try put the if statement in a loop.
(I havent scripted anything myself yet just a thought)

It doesn't spawn any, to test the mod I open the console and type "player.placeatme 23ab7" which is the command to load a skeever at your feet, but only one ever spawns, as if the script does absolutely nothing.
User avatar
Emily Shackleton
 
Posts: 3535
Joined: Sun Feb 11, 2007 12:36 am

Post » Tue Jun 19, 2012 2:16 am

Using PlaceAtMe will cause some serious save game bloat. As for your script, selfRef needs to be a property. Also are you sure this needs to be a quest script?
User avatar
He got the
 
Posts: 3399
Joined: Sat Nov 17, 2007 12:19 pm

Post » Tue Jun 19, 2012 4:09 am

Don't think OnLoad is available to quests- if you check the definition, it refers to when an item's art is loaded. OnInit is probably what you want.
User avatar
Richus Dude
 
Posts: 3381
Joined: Fri Jun 16, 2006 1:17 am

Post » Tue Jun 19, 2012 12:52 am

Also are you sure this needs to be a quest script?

How else would I do it? I can't attach a script directly to the skeever for some reason, so I'm not sure how it would work without a quest script
User avatar
Lovingly
 
Posts: 3414
Joined: Fri Sep 15, 2006 6:36 am


Return to V - Skyrim