Re: Ask a simple question, get a simple answer
Posted: Fri Dec 05, 2014 1:51 am
I thought delayedCall only worked specifically with script functions? Is it supposed to work with any go in the game?
Official Legend of Grimrock Forums
http://grimrock.net/forum/
Strangely, it works in another script I have:Grimfan wrote:I thought delayedCall only worked specifically with script functions? Is it supposed to work with any go in the game?
The syntax for delayedCall is:cameronC wrote:I just can't get delayedCall to work. I've combed through the various posts regarding it in other threads and the brief mention of it in the scripting ref but I think I'm completely misunderstanding it. I've tried many things to get a script function to be ran after X seconds and sometimes the editor crashes on delayedCall() and sometimes it passes through it fine but gives me an invalidconnector warning onscreen and nothing else happens.
If I have entityID with a functionName I want to run after X seconds, is that something this can do?
Code: Select all
local scroll = findEntity("Your_Scroll_ID")
scroll.scrollitem:setScrollImage("mod_assets/....")
--do stuff to scroll
not working. Seems like this is bug. When I place scroll just inside alcove or some contaihner its ok. But when scroll is inside sack inside alcove, editor crashing with this global nil...GoldenShadowGS wrote:can't you just do \
Code: Select all
local scroll = findEntity("Your_Scroll_ID") scroll.scrollitem:setScrollImage("mod_assets/....") --do stuff to scroll
Code: Select all
my_scroll.scrollitem:setScrollImage("mod_assets/....")
my_sack.containeritem:addItem(my_scroll)
my_alcove.surface:addItem(my_sack)
treasure_map_1.scrollitem:setScrollImage("mod_assets/portraits/prvnimapapokladu.dds")Scotty wrote:What if you put it in the sack/alcove via script after you've added the image on?
Code: Select all
my_scroll.scrollitem:setScrollImage("mod_assets/....") my_sack.containeritem:addItem(my_scroll) my_alcove.surface:addItem(my_sack)
Code: Select all
defineObject{
name = "treasure_map_1",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/note.fbx",
},
{
class = "Item",
uiName = "Scroll",
gfxIndex = 454,
weight = 0.1,
},
{
class = "ScrollItem",
setScrollImage = ("mod_assets/portraits/prvnimapapokladu.dds"),
},
},
}
Code: Select all
{
class = "ScrollItem",
ScrollImage = ("mod_assets/portraits/prvnimapapokladu.dds"),
},
ha, got it working finally ! thanks alot.GoldenShadowGS wrote:because you need to remove "set" when defining
Code: Select all
{ class = "ScrollItem", ScrollImage = ("mod_assets/portraits/prvnimapapokladu.dds"), },