This seems like some pretty basic functionality, I understand it's slow, it won't be done frequently etc.
I need to search through all my actors to find a bunch of specific ones dynamically and add them to an array list. I'll worry about building the array and adding the found objects once I figure out how to fix this compile error.
My code is the following:
The error I'm receiving is:Code:local actor A; local string actor_tag; ForEach WorldInfo.AllActors(class'Actor', A) { actor_tag = A.Tag; if (actor_tag == "Crystal") { P.ClientMessage("crystal found!"); } }
Error, 'ForEach': An iterator expression is required
On the "ForEach" line obviously.
Cheers



Reply With Quote
![Send a message via ICQ to Blade[UG]](images/styles/TwistedDark/misc/im_icq.gif)
![Send a message via AIM to Blade[UG]](images/styles/TwistedDark/misc/im_aim.gif)
![Send a message via MSN to Blade[UG]](images/styles/TwistedDark/misc/im_msn.gif)
![Send a message via Yahoo to Blade[UG]](images/styles/TwistedDark/misc/im_yahoo.gif)




Bookmarks