How to Cycle Through Characters in Script

Started by Custerly, Sat 13/01/2024 04:09:36

Previous topic - Next topic

Custerly

Hi all,

I want to be able to move a dynamic selection of characters by their ID to a certain room via scripting.

In the past, I did this with labels using this code
Code: ags
for (int i = 0;  i < gDialogue.ControlCount;  i++)
{
  Label *theLabel = gDialogue.Controls[i].AsLabel;
  ...
so I am hoping there is a way to do something similar, but with characters.


Custerly

Thanks a bunch @Crimson Wizard. I didn't know they were called global arrays, so I couldn't find them in the AGS manual.

If there's ever anything I can do to return the favor for all of the help you've provided me over the past few weeks/months, please let me know.

SMF spam blocked by CleanTalk