Page 2 of 2

Re: Writing the result of a function on a scroll ?

Posted: Fri Nov 14, 2014 10:05 pm
by Blichew
I think you can't set values to object definitions dynamically as definitions load first with init.lua and other scripts and you're setting up the text waaaaaaaay later ingame (I think).

Have you tried setting up in the definition:

Code: Select all

ScrollText = "Sample text that will change later",
and as soon as the scroll is spawned change it via function. Let's assume it this way:

1. put skills_scroll_crom item in game and put it in the alcove. Give it id, like s_s_c_1
2. place floor trigger in front of the alcove.
3. connect floor trigger to function: updateSkillsScroll
4. Let this function have this line only:

Code: Select all

s_s_c_1.scrollitem:setScrollText(yourFunctionThatReturnsYourSkills())
this shoud work i think ... :)

Re: Writing the result of a function on a scroll ?

Posted: Fri Nov 14, 2014 11:06 pm
by cromcrom
Sure, there are ways, and thanks a lot for the tips, but it was easier in log1, for this particular thing. However, I am going for the onDrawGui hook, and have made some progress, so everythings are going allright, I kindof found a workaround. thank you again :-)