Hi all, I guess I'm bringing up an old topic, but that's what us newbies do. I was looking for a way to easily add credits at the end of a game. This module seemed like the answer, but the link is broken. Maybe somebody has this laying around.

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteNOTE: When the player leaves the screen, all the walkable areas are reset. Therefore, if you want an area to remain off when they leave the screen, you will need to set a flag, then run the RemoveWalkableArea command in the "Player enters room" event when they return.
function room_Load()
{
// remove walkable areas if ladders not in place
if (!Ladder1and2_connected) RemoveWalkableArea(2);
if (!Ladder4_in_place) RemoveWalkableArea(4);
if (!Ladder13_in_place) RemoveWalkableArea(6);
if (!Ladder14_in_place) RemoveWalkableArea(7);
if (!Ladder8_in_place) RemoveWalkableArea(9);
if (!Gangway_connected) RemoveWalkableArea(10);
if (!Ladder10_in_place) RemoveWalkableArea(11);
if (!Ladder12_in_place) RemoveWalkableArea(13);
if (!Ladder15_in_place) RemoveWalkableArea(15);
}
function room_FirstLoad()
{
RemoveWalkableArea(2);
RemoveWalkableArea(4);
hLever.Enabled = false;
}
float delta_x, delta_y, distance;
delta_x = IntToFloat(cmonster.x) - IntToFloat(cEgo.x);
delta_y = IntToFloat(cmonster.y) - IntToFloat(cEgo.y);
distance = Maths.RaiseToPower((Maths.RaiseToPower(delta_x, 2.0) + Maths.RaiseToPower(delta_y, 2.0)), 0.5);
if (distance < 30.0) cEgo.ChangeRoom(17, 181, 105);
function dialog_options_get_dimensions(DialogOptionsRenderingInfo *info)
{
// Create dialog options area
info.X = 138;
info.Y = 128;
info.Width = 180;
info.Height = 70;
}
function dialog_options_render(DialogOptionsRenderingInfo *info)
{
// Clear the area
info.Surface.Clear(Game.GetColorFromRGB(192, 192, 248));
// Draw the image buttons
info.Surface.DrawImage(4, 1, 443);
info.Surface.DrawImage(16, 1, 444);
// Set the dialog options to begin below the images
int i = 1, ypos = 12;
// Render all the options that are enabled
while (i <= info.DialogToRender.OptionCount)
{
if (info.DialogToRender.GetOptionState(i) == eOptionOn)
{
if (info.ActiveOptionID == i) info.Surface.DrawingColor = 14;
else info.Surface.DrawingColor = 4;
info.Surface.DrawStringWrapped(5, ypos, info.Width - 10, eFontSmall, eAlignLeft, info.DialogToRender.GetOptionText(i));
ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontSmall, info.Width - 10);
}
i++;
}
}
function dialog_options_get_active(DialogOptionsRenderingInfo *info)
{
int i = 1, ypos = 0;
// Find the option that corresponds to where the player clicked
while (i <= info.DialogToRender.OptionCount)
{
if (info.DialogToRender.GetOptionState(i) == eOptionOn)
{
ypos += GetTextHeight(info.DialogToRender.GetOptionText(i), eFontSmall, info.Width - 10);
if ((mouse.y - info.Y) < ypos)
{
info.ActiveOptionID = i;
return;
}
}
i++;
}
}
function dialog_options_mouse_click(DialogOptionsRenderingInfo *info, MouseButton button)
{
// this would call your save & restore code
if (mouse.x > 2 && mouse.x < 12 && mouse.y > 1 && mouse.y < 11) {
StopDialog();
save_game();
}
if (mouse.x > 14 && mouse.x < 24 && mouse.y > 1 && mouse.y < 11) {
StopDialog();
restore_game();
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.028 seconds with 14 queries.