I made a commander (basically a retextured minifig), but i cant get it to build anything. It starts constrution, but then the unit just sits there at 0% and no nano comes out of the commander's nano-gun. I think it might be the script:
piece base, torso, Lleg, Rleg, Head, Larm, lhand, Rarm, rhand, gun, fp1, nanospray;
static-var bMoving, bAiming, Static_Var_3, Static_Var_4;
static-var restore_delay;
#define SMOKEPIECE1 base
#define SIG_MOVE 64
#include "exptype.h"
#define SIG_AIM 2
StartMoving()
{
signal SIG_MOVE;
set-signal-mask SIG_MOVE;
while(1)
{
turn base to y-axis <0> speed <200>;
wait-for-turn base around y-axis;
turn LLeg to x-axis <45> speed <200>;
turn RLeg to x-axis <-45> speed <200>;
turn Larm to x-axis <-45> speed <200>;
turn Rarm to x-axis <45> speed <200>;
wait-for-turn Lleg around x-axis;
turn LLeg to x-axis <-45> speed <200>;
turn RLeg to x-axis <45> speed <200>;
turn Larm to x-axis <45> speed <200>;
turn Rarm to x-axis <-45> speed <200>;
wait-for-turn LLeg around x-axis;
}
}
StopMoving()
{
signal SIG_MOVE;
turn LLeg to x-axis <0> speed <200>;
turn RLeg to x-axis <0> speed <200>;
turn Larm to x-axis <0> speed <200>;
turn Rarm to x-axis <0> speed <200>;
}
Create()
{
restore_delay = 2500;
}
SetMaxReloadTime(time)
{
restore_delay = time * 2;
}
RestoreAfterDelay()
{
sleep restore_delay;
// Add code to reset turret(s) to normal position
return 0;
}
SweetSpot (piecenum)
{
piecenum = base;
}
QueryPrimary (piecenum)
{
piecenum = fp1;
}
QueryNanoPiece(piecenum)
{
piecenum = nanospray;
}
StartBuilding(Func_Var_1, Func_Var_2)
{
bAiming = TRUE;
while( !Static_Var_3 )
{
sleep 100;
}
turn torso to y-axis Func_Var_1 speed <300.071429>;
turn rarm to x-axis <0.000000> - Func_Var_2 - <30.005495> speed <45.010989>;
wait-for-turn torso around y-axis;
wait-for-turn rarm around x-axis;
set INBUILDSTANCE to 1;
}
TargetCleared(Func_Var_1)
{
signal SIG_AIM;
set-signal-mask SIG_AIM;
}
StopBuilding()
{
set INBUILDSTANCE to 0;
signal SIG_AIM;
set-signal-mask SIG_AIM;
}
AimFromPrimary (piecenum)
{
piecenum = larm;
}
AimPrimary(heading, pitch)
{
signal SIG_AIM;
set-signal-mask SIG_AIM;
turn base to y-axis heading speed <150>;
wait-for-turn base around y-axis;
wait-for-turn larm around x-axis;
start-script RestoreAfterDelay();
return(TRUE);
}
FirePrimary()
{
turn larm to x-axis <-60.010989> now;
sleep 400;
turn larm to x-axis <-50> speed <500>;
sleep 150;
return(0);
}
Killed(severity, corpsetype)
{
if (severity <= 25)
{
corpsetype = 1;
explode base type FALL | BITMAP2;
explode torso type FALL | BITMAP2;
explode Lleg type FALL | BITMAP2;
explode Rleg type FALL | BITMAP2;
explode Head type FALL | BITMAP2;
explode Larm type FALL | BITMAP2;
explode lhand type FALL | BITMAP2;
explode Rarm type FALL | BITMAP2;
explode rhand type FALL | BITMAP2;
return(0);
}
if (severity <= 50)
{
corpsetype = 2;
explode base type FALL | BITMAP2;
explode torso type FALL | BITMAP2;
explode Lleg type FALL | BITMAP2;
explode Rleg type FALL | BITMAP2;
explode Head type FALL | BITMAP2;
explode Larm type FALL | BITMAP2;
explode lhand type FALL | BITMAP2;
explode Rarm type FALL | BITMAP2;
explode rhand type FALL | BITMAP2;
return(0);
}
if (severity <= 99)
{
corpsetype = 3;
explode base type FALL | BITMAP2;
explode torso type FALL | BITMAP2;
explode Lleg type FALL | BITMAP2;
explode Rleg type FALL | BITMAP2;
explode Head type FALL | BITMAP2;
explode Larm type FALL | BITMAP2;
explode lhand type FALL | BITMAP2;
explode Rarm type FALL | BITMAP2;
explode rhand type FALL | BITMAP2;
return(0);
}
corpsetype = 3;
explode base type FALL | BITMAP2;
explode torso type FALL | BITMAP2;
explode Lleg type FALL | BITMAP2;
explode Rleg type FALL | BITMAP2;
explode Head type FALL | BITMAP2;
explode Larm type FALL | BITMAP2;
explode lhand type FALL | BITMAP2;
explode Rarm type FALL | BITMAP2;
explode rhand type FALL | BITMAP2;
return(0);
}
I dont see anything wrong...
Also, here is a new video of the lego minifig getting blown to bits! (i would have used file universe but it wouldnt upload for some reason...)
http://www.yourfilelink.com/get.php?fid=43384