run script upon save game load? FX lights issue, LightSource
Re: run script upon save game load? FX lights issue, LightSo
Tried with findentity == nil ? that is, without havin nil between " characters.
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
Re: run script upon save game load? FX lights issue, LightSo
Indeed, indeed. That worked. Clearly the :facepalm: smiley is missing here. But I guess will do as well. Thanks!Xanathar wrote:Tried with findentity == nil ? that is, without havin nil between " characters.
Re: run script upon save game load? FX lights issue, LightSo
yeah, when it didn't find the string "nil" it might as well been looking for "timbucktoo" cause it wouldn't find that either
glad you got it working
glad you got it working
Finished Dungeons - complete mods to play
Re: run script upon save game load? FX lights issue, LightSo
Ahh, this is good, I need to use this too, I hope the forever ticking ticker doesn't affect performance, probably won't.
Re: run script upon save game load? FX lights issue, LightSo
it shouldn't be a problem if the tick is infrequent enough
Finished Dungeons - complete mods to play
Re: run script upon save game load? FX lights issue, LightSo
Well, I can't get it to work anyway, the fx object is only lasting as long as its effect plays.
So, after the earthquake_dust stops it tests as nil again and then you get sound upon sound played and it gets loud quick.
edit: oops, works with Komag's setLight set to last a bazillion seconds, it gets destroyed when you quit so tests as nil upon load (unless your play session > bazillion seconds ).
So, after the earthquake_dust stops it tests as nil again and then you get sound upon sound played and it gets loud quick.
edit: oops, works with Komag's setLight set to last a bazillion seconds, it gets destroyed when you quit so tests as nil upon load (unless your play session > bazillion seconds ).
Re: run script upon save game load? FX lights issue, LightSo
Thanks for the help!Komag wrote:yeah, when it didn't find the string "nil" it might as well been looking for "timbucktoo" cause it wouldn't find that either
glad you got it working
Every game is different I guess, but in ES games at least scripts did have almost no effect on performance at all - and we're talking about thousands of lines of code processed each frame. If Grimrock is even a tiny bit similar then even a timer set to 0.01 calling a simple function like the one presented here wouldn't have any impact on performance at all.Batty wrote:Ahh, this is good, I need to use this too, I hope the forever ticking ticker doesn't affect performance, probably won't.
Re: run script upon save game load? FX lights issue, LightSo
I set up some scripts in a room to check for different kinds of light (to recreate the darkness requirement of the weapon of power room), and check every 0.1 seconds, and it made my framerate tank badly. I adjusted it to 0.5 seconds and I could still notice the small hiccup every half second, but livable now. So it can happen
Finished Dungeons - complete mods to play
Re: run script upon save game load? FX lights issue, LightSo
Sure it was really the script causing the slowdown? Just tested with 10 timers running with a 0.01 second interval (= ~per frame), each checking for the entity. And then compared the framerate to a save game without any timer active (standing in exactly the same spot). It was the same, 85 FPS in both cases. Even put in a dozen monsters into the level to make sure there is already a bit of AI taxing the CPU (plus tons of monsters in levels 1-3 and some other timers running). Maybe you had some kind of loop in your script that checks for more or less everything in the whole dungeon? I could imagine that loops can be quite taxing depending on what they do.Komag wrote:I set up some scripts in a room to check for different kinds of light (to recreate the darkness requirement of the weapon of power room), and check every 0.1 seconds, and it made my framerate tank badly. I adjusted it to 0.5 seconds and I could still notice the small hiccup every half second, but livable now. So it can happen
Re: run script upon save game load? FX lights issue, LightSo
it was definitely the script, had some serious looping going on each time, checking many places for many things every time, hardcore stuff. It also checks what the mouse is carrying, which may possibly work differently, I don't know. Maybe these scripts that just check for the entity's existence run much faster, which is good news
Finished Dungeons - complete mods to play