Jump to content

Recommended Posts

Posted

Hello all

When I run the following function, DCS crashes.

function gotoWP()
	local goToWaypoint= { 
		id = 'goToWaypoint',
		params = { 
			fromWaypointIndex = 1,  
			goToWaypointIndex = 10, 
			} 
		}
	Group.getByName('Air-1'):getController():pushTask(goToWaypoint)
end

 

With this alternative function nothing happens at all.

function gotoWP()
	local SwitchWaypoint = { 
	id = 'SwitchWaypoint', 
	params = { 
		fromWaypointIndex = 1,  
		goToWaypointIndex = 10, 
		} 
	}
	Group.getByName('Air-1'):getController():setCommand(SwitchWaypoint)
end

Am I missing something or is this a bug?

Thanks for your help

Posted

goToWaypoint is the task for ground and ship groups. Switch waypoint is for aircraft. I need to report the crash issue because it is easy to get them mixed up and it should be handled. Out of curiosity is waypoint 10 the landing waypoint? If it is then try setting it to 9 or add a waypoint over the base. AI ignore the task if told to go to a landing waypoint. 

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • 1 month later...
Posted
On 12/26/2022 at 6:08 AM, Grimes said:

AI ignore the task if told to go to a landing waypoint. 

Could that be mentioned somewhere in the 'documentation' as well as all the other 'gotchas' that no one would otherwise know. I've spent months wondering why this wasn't working and trying to fix it. What a waste of damn time...

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...