Zscript: Searching ACS Thinkers
Posted: Wed Oct 14, 2020 11:02 am
I'm trying to search through acs actors to be able to change their activator, but don't know if I'm even doing it right.
It always comes up an error at ThinkerFIlter.Owner, so that's what I'm stuck at. I've tried activator too but that doesn't work. Anyone know what to use here? Oldactor works, but isn't in this part of the code.
Code: Select all
ThinkerIterator thinkers = ThinkerIterator.Create("Thinker",STAT_SCRIPTS);
Thinker ThinkerFilter;
while (ThinkerFilter = Thinker(thinkers.Next()))
{
if (ThinkerFilter!=self)
{
if (ThinkerFilter.Owner && ThinkerFilter.Owner==oldactor)
{
ThinkerFilter.Owner = newactor;
}
}
}