Open your antivirus software and add the folder where AGS is installed as an exclusion.
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: Slasher on Mon 13/09/2021 03:43:48AddWaypoint is for characters, not for objects.
You need to change Move to AddWaypoint command which is also non blocking in the background...
// room script file
bool carIsMoving;
int waitUntilNextCarStarts;
function room_Load()
{
oFlyCars1.X = -50;
oFlyCars1.Y = 26;
oFlyCars2.X = -50;
oFlyCars2.Y = 26;
oFlyCars3.X = -50;
oFlyCars3.Y = 26;
carIsMoving = false;
waitUntilNextCarStarts = 120; //40 is 1 second
}
function room_RepExec()
{
if (carIsMoving == false) int ranCar = Random (2);
if (ranCar == 0)
{
oFlyCars1.Move (380, 26, 10, eNoBlock, eAnywhere);
carIsMoving = true;
}
else if (ranCar == 1)
{
oFlyCars2.Move (380, 26, 10, eNoBlock, eAnywhere);
carIsMoving = true;
}
else if (ranCar == 2)
{
oFlyCars3.Move (380, 26, 10, eNoBlock, eAnywhere);
carIsMoving = true;
}
if ((oFlyCars1.X == 380) || (oFlyCars2.X == 380) || (oFlyCars3.X == 380))
{
oFlyCars1.SetPosition (-50, 26);
oFlyCars2.SetPosition (-50, 26);
oFlyCars3.SetPosition (-50, 26);
SetTimer (1, waitUntilNextCarStarts);
}
if (IsTimerExpired (1)
{
carIsMoving = false;
}
}
function on_event(EventType event, int data)
{
if (event == eEventGUIMouseDown)
{
if (mouse.IsButtonDown(eMouseLeft))
{
GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (theControl==invCustom)
{
InventoryItem *item = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
if (item == null) {}
else if (item != null)
{
if (mouse.Mode == eModeLookat) item.RunInteraction(eModeLookat);
else if (mouse.Mode == eModeInteract)
{
if (player.ActiveInventory != null) {}
else if (player.ActiveInventory == null)
{
player.ActiveInventory = item;
mouse.Mode = eModeUseinv;
}
}
else if (mouse.Mode == eModeUseinv) item.RunInteraction(eModeUseinv);
}
}
}
else if (mouse.IsButtonDown(eMouseRight))
{
if (player.ActiveInventory != null)
{
player.ActiveInventory = null;
mouse.Mode = eModeInteract;
}
else if (player.ActiveInventory == null)
{
if (mouse.Mode == eModeLookat) mouse.Mode = eModeInteract;
else if (mouse.Mode == eModeInteract) mouse.Mode = eModeLookat;
}
}
}
}
QuoteNote that the maximum length for the name of an inventory item is 24 characters - if the name you set is longer than this, it will be truncated.
Quote from: Crimson Wizard on Wed 08/09/2021 02:55:47
If you still want long names, this problem may be worked around by coding your own text display instead of @overhotspot@ and reading item name from a custom property or an array in script etc.
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.058 seconds with 15 queries.