kordhrufan Posted January 18, 2015 Share Posted January 18, 2015 Hi I'm trying to code the special power based on sanity, this is I have so far, the problem is, the mod is disable when I try to run it. local sanitychange(inst,data){ if inst.components.sanity.current <= 50 then inst.components.combat.damagemultiplier = 1 else inst.components.combat.damagemultiplier = 0.75}local fn = function(inst) -- choose which sounds this character will playinst.soundsname = "wendy" -- Minimap iconinst.MiniMapEntity:SetIcon( "sari.tex" ) -- Stats inst.components.health:SetMaxHealth(150)inst.components.hunger:SetMax(120)inst.components.sanity:SetMax(100)inst.components.combat.damagemultiplier = 0.75inst.components.sanity.night_drain_mult = (TUNING.WILSON_SANITY_MULT / 2)inst.components.sanity.neg_aura_mult = (TUNING.WILSON_SANITY_MULT / 2)inst:ListenForEvent("SanityTsuki", sanitychange) end Link to comment Share on other sites More sharing options...
kordhrufan Posted January 20, 2015 Author Share Posted January 20, 2015 I manage to know how to start, Now I have this problem. Link to comment Share on other sites More sharing options...
Blueberrys Posted January 26, 2015 Share Posted January 26, 2015 @kordhrufan, please provide your log.txt file. Link to comment Share on other sites More sharing options...
kordhrufan Posted January 26, 2015 Author Share Posted January 26, 2015 Reset() returningHttpClientWriteCallback (0x00472D64, 1, 1250, 0x06BCF8AC)HttpClientWriteCallback READ 1250 (1250 total)scripts/screens/mainscreen.lua(576,1) platform_motd table: 0B16FF40 scripts/mods.lua(304,1) unloading prefabs for mod MOD_Sariya Byakura Collecting garbage...lua_gc took 0.02 seconds~SimLuaProxy()lua_close took 0.01 secondsOrphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. HttpClient::ClientThread::Main() completeShutting down the problem is the "sanitychange" I manage to solve the problem, thank you anyways! Link to comment Share on other sites More sharing options...
AgainstMatter Posted January 28, 2015 Share Posted January 28, 2015 How did you solve it? Link to comment Share on other sites More sharing options...
kordhrufan Posted January 29, 2015 Author Share Posted January 29, 2015 I change inst:ListenForEvent("SanityTsuki", sanitychange) intoinst:AddComponent("SanityTsuki")inst.components.SanityTsuki:personality()and creating the file "SanityTsuki" inside a component folder in scripts. local SanityTsuki = Class(function(self,inst) self.inst = inst end) Link to comment Share on other sites More sharing options...
Aphid98 Posted March 29, 2015 Share Posted March 29, 2015 XIXThere's no advantage to hurrying through life. Link to comment Share on other sites More sharing options...
Coski Posted March 29, 2015 Share Posted March 29, 2015 XIXThere's no advantage to hurrying through life. Aphid , explain me this. Link to comment Share on other sites More sharing options...
Aphid98 Posted March 29, 2015 Share Posted March 29, 2015 Omg oops, i forgot to write the question: What does this mean? (see above) Link to comment Share on other sites More sharing options...
Aphid98 Posted March 29, 2015 Share Posted March 29, 2015 Omg oops, i forgot to write the question: What does this mean? (see above)I just realized... It's a signature! derp derp derp Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.