Well, should I apply this as it is now, or wait for any improvement? Do you have any plans on this?
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 MenuQuote from: Cerno on Sat 20/04/2013 18:27:03You may use Display command, or DisplayTopBar (displays text with custom header) to show error message. You may also call AbortGame to instantly quit in case of irrecoverable error (with error message).
Question: Is it possible to add error handling to AGS, like assertions or something?
I have some ideas to make this more robust against errors. I could work around this by using any invalid command, but I was hoping there was a better way.
Quote from: Cerno on Sat 20/04/2013 10:31:27Tiles != sprite, tile = part of sprite. Tiled import allows to cut sprite into pieces of identical size.
But it does. Open the game.agf in a text editor and see for yourself
Edit: Unless tiles != sprites in which case I take everything back.
Quote from: Calin Leafshade on Thu 18/04/2013 23:54:06Would not it be possible to extend sprite information and keep the rectangle coords along with source file?
AGS doesnt record the source of tile imports nor the rect so they cannot be reimported from source.
Quote from: Nero_Ace on Fri 19/04/2013 12:25:00This is usually done using Custom Properties.
Some of my hotspots take you to a different room while others initiate pick up events or interacting with characters. Is there a way to tell the code what "type" of hotspot it is and get it to differentiate cursors for the different types?
if (loc_type == eLocationHotspot)
{
Hotspot *h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
int action_type = h->GetProperty("ActionType");
if (action_type == 1)
Mouse.Mode = eModeWalk;
else if (action_type == 2)
Mouse.Mode = eModeInteract;
}
Quote from: Nero_Ace on Fri 19/04/2013 12:25:00Hmm, probably this:
Also, I have an always on Inventory System. So what I need is for the cursor to automatically change to the interact icon when you hover over the GUI with the inventory system
GUIControl *ctrl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (ctrl == gInvWindow /* use your actual inventory gui script name here */)
{
// do something
}
Object *obj = Object.GetAtScreenXY(mouse.x, mouse.y);
if (obj != null)
{
// you have an object there, do what you want
}
function repeatedly_execute()
{
Object *obj = Object.GetAtScreenXY(mouse.x, mouse.y);
if (obj != null)
{
// set new mouse mode until mouse leaves object
Mouse.SaveCursorUntilItLeaves();
Mouse.Mode = eModeInteract;
}
}
function repeatedly_execute()
{
LocationType loc_type = GetLocationType(mouse.x, mouse.y);
if (loc_type != eLocationNothing)
{
Mouse.SaveCursorUntilItLeaves();
if (loc_type == eLocationHotspot)
{
Mouse.Mode = eModeWalk;
}
else if (loc_type == eLocationObject)
{
Mouse.Mode = eModeInteract;
}
// and so forth
}
}
Quote from: CaptainD on Thu 18/04/2013 12:23:25Quote from: Renodox on Wed 17/04/2013 22:03:42
Okay, this is an additional riddle but one I made up. Guess the word:
Lee the knight in light brown armor.
Surley? (Sir Lee)
function MusicChange(AudioClip*thisClip, int vol, int time, bool repeat)
{
float ftime=IntToFloat(time);
ftime=ftime/1000.0;
if (MusicChannelActive.PlayingClip != thisClip) //check to see if the active channel is already playing the requested clip
Quote from: frenzykitty on Wed 17/04/2013 20:57:03Funny I thought the same at first, although then I realized the buildings are rather the ones of a large city
Creamy: Is it Shadow of the Comet?
function on_mouse_click(MouseButton button)
{
// User clicked right mouse button
if (button == eMouseRight)
{
// If user has inventory item selected...
if (player.ActiveInventory != null)
{
// Invoke "using inventory" command
ProcessClick(mouse.x, mouse.y, eModeUseinv);
}
}
}
function on_mouse_click(MouseButton button)
{
// User clicked right mouse button
if (button == eMouseRight)
{
// Invoke "interact" command
ProcessClick(mouse.x, mouse.y, eModeInteract);
}
}
Quote from: Joseph DiPerla on Wed 17/04/2013 00:10:35Does this happen if you use 3.2.1?
Hey tzachs. I compiled the new Git upload. Still giving me that issue. It most likely is an issue on my system then.
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 2.787 seconds with 16 queries.