mrdoodle Posted June 11, 2022 Posted June 11, 2022 So I have these illusions that pop up according to my will. They are actors copied from where you've been, with a weakness to light. When I attack them it is quite simple to detect the lightlevel; I just run a Onhit() event with the lightlevel calculation on a magiceffect script on the actor, and then kill the actor if above a certain threshold. The onhit event feels efficient for it's purpose. The hard part comes when I want the actor to react to lights not Onhit(). The sun and general lighting I can just do a check on myself, or go by the game hour. But what is the most effecient way to deal with light from torches, lanterns and other non-combat light sources? I have, on tests, made a while loop that runs the same lightlevel detection until it goes above a threshold or until a timer zeroes. This works good enough, but I don't really know how that affects the script engine and so on. Is it better with just going with Onupdate() every 0.5 seconds? How low can I realistically go? Or a cloak? I really want to avoid cloaks since I already uses MGEs on every illusion. I have made no success with quests on this part, sadly.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.