Shinoryoshu Posted September 3, 2016 Author Share Posted September 3, 2016 24 minutes ago, SuperDavid said: @Shinoryoshu It'd be a lot easier for me if you post your character here then I can see what's wrong & fix it or if you can tell me what's the crash then I can help you. Also, did your character start crashing when you put this code inst:ListenForEvent("lightningstrike", function(inst, data) if not inst.alreadylightningdamage then -- you can save any name you want in inst. but it is not saved when leaving the game inst.alreadylightningdamage = true -- save that we already gave him the bonus, so this will only work once per session. This will be deleted in a new session automatically inst.components.combat.damagemultiplier = inst.components.combat.damagemultiplier * 1.5 -- 50% boost when strike by lightning inst.components.talker:Say("I feel so alive!") inst:AddTag("electricdamageimmune") -- Immune to electric damage. inst.components.burnable.lightningimmune = true -- Immune to lightning. local x, y, z = inst.Transform:GetWorldPosition() -- Cool effect. SpawnPrefab("sparks").Transform:SetPosition(x, y, z) -- Cool effect. end end) in it? You have to put the code above under this code local master_postinit = function(inst) in your character.lua if you did that & it crashes then that's really strange because that shouldn't happen. nora.lua Link to comment https://forums.kleientertainment.com/forums/topic/69926-new-to-modding-need-help-or-clarification-on-perk/page/2/#findComment-810007 Share on other sites More sharing options...
. . . Posted September 3, 2016 Share Posted September 3, 2016 It should work now nora.lua Link to comment https://forums.kleientertainment.com/forums/topic/69926-new-to-modding-need-help-or-clarification-on-perk/page/2/#findComment-810009 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