Majarkhon Posted September 6, 2015 Share Posted September 6, 2015 So I'm creating a character and got pretty much all the basics down, but I'm wondering how I'd make him so he is buffed during winter (higher health, sanity, hunger) but drastically loses health when damaged by fire and also loses sanity around fire (including campfires).Also, I'd like to start him off with an ice staff that lasts permenantly, how would I go about doing that? Link to comment https://forums.kleientertainment.com/forums/topic/57678-help-with-a-bit-of-scripting/ Share on other sites More sharing options...
Mobbstar Posted September 6, 2015 Share Posted September 6, 2015 (edited) So... a magical snowman? The winter thing is probably the hardest because you need to check for winter somehow.EDIT: you can listen for an event[1] by the season manager. The current season is "data.season" and should be "SEASONS.WINTER" for winter.inst:ListenForEvent("seasonChange",function(world,data) SOME_CODE_HERE end, GetWorld()) Fire damage is the easiest. Just set the multiplier higher.[2]inst.components.health.fire_damage_scale = 2 --double, you can change the number how you want. 1 is normal Sanity aura around certain prefabs (such as houndfire, campfirefire, etc.) can be done using prefabpostinit.[3] Or you could try to change the sanity of your character directly. That would be a bit more complicated. As for the staff... you should probably copy the respective Lua file (staff.lua) from data/scripts and modify it. It contains all staves, so you can safely remove anything that isn't part of the blue staff or common data. Oh, this is not for Together, is it? I have no experience with that game. Edited September 6, 2015 by Mobbstar Link to comment https://forums.kleientertainment.com/forums/topic/57678-help-with-a-bit-of-scripting/#findComment-670090 Share on other sites More sharing options...
Majarkhon Posted September 6, 2015 Author Share Posted September 6, 2015 Alright, I got the fire damage down and working on the staff. And no, this isn't for Together. Link to comment https://forums.kleientertainment.com/forums/topic/57678-help-with-a-bit-of-scripting/#findComment-670094 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