I myself had no time due to a project I'm working on so I asked Creamy to start a new one, but as that never happened: be my guest and give it a go

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: Peegee on Sat 20/11/2021 11:09:20You should put 'player.x' & 'player.y', as these two are the player character's positions.
(you must not put "player.", Only the positions) but it does not work.
Error: Specified argument was out of the range of valid values.
Version: AGS 3.5.1.11
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
at WeifenLuo.WinFormsUI.Docking.DockContentCollection.GetVisibleContent(Int32 index)
at WeifenLuo.WinFormsUI.Docking.DockContentCollection.get_Item(Int32 index)
at WeifenLuo.WinFormsUI.Docking.DockPaneStripBase.TabCollection.get_Item(Int32 index)
at WeifenLuo.WinFormsUI.Docking.VS2005DockPaneStrip.EnsureDocumentTabVisible(IDockContent content, Boolean repaint)
at WeifenLuo.WinFormsUI.Docking.VS2005DockPaneStrip.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at WeifenLuo.WinFormsUI.Docking.DockPaneStripBase.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Quote 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;
}
}
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.110 seconds with 15 queries.