Any way to generate a map ?
Vitokin
07 Jun 2019, 02:52I'm making a large desert and it's quite a pain, perhaps i should use PAINT so i don't get lost with my exists since most areas of my desert are similar description... lol ;o Is there any way to generate rooms that tie together? Otherwise its cool I hope i dont make the desert too big lol

Io
07 Jun 2019, 02:58One sneaky thing you can do is have only a SINGLE room, and give it the attribute X and the attribute Y, both integers.
So basically that one room turns into a grid. When you click the exit to go 'east', you don't actually go east. Instead you have the exit run a script - that's an option you have, by clicking on it - to increase the room's X by 1, clear the room, and print out a new description based on the current X and Y.
You can have stuff like "If I'm in X=5 and Y=3, make the Oasis object here visible to signify I've arrived in an Oasis. Otherwise make it invisible to signify I've left the Oasis."
Vitokin
07 Jun 2019, 03:08lo that's what i was planning to make a space sim adventure actually, didn't think about that for my desert map good idea thanks!
hegemonkhan
07 Jun 2019, 09:17lots of really cool stuff you can do via using this nifty trick of creating "x" and "y" (optional vertical/3D: and "z") coordination Integer Attributes for each/all of your Room Objects, which is doing 'grid' programming, as this allows you do use math/arithmetic with the rooms coordinates (such an application is "pathfinding" coding: such as moving a monster towards you every turn)
for example, lets say you got a 10x10 square design of 100 rooms
you're in room: (0,0)
monster is in room: (10,10)
and we got scripting that does this:
<object name="player">
<attr name="changedparent" type="script">
<![CDATA[
x = monster.parent.x_coordinate_integer_attribute
y = monster.parent.y_coordinate_integer_attribute
if (monster.parent.x_coordinate_integer_attribute > player.parent.x_coordinate_integer_attribute) {
x = x - 1
} else if (monster.parent.x_coordinate_integer_attribute < player.parent.x_coordinate_integer_attribute) {
x = x + 1
}
if (monster.parent.y_coordinate_integer_attribute > player.parent.y_coordinate_integer_attribute) {
y = y - 1
} else if (monster.parent.y_coordinate_integer_attribute < player.parent.y_coordinate_integer_attribute) {
y = y + 1
}
foreach (room, room_objectlist_attribute) {
if (room.x_coordinate_integer_attribute = x and room.y_coordinate_integer_attribute = y) {
monster.parent = room
}
}
if (player.parent = monster.parent) {
// do fight/combat scripting (too lazy/tired to code in an example of it)
}
]]>
</attr>
</object>