// room script file #define KID_AMOUNT 3 int kidsCount; bool selected[7]; DynamicSprite* bgBackup; function room_Load() { bgBackup = DynamicSprite.CreateFromBackground(); } function DrawSelection() { DrawingSurface* ds = Room.GetDrawingSurfaceForBackground(); ds.DrawImage(0, 0, bgBackup.Graphic); ds.DrawingColor = 31; // white kidsCount = 0; for (int i = 0; i < 7; i++) { if (!selected[i]) continue; kidsCount++; int x1 = i * 40 + 23, x2 = x1 + 31; int y1 = 103, y2 = 103 + 33; ds.DrawLine(x1, y1, x2, y1); ds.DrawLine(x2, y1, x2, y2); ds.DrawLine(x2, y2, x1, y2); ds.DrawLine(x1, y2, x1, y1); } ds.Release(); } function hHotspot1_AnyClick(Hotspot *h, CursorMode mode) { int ci = (mouse.x - 20) / 40; if (!selected[ci] && kidsCount == KID_AMOUNT) Display("Bitte erst ein anderes Kind abwählen!"); else selected[ci] = !selected[ci]; DrawSelection(); } function hStart_AnyClick(Hotspot *h, CursorMode mode) { if (kidsCount != KID_AMOUNT) { Display("Bitte drei Kinder auswählen!"); return; } Character* kid[] = new Character[KID_AMOUNT]; int ki = 0; for (int i = 0; i < 7; i++) { if (selected[i]) { kid[ki] = character[i]; ki++; } } kid[0].ChangeRoom(5, 30, 135); kid[0].SetAsPlayer(); }