Jump to content

Recommended Posts

I wrote function, what's wrong with it?
 
local function startmilling(inst)
      inst:PlayAnimation("working",true) --change looping animation
      inst:DoTaskInTime(60, startmilling(inst) --wait a minute, playing animation 
             inst:PushAnimation("idle_ready") --push animation
             end)
end
 
Button
 
local widgetbuttoninfo = {
text = "Start",
position = Vector3(0, -165, 0),
fn = function(inst)
startmilling(inst)   -- my function
end
 
validfn = function(inst) --can it be clicked?
        return inst.components.stewer:CanCook()
    end
}
 

Game crashed

Link to comment
https://forums.kleientertainment.com/forums/topic/56591-buttons-buttons-buttons/
Share on other sites

There is a syntax error at function startmilling.

local function startmilling(inst)      inst:PlayAnimation("working",true) --change looping animation      inst:DoTaskInTime(60, function()              startmilling(inst) --wait a minute, playing animation              inst:PushAnimation("idle_ready") --push animation      end)end
Edited by Finerlobster

Kinda reminds me of the electric cutmill from IR C :razz:<- shameless self-advertisement

 

Try to compare your code to game- and mod-code and if that fails, post the whole prefab file. (assuming you checked your log.txt already)

maybe. My idea: windmill and baking of bread in special oven. It's stupid but i like it. Ears of wheat--> Wheat seeds -- > Flour. And more recipes for bread, cakes, crackers etc.

previously it had an idea about a sawmill (log-->4twigs), but as you said saw already created in IRC. I have not watched, but i download it now and have a look, how you doing.

post-674378-0-97502700-1438179362_thumb.

maybe. My idea: windmill and baking of bread in special oven. It's stupid but i like it. Ears of wheat--> Wheat seeds -- > Flour. And more recipes for bread, cakes, crackers etc.

previously it had an idea about a sawmill (log-->4twigs), but as you said saw already created in IRC. I have not watched, but i download it now and have a look, how you doing.

attachicon.gif2015-07-29_00002.jpg

That looks cool as hell

maybe. My idea: windmill and baking of bread in special oven. It's stupid but i like it. Ears of wheat--> Wheat seeds -- > Flour. And more recipes for bread, cakes, crackers etc.

previously it had an idea about a sawmill (log-->4twigs), but as you said saw already created in IRC. I have not watched, but i download it now and have a look, how you doing.

 

That mod should add wheat, since the assets are already in the game. Just saying.

I'm suprised nobody has... Tiny what?

So yeah, as said above, the issue is possibly tied to the fact that you call a function from within that function.

 

turn your screen 180° now

 

.08l uǝǝɹɔs ɹnoʎ uɹnʇ 'spuoɔǝs 09 u!

 

see?

my bad lua skills -_-
And i have no time for it. If someone want to continue to work on this mod and idea , do it, but don't forget about me in modinfo.

Here spriter's files for:

-Windmill

- Wheat

- Wheat seeds

- Flour (based on Ash)

 

WINDMILLMOD.zip

Edited by CatalystWtrclr

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...