OK, thanks
I'm familiar with the room saving the state but I wasn't sure if it would "re-read" code outside of the functions and thus return the variable to its original value.

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 MenuPineapplePizzaIsTasty = true;
// room script file
Timer *succubTimer0;
Timer *succubTimer1;
Timer *succubTimer2;
int showdown = 0;
function room_AfterFadeIn()
{
succubTimer0 = Timer.StartRT(3.0);
}
function room_RepExec()
{
if (Timer.IsExpired(succubTimer0)) {
cSmileyface.ChangeRoom(38);}
if (Timer.IsExpired(succubTimer1)) {
cSmileyface.ChangeRoom(38);}
}
function oSuccubus_AnyClick()
{
if (showdown == 0) {
Timer.Stop(succubTimer0);
oSuccubus.SetPosition(1528, 407);
showdown += 1;
succubTimer1 = Timer.StartRT(2.0);}
if (showdown == 1) {
Timer.Stop(succubTimer1);}
}
Timer *chickenTimer;
function room_AfterFadeIn()
{
chickenTimer = Timer.StartRT(5.0);
if (Timer.IsExpired(chickenTimer)) {
cSmileyface.ChangeRoom(15);
}
}
Quote...except that with this command the text stays on the screen until either you remove it with the Remove command, or the player goes to a different room, in which case it is automatically removed.
function on_mouse_click(MouseButton button) // called when a mouse button is clicked. button is either LEFT or RIGHT
{
if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
{
}
else if (button == eMouseLeft)
{
Room.ProcessClick(mouse.x,mouse.y, mouse.Mode);
}
else if (button == eMouseLeftInv) { // EDITED CODE STARTS HERE
// if no item selected, then select one
if (player.ActiveInventory == null)
player.ActiveInventory = inventory[game.inv_activated];
// otherwise use item on item
else
inventory[game.inv_activated].RunInteraction(eModeUseinv);
} else if (button == eMouseRightInv) {
// if some item is selected, then deselect it
if (player.ActiveInventory != null)
player.ActiveInventory = null; //EDITED CODE ENDS HERE
}
else // right-click, so cycle cursor
{
mouse.SelectNextMode();
}
}
function ShowInventoryWindow() {
//
// This function opens the inventory selection GUI.
//-------------------------------------------------------------------
mouse.Visible = true;
gGui1.Visible = true; // Show custom inventory window
mouse.Mode = eModeInteract; // switch to the Use cursor (to select items with)
mouse.UseModeGraphic(eModePointer); // But, override the appearance to look like the arrow
function iRatSkull_Interact()
{
cSmileyface.ActiveInventory = iRatSkull;
}
function CloseInv_Click(GUIControl *control, MouseButton button) {
gGui1.Visible = false;
}
function OpenInventory_AnyClick()
{
gGui1.Visible = true;
}
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.083 seconds with 15 queries.