Re: Writing the result of a function on a scroll ?
Posted: Fri Nov 14, 2014 10:05 pm
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:
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:
this shoud work i think ... ![Smile :)](./images/smilies/icon_e_smile.gif)
Have you tried setting up in the definition:
Code: Select all
ScrollText = "Sample text that will change later",
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())
![Smile :)](./images/smilies/icon_e_smile.gif)