Thread: Modding SW3?
View Single Post
  #462  
Old 01-23-2015, 01:41 PM
Nanaki Nanaki is offline
Approved Member
 
Join Date: Mar 2010
Posts: 338
Default

The problem is that you need a small delay between selecting the ability and opening the dialogue window, otherwise it instantly CTDs. Here is a snippet of code from one of my pet projects.

Code:
function CommandConsole_1(x, y, z, ship, duration)
	setglobal("x", x);
	setglobal("y", y);
	setglobal("z", z);
	setglobal("ship", ship);
	Timer_Seq(0.1, SummonConsole);
end;

function SummonConsole()
	StartTradeDialog("DialogNC","SummonConsole_Init");
end;
Reply With Quote