Ok, I gotta stop writing code in these boxes. I keep forgetting that the tab key moves you to the Post button.
I wouldn't say that it would be necessarily be a good idea to completely substitute events for if statements even though in many cases they could more or less be considered the same thing. There are cases such as:
if (said("look", "tree"))
{
if (vDayNumber == 1)
{
print("The tree is nice.");
}
else
{
print("The tree was cut down yesterday.");
}
}
That example was really meant to illustrate an if statement inside something that could be considered an event, but I also just realized that any time you want to have an else branch might be problematic with that event syntax.
OnNewRoom
{
}
else
{
}
seems pretty awkward to me. Otherwise, I'm thinking that the entire room should be executed the same way that logics are executed currently, with a Main section not being required, so something like the following could be said:
var vSomeVar = 0;
room r
{
OnNewRoom()
{
}
vSomeVar++;
// I know this isn't necessary for this example,
// but there might be some situation where
// it is cleaner
OnNewRoom()
{
print("You've visited this room %vSomeVar times.");
}
// the following section optional
Main
{
}
}