Have you tried gYourGuiName.setposition(xx, xx)?
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 Menu
function hBedroomDoor_Interact()
{
if(Character.GetAtScreenXY(90, 210)==cSlade)
{
player.ChangeRoom(2, 200, 265);
}
else if (player.View==2)
{
player.ChangeView(1);
player.Walk(90, 210);
}
else
{
player.Walk(90, 210);
}
}
function hSladesCouch_Interact()
{
if(Character.GetAtScreenXY(210, 260)==cSlade)
{
player.ChangeView(2); //to sit on couch
SetWalkBehindBase(1, 200);
}
else
{
player.Walk(210, 260);
}
}
float dx = IntToFloat(mouse.x - player.x);
float dy = IntToFloat(player.y - mouse.y);
function repeatedly_execute()
{
//--------------------------------------Cursors------------------------------------------------
float dx = IntToFloat(mouse.x - player.x);
float dy = IntToFloat(player.y - mouse.y);
float len = Maths.Sqrt(dx*dx+dy*dy);
float angle = Maths.RadiansToDegrees(Maths.ArcCos(dy/len));
if (dx<0.0) angle = 360.0-angle;
int curs = FloatToInt((angle+11.25)/22.5);
if (curs == 2) mouse.ChangeModeGraphic(eModeWalkto, 132);
else if (curs == 4) mouse.ChangeModeGraphic(eModeWalkto, 130);
else if (curs == 6) mouse.ChangeModeGraphic(eModeWalkto, 136);
else if (curs == 8) mouse.ChangeModeGraphic(eModeWalkto, 135);
else if (curs == 10) mouse.ChangeModeGraphic(eModeWalkto, 137);
else if (curs == 12) mouse.ChangeModeGraphic(eModeWalkto, 129);
else if (curs == 14) mouse.ChangeModeGraphic(eModeWalkto, 133);
else if (curs == 16) mouse.ChangeModeGraphic(eModeWalkto, 131);
}
// main global script file
bool playedResume = false;
bool playedSave = false;
...
function repeatedly_execute()
{
//------------------------------------Resume Game----------------------------------------------
if(playedResume==false)
{
if(ResumeGame.Graphic==159)
PlaySound(1);
playedResume=true;
}
if(playedResume==true)
{
if(ResumeGame.Graphic==158)
playedResume=false;
}
//-------------------------------------Save Game-------------------------------------------------
if(playedSave==false)
{
if(Save.Graphic==148)
PlaySound(1);
playedSave=true;
}
if(playedSave==true)
{
if(Save.Graphic==147)
playedSave=false;
}
}
// main global script file
Guibutton*gbtton;
bool played=false;
#sectionstart game_start // DO NOT EDIT OR REMOVE THIS LINE
function game_start() // called when the game starts, before the first room is loaded
{
}
#sectionend game_start // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart repeatedly_execute // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute()
{
gbtton=GuiButton.GetAtScreen(mouse.x,mouse.y);
if (gEscMenu.Visible==false) {
played=false;
}
if (gEscMenu.Visible==true) {
if (gbtton==null) {
played=false;
}
if (gbtton!=null) {
if (played==false) {
played=true;
PlaySound(1);
}
}
}
#sectionstart on_mouse_click // DO NOT EDIT OR REMOVE THIS LINE
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)
{
ProcessClick(mouse.x,mouse.y, mouse.Mode);
}
else if (button == eMouseRight)
{
Hotspot*h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
if ((h != null) && (gPlayerDialog.Visible!=1))
{
gPlayerDialog.BackgroundGraphic = h.ID + 240; // use e.g. slots 241 - X
SetTimer(1, 120);
gPlayerDialog.SetPosition(player.x-20, player.y-70);
gPlayerDialog.Visible = 1;
}
}
else // right-click, so cycle cursor
{
mouse.SelectNextMode();
}
}
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.070 seconds with 13 queries.