Hi everyone! I couldn't find an answer... I need to iterate all elements of current room, to display their descriptions somewhere.
I'd like to do this for every character, object and hotspot (let's pretend, to display names in a Label)
So I need something like:
String result = "this room contains: ";
for (every hotspot in room.hotspots)
{
result = result.Append(hotspot.Description);
result = result.Append(", ");
}
for (every character in room.characters)
{
result = result.Append(character.RealName);
result = result.Append(", ");
}
for (every object in room.objects)
{
result = result.Append(object.Description);
result = result.Append(", ");
}
Does someone know if there's a way to do this?
Thanks!
Have a nice day
for (int i = 0; i < AGS_MAX_HOTSPOTS; i++)
{
Hotspot* h = hotspot[i];
// do something
}
for (int i = 0; i < Room.ObjectCount; i++)
{
Object* o = object[i];
// do something
}
for (int i = 0; i < Game.CharacterCount; i++)
{
Character* c = character[i];
if (c.Room == player.Room)
{
// do something
}
}
Amazing!! thanks!