Andreasgamming Posted July 23, 2017 Author Share Posted July 23, 2017 I had since removed the line of code but the first file I posted still has it. inst.components.sanity.custom_rate_fn = sanityfn local function sanityfn(inst)local delta = 0if TheWorld.state.isday thendelta = -0.25 elseif TheWorld.state.isdusk thendelta = 0.5 elseif TheWorld.state.isnight thendelta = 0.95 endreturn delta end I grabbed it from the file I had posted before. this code caused a lot of problems in my mod. I am also currently trying to make the weapon for her, everything works perfectly except for one thing, I cannot see the inventory image nor the item swap image so I believe I have some major coding errors in that one. Link to comment Share on other sites More sharing options...
ZupaleX Posted July 23, 2017 Share Posted July 23, 2017 It was not working because you define the function after using it.Invert the order of the 2 lines and it should work better. Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 23, 2017 Author Share Posted July 23, 2017 Well the Error I get says that an equals is expected near one of the Deltas in the code. Link to comment Share on other sites More sharing options...
ZupaleX Posted July 23, 2017 Share Posted July 23, 2017 I sure hope that what you copied/paste is not how it is formatted in your script? Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 23, 2017 Author Share Posted July 23, 2017 No I fixed it up, i.e making sure the then statements are actual statements and not literally connected to the deltas, I did miss one when I fixed it and handled that but the problem now is the equals sign that is expected near one of the deltas. Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 23, 2017 Author Share Posted July 23, 2017 local function sanityfn(inst)local delta = 0 if TheWorld.state.isday then delta = -0.25 elseif TheWorld.state.isdusk then delta = 0.5 elseif TheWorld.state.isnight then delta = 0.95 end return delta end inst.components.sanity.custom_rate_fn = sanityfn This is the code that is "fixed". Link to comment Share on other sites More sharing options...
ZupaleX Posted July 23, 2017 Share Posted July 23, 2017 local function sanityfn(inst) local delta = 0 if TheWorld.state.isday then delta = -0.25 elseif TheWorld.state.isdusk then delta = 0.5 elseif TheWorld.state.isnight then delta = 0.95 end return delta end inst.components.sanity.custom_rate_fn = sanityfn Try that one Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 23, 2017 Author Share Posted July 23, 2017 It is working but that is a bit easier to read than how I have it XD Link to comment Share on other sites More sharing options...
ZupaleX Posted July 23, 2017 Share Posted July 23, 2017 That's the purpose of good formatting Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 23, 2017 Author Share Posted July 23, 2017 Now there is one more thing, She is supposed to have a weapon called cruel moon I have it done artwork and everything but it doesn't show up which seems to be a common problem on the thread I was following . What I mean is the inventory image doesn't show up nor does the swap image but the ground image does, I followed the instructions completely but I got a feeling I am missing something pretty big which is causing this problem. I have it separate from her right now and will attempt to transfer everything when it is ready. CruelMoon.zip Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 24, 2017 Author Share Posted July 24, 2017 I think I may have fixed it. Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 24, 2017 Author Share Posted July 24, 2017 one question how do I resize a sprite in Spriter? I fixed the problem now the scythe is as big as a full grown tree and I cannot seem to be able to change it's size. Link to comment Share on other sites More sharing options...
ZupaleX Posted July 24, 2017 Share Posted July 24, 2017 You have properties for the scale in spriter when you click on an entity. That should do the trick. Let me know if it doesn't Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 24, 2017 Author Share Posted July 24, 2017 I edited to size using the properties and it is not working :/ I did remove the atlas and recompile it before starting up the game. Link to comment Share on other sites More sharing options...
ZupaleX Posted July 24, 2017 Share Posted July 24, 2017 (edited) I think then you actually need to increase the size of the png itself Edited July 24, 2017 by ZupaleX Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 24, 2017 Author Share Posted July 24, 2017 I was hoping that I wouldn't have to do that... Link to comment Share on other sites More sharing options...
ZupaleX Posted July 24, 2017 Share Posted July 24, 2017 if you want to rescale everything by the same factor there is a workaround though. you can use AnimState:SetScale(some_value) Link to comment Share on other sites More sharing options...
Andreasgamming Posted July 24, 2017 Author Share Posted July 24, 2017 I already scaled it, and replaced the original that was in the file. but where would I put that code in the "weaponname".lua? Link to comment Share on other sites More sharing options...
Andreasgamming Posted August 13, 2017 Author Share Posted August 13, 2017 Alright, How do I make an equipable talk? Also How do I make it kill a player if said player who picks it up if sait player is missing a specific tag? Link to comment Share on other sites More sharing options...
Lumina Posted August 13, 2017 Share Posted August 13, 2017 look at files related to lucy the axe for the speaking part. Link to comment Share on other sites More sharing options...
Andreasgamming Posted August 13, 2017 Author Share Posted August 13, 2017 I have but I'm not completely sure on how exactly it works, I don't want my weapon to be sounding and saying the same thing as lucy. Link to comment Share on other sites More sharing options...
Andreasgamming Posted August 18, 2017 Author Share Posted August 18, 2017 Okay, How do I make an animation loop? I have the loop enabled in spriter but that is to just loop the playback of said animation. Also I still want that ability to kill any character without the tag "keeper" Link to comment Share on other sites More sharing options...
Lumina Posted August 18, 2017 Share Posted August 18, 2017 Â inst.AnimState:PlayAnimation("idle",true) I think the true is for make the anim loop. Â Link to comment Share on other sites More sharing options...
Andreasgamming Posted August 18, 2017 Author Share Posted August 18, 2017 Alright thanks ^_^ Link to comment Share on other sites More sharing options...
Andreasgamming Posted August 18, 2017 Author Share Posted August 18, 2017 Alright new question, Is there a way to have a custom Description of an item from each of the characters. For instance when you describe something like a flower as wilson he says something about but other character say something else? I'm not very good at explaining stuff. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now