Could you elaborate? What is *exactly* the problem?
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
int newguix, newguiy; // declare variables that will hold the GUI's new position
int overwhat = GetLocationType(mouse.x, mouse.y); // get what the mouse cursor is over
if (overwhat == 1) { // if mouse is over a hotspot
// get this hotspot's gui position values from its properties:
newguix = GetHotspotProperty(GetHotspotAt(mouse.x, mouse.y), "descx");
newguiy = GetHotspotProperty(GetHotspotAt(mouse.x, mouse.y), "descy");
}
else if (overwhat == 2) { // if mouse is over a character
int charid = GetCharacterAt(mouse.x, mouse.y);
newguix = character[charid].x + (GetCharacterProperty(GetCharacterAt(mouse.x, mouse.y), "descx"));
newguiy = character[charid].y + (GetCharacterProperty(GetCharacterAt(mouse.x, mouse.y), "descy"));
}
else if (overwhat == 3) { // if mouse is over an object
int objid = GetObjectAt(mouse.x, mouse.y);
newguix = GetObjectX(objid) + (GetObjectProperty(objid, "descx"));
newguiy = GetObjectY(objid) + (GetObjectProperty(objid, "descy"));
}
SetGUIPosition(THEGUINAME, newguix, newguiy);
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.064 seconds with 14 queries.