Jump to content

How do I get a custom made creature to morph into something else at night only?


Kooky

Recommended Posts

Hi, I am the main creator of the chester family.

 

ANYHOW, Afetogbo and I are hot on the trail to making the new highly anticipated Chester family member named Cavester. NO we have not figured out a way for him to enter into caves (yet) but it is a WIP.

 

Afetogbo helped put together the normal stuff, Im the one getting my hands wet and sticky to make him glow in the dark starting at dusk and ending at daytime. BUT there's another thing I want him to do. I want him to change from his grey normal animation to the bright green animation I made for him as well. That way he works like a glowstick! If someone could just point me in the right direction that would be really helpful! I've been disecting the pigmens codes hoping that would lead me somewhere but they only morph into a werepig during a fullmoon and I'm not sure what controls all of that.

Link to comment
Share on other sites

There's various ways to do this.

You could listen for the "nighttime" and "daytime" events to toggle between the modes. This would also require a simple clock check on loading. Refer to the "clock" component for more information, which gets added to the world if there's a day cycle.

Alternatively, you could periodically check for how dark the location is. I think the lightwatcher component does just this.

Link to comment
Share on other sites

How do you do that for checking for how dark the location is? The listen sounds nice too but I like the idea of checking for the light levels because eventually Cavester will have the ability to go into caves.

Link to comment
Share on other sites

28 minutes ago, Kooky said:

How do you do that for checking for how dark the location is? The listen sounds nice too but I like the idea of checking for the light levels because eventually Cavester will have the ability to go into caves.

TheSim:GetLightAtPoint(inst.Transform:GetWorldPosition()) < .25

This is what I use in IRB's solar panel.

Link to comment
Share on other sites

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.

×
  • Create New...