Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] An array of objects?

From: vache::bluejellybean::com at: 21-Dec-2000 16:55

For a text-based game (a MUD, essentially), I'm trying to create a system by which the players can travel from room to room within the world, via. an array of rooms (i.e. Room(1,1), Room(200,2) etc.). I thought this would be an easy task but I have had trouble. How do you create arrays of objects in Rebol? I originally tried creating a block of objects, so I could access them like world/1/description, but it errors (and it isn't in an array, which would makes things harder down the road) --- world: make block! [ room1: make object! [ directions: [0 1 0 1] ; N S E W description: "You are in a dark cave!" ] room2: make object! [ directions: [1 0 0 1] description: "You are outside!" ] ]