|
Post by papadan56 on Jul 28, 2014 17:58:46 GMT 1
hello, does anyone knows if the units commands 23 and 24 are working while scripting...i have tried to get them working in my script and nothing is happening.....
function RepairUnit0() local A_Repair = 24; Cmd (A_Repair, 64,65); --64 is a repair truck and 65 a dammaged tank Suicide(); end;
function Resupply0() local A_Resupply = 23; Cmd (A_Resupply, 66,67); --66 is a supply truck and 67 a tank Suicide(); end;
RunScript( "RepairUnit0", 30000); RunScript( "Resupply0", 35000);
thanks....
|
|
|
Post by Major Pain on Jul 28, 2014 18:46:18 GMT 1
Yes they do function... but I need a bit more info before i can rule out a few things...
One thing I can see right off the bat is you need to add a space in front of 65 and 67... That in itself can cause the Cmd to fail. The space is necessary in LUA after a comma because the space is expected. If something other than a space is there, it reads like a end of line command.
function RepairUnit0()
local A_Repair = 24;
Cmd (A_Repair, 64, 65); --64 is a repair truck and 65 a dammaged tank
Suicide();
end;
function Resupply0()
local A_Resupply = 23;
Cmd (A_Resupply, 66, 67); --66 is a supply truck and 67 a tank
Suicide();
end;
If that does not solve this issue, then answer these questions:
How close are the Engineers and Supply Truck?
Are you moving the Engineers and Supply Truck with the Cmd script then giving them the Cmd 23/24 code?
If so, how are the CMD 23/24 codes given... before they reach the area or after the script confirms they have arrived?
There are a couple of other possibilities that can prevent the action. What I think is going on is the Triggers is firing as written, but it is before they can perform the action if they are still under the control of a previous Cmd code.
Try adding a Display Trace into each function to confirm they are firing, and pay attention to what they are doing when you get the trace...
|
|
|
Post by Quintaxel on Jul 28, 2014 18:58:43 GMT 1
According Calvin's guide,V 1.6 the commands Cmd(24,...) and Cmd (23...) cannot be called through script. It would be nice if it was possible.
|
|
|
Post by Major Pain on Jul 28, 2014 19:23:49 GMT 1
I have seen this work... not a common script but La Plata used it in Patton I'm going to verify this... because now you got me thinking about it...
|
|
|
Post by papadan56 on Jul 31, 2014 0:02:38 GMT 1
Thank you for your help....very appreciated
|
|
|
Post by Major Pain on Jul 31, 2014 4:01:23 GMT 1
Did you get it working?
|
|
|
Post by papadan56 on Jul 31, 2014 22:47:52 GMT 1
nope.....not with the script...but yes with the mapeditor....
|
|
|
Post by Major Pain on Aug 1, 2014 1:46:49 GMT 1
Ok... perhaps I was wrong... or remember wrong... Damn it... I was wrong... So much for my 12% correct level now...
|
|