RedRock911 Posted June 26, 2015 Share Posted June 26, 2015 Hi forum!. So I am building a custom character who has a custom creature spawn when his sanity is below a certain % . So my question is where do I put the scripting for the event? do I include it in the character prefab? or do I put it in the creatures script? AND if I put it in the creatures script, do I need to create my own component or behavior for the aforementioned events? The next challenge I have, is I would like for the event to trigger in the swamp tiled areas. Would anyone know how to exactly write a script like that? or is it feasable? AND finally. If I can find the answers to those two, and I can get his swamp spawn to work. How difficult is it going to be to transfer all this stuff when I port the character over to DST? Link to comment https://forums.kleientertainment.com/forums/topic/55671-sanity-event-for-custom-charecter-and-some-advice/ Share on other sites More sharing options...
Seiai Posted June 26, 2015 Share Posted June 26, 2015 custom creature spawn when his sanity is below a certain %i would add an eventlistener on the character, that listens for the sanitydelta of your character and stores the last value in a variable and trigger the creature when the last value is above the threshold and the current sanity is below. (and the other way around to despawn it, in case u want it to despawn again above the threshold) the event to trigger in the swamp tiled areas.even if the sanity is above the threshold? then i would add an eventlistener on the character, that listen for locomote and checks what tile u are on. (using the GetTileAtPoint function) and it shouldnt be hard to port this to DST(possibly, if u code it right, u will have to change nothing). Link to comment https://forums.kleientertainment.com/forums/topic/55671-sanity-event-for-custom-charecter-and-some-advice/#findComment-649985 Share on other sites More sharing options...
RedRock911 Posted June 27, 2015 Author Share Posted June 27, 2015 i would add an eventlistener on the character, that listens for the sanitydelta of your character and stores the last value in a variable and trigger the creature when the last value is above the threshold and the current sanity is below. (and the other way around to despawn it, in case u want it to despawn again above the threshold)even if the sanity is above the threshold? then i would add an eventlistener on the character, that listen for locomote and checks what tile u are on. (using the GetTileAtPoint function)and it shouldnt be hard to port this to DST(possibly, if u code it right, u will have to change nothing). Thank you so much for the reply! All I have right now is the artwork completed, and I am working on the animations in Spriter, I have to rework some body parts. The creature has tentacles, and making them just one arm piece provided to be too stiff looking. So I researched how to segment the arms to appear to be flexible, It might be a while before the coding portion goes, But I needed an answer so I could start planning. Also, I needed to know if it was possible if at any moment I get burned out on the tedious task of animating frames to continue a forward progression with the mod. It's funny how working on a mod, you always think "just one more thing" and then a month later "well I could do this! this will make it unique and cool!" which is where I am at now. Link to comment https://forums.kleientertainment.com/forums/topic/55671-sanity-event-for-custom-charecter-and-some-advice/#findComment-650202 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