Jump to content

AddForm and HasForm


cscottydont

Recommended Posts

I'm testing some random scripts.

I'm using a quest script to add a book to a leveled list. The problem is it doesn't always work for some reason.

When I add it to a custom list (0 chance of nothing, Use All checked) that I put into a custom container, the book always shows up.

If I add it to an existing list (I chose VendorGoldMisc so I could check the riverwood trader easily) with 0 chance of nothing, it only shows up sometimes.

 

Script

Scriptname csd_testquestscript extends Quest  

Book property spelltomedeadthrall auto
LeveledItem property csd_spelltomeLlist auto

Event OnInit()

RegisterforSingleUpdate(0.1)

EndEvent

Event OnUpdate()

csd_spelltomeLlist.AddForm(spelltomedeadthrall, 1, 1)

Debug.Notification("Form Added")

EndEvent

 

 

 

Random Grumble: HasForm doesn't work on Leveled Lists...grumble

Edited by cscottydont
Link to comment
Share on other sites

First guess: Is the existing list you're using a random list (ie a list of 'n' items from which some number less than 'n' entries are chosen?)
Link to comment
Share on other sites

No, that would only be if the 'Use All' box was checked.

Adding a second item to that list means that whenever it's called it picks one valid item at random from all items less than or equal to the player's level, and if called multiple times, it randomly picks an item each time rather than just returning multiples of the same item.

It's not very clear, I had to work it out for myself by trial and error. :)

Link to comment
Share on other sites

You're welcome. :thumbsup:

If we don't share information freely, the whole Modding community's going to be wasting a lot of time in duplicated effort that could be better spent making the games better. :D

Link to comment
Share on other sites

  • Recently Browsing   0 members

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