RemoteCast() seems a bit buggy

Post » Wed Jun 20, 2012 11:14 am

I was testing some scripts that involves ObjectReferences continuously casting spells on Actors through RemoteCast. One thing I noticed is that after so many casts of the same spell, the targeting of the function bugs out and I'd see the spell flashing intensely in some corner of a wall.

I basically ruled out in being a bug on my part and have ensured that the ObjectReference and the Actor are in the right coordinates right when RemoteCast() is called.

After a few hours of further tests, I found out that the problem would get temporarily corrected if the Spell variable was set to point to another Spell after the casting went haywire (I did this through a script that listens for the most recent spell casted by the player on the object reference and then stored it as the new spell).

My impression is that the lightning bolt spell seems to bug out more easily than frostbite, although that could be a matter of perception because I tested the former a bit more).

I wonder if any of you have experienced something similar when you are testing scripts that involve RemoteCast().
User avatar
sunny lovett
 
Posts: 3388
Joined: Thu Dec 07, 2006 4:59 am

Post » Wed Jun 20, 2012 9:58 am

It appears I've found out what's wrong. It seems to have something to do with threading. After I've reduced the frequency of updates and the number of concurrent threads, the problem seems to be gone for now.
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am


Return to V - Skyrim