This buggar won't move and fire

This buggar won't move and fire

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Complicated
Posts: 369
Joined: 06 Jun 2007, 18:51

This buggar won't move and fire

Post by Complicated »

AK Commando is being a noob by refusing to move and fire.

Code: Select all

#define TA			// This is a TA script

#include "sfxtype.h"
#include "exptype.h"

piece  torso, ruparm, luparm, rfire, lfire, rloarm, lloarm, pelvis,
       rleg, rfoot, lleg, lfoot, head, lthigh, rthigh, ground;

static-var  bMoving, bAiming, Static_Var_3, gun_1;

// Signal definitions
#define SIG_AIM				4


walk()
{
	if( bMoving )
	{
		move pelvis to y-axis [-0.450000] now;
		move rleg to y-axis [0.000000] now;
		move rleg to z-axis [0.000000] now;
		move rfoot to z-axis [0.000000] now;
		move lleg to y-axis [0.000000] now;
		move lleg to z-axis [0.000000] now;
		move lfoot to z-axis [0.000000] now;
		move head to y-axis [0.000000] now;
		move luparm to x-axis [0.000000] now;
		move luparm to y-axis [0.000000] now;
		move luparm to z-axis [0.000000] now;
		move ruparm to x-axis [0.000000] now;
		move ruparm to y-axis [0.000000] now;
		move ruparm to z-axis [0.000000] now;
		move rloarm to x-axis [0.000000] now;
		move rfire to x-axis [0.000000] now;
		move lloarm to x-axis [0.000000] now;
		move lfire to x-axis [0.000000] now;
		turn pelvis to x-axis <-0.439560> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <11.071429> now;
		turn rthigh to x-axis <-42.071429> now;
		turn rleg to x-axis <-4.868132> now;
		turn rfoot to x-axis <46.945055> now;
		turn lleg to x-axis <61.010989> now;
		turn lfoot to x-axis <-50.395604> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.400000] now;
		turn pelvis to x-axis <-3.098901> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <34.098901> now;
		turn rthigh to x-axis <-27.901099> now;
		turn rleg to x-axis <-6.642857> now;
		turn rfoot to x-axis <37.642857> now;
		turn lleg to x-axis <33.626374> now;
		turn lfoot to x-axis <-24.615385> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.300000] now;
		turn pelvis to x-axis <-4.868132> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <28.758242> now;
		turn rthigh to x-axis <-19.043956> now;
		turn rleg to x-axis <-4.428571> now;
		turn rfoot to x-axis <27.901099> now;
		turn lleg to x-axis <13.736264> now;
		turn lfoot to x-axis <-25.994505> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.100000] now;
		turn pelvis to x-axis <-6.197802> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <12.824176> now;
		turn rthigh to x-axis <0.000000> now;
		turn rleg to x-axis <3.098901> now;
		turn rfoot to x-axis <2.214286> now;
		turn lleg to x-axis <-12.346154> now;
		turn lfoot to x-axis <7.659341> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-4.868132> now;
		turn torso to x-axis <12.307692> now;
		turn lthigh to x-axis <-19.483516> now;
		turn rthigh to x-axis <1.769231> now;
		turn rleg to x-axis <8.412088> now;
		turn rfoot to x-axis <-6.197802> now;
		turn lleg to x-axis <-16.829670> now;
		turn lfoot to x-axis <42.516484> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.350000] now;
		turn pelvis to x-axis <-3.098901> now;
		turn torso to x-axis <12.307692> now;
		turn lthigh to x-axis <-32.329670> now;
		turn rthigh to x-axis <13.285714> now;
		turn rleg to x-axis <23.170330> now;
		turn rfoot to x-axis <-33.186813> now;
		turn lfoot to x-axis <7.362637> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.400000] now;
		turn pelvis to x-axis <-0.439560> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <-36.318681> now;
		turn rleg to x-axis <43.582418> now;
		turn rfoot to x-axis <-43.153846> now;
		turn lleg to x-axis <-10.093407> now;
		turn lfoot to x-axis <28.241758> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.450000] now;
		turn pelvis to x-axis <-0.439560> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <-42.071429> now;
		turn rthigh to x-axis <12.840659> now;
		turn rleg to x-axis <60.697802> now;
		turn rfoot to x-axis <-44.835165> now;
		turn lleg to x-axis <-4.428571> now;
		turn lfoot to x-axis <46.945055> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.400000] now;
		turn pelvis to x-axis <-3.098901> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <-32.774725> now;
		turn rthigh to x-axis <34.098901> now;
		turn rleg to x-axis <23.626374> now;
		turn rfoot to x-axis <-10.802198> now;
		turn lleg to x-axis <-5.752747> now;
		turn lfoot to x-axis <42.516484> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.300000] now;
		turn pelvis to x-axis <-4.868132> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <-25.241758> now;
		turn rthigh to x-axis <28.785714> now;
		turn rleg to x-axis <10.532967> now;
		turn rfoot to x-axis <-20.994505> now;
		turn lleg to x-axis <-3.983516> now;
		turn lfoot to x-axis <33.659341> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.099994] now;
		turn pelvis to x-axis <-6.197802> now;
		turn torso to x-axis <12.659341> now;
		turn lthigh to x-axis <-12.401099> now;
		turn rthigh to x-axis <-0.439560> now;
		turn rleg to x-axis <-11.670330> now;
		turn rfoot to x-axis <22.989011> now;
		turn lleg to x-axis <4.126374> now;
		turn lfoot to x-axis <14.027473> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-4.868132> now;
		turn lthigh to x-axis <0.000000> now;
		turn rthigh to x-axis <-19.483516> now;
		turn rleg to x-axis <-20.318681> now;
		turn rfoot to x-axis <23.450549> now;
		turn lleg to x-axis <24.208791> now;
		turn lfoot to x-axis <-20.747253> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.350000] now;
		turn pelvis to x-axis <-3.098901> now;
		turn lthigh to x-axis <9.296703> now;
		turn rthigh to x-axis <-28.785714> now;
		turn rleg to x-axis <-25.241758> now;
		turn rfoot to x-axis <26.126374> now;
		turn lleg to x-axis <31.884615> now;
		turn lfoot to x-axis <-37.642857> now;
		sleep 60;
	}
	move pelvis to y-axis [-0.400000] now;
	turn pelvis to x-axis <-0.439560> now;
	turn torso to x-axis <12.659341> now;
	turn lthigh to x-axis <11.071429> now;
	turn rthigh to x-axis <-37.203297> now;
	turn rleg to x-axis <-9.296703> now;
	turn rfoot to x-axis <6.115385> now;
	turn lleg to x-axis <47.620879> now;
	turn lfoot to x-axis <-47.428571> now;
	sleep 60;
}

walklegs()
{
	if( bMoving )
	{
		move pelvis to y-axis [-0.450000] now;
		move rleg to y-axis [0.000000] now;
		move rleg to z-axis [0.000000] now;
		move rfoot to z-axis [0.000000] now;
		move lleg to y-axis [0.000000] now;
		move lleg to z-axis [0.000000] now;
		move lfoot to z-axis [0.000000] now;
		move head to y-axis [0.000000] now;
		move luparm to x-axis [0.000000] now;
		move luparm to y-axis [0.000000] now;
		move luparm to z-axis [0.000000] now;
		move ruparm to x-axis [0.000000] now;
		move ruparm to y-axis [0.000000] now;
		move ruparm to z-axis [0.000000] now;
		move rloarm to x-axis [0.000000] now;
		move rfire to x-axis [0.000000] now;
		move lloarm to x-axis [0.000000] now;
		move lfire to x-axis [0.000000] now;
		turn pelvis to x-axis <-0.439560> now;
		turn lthigh to x-axis <11.071429> now;
		turn rthigh to x-axis <-42.071429> now;
		turn rleg to x-axis <-4.868132> now;
		turn rfoot to x-axis <46.945055> now;
		turn lleg to x-axis <61.010989> now;
		turn lfoot to x-axis <-50.395604> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.400000] now;
		turn pelvis to x-axis <-3.098901> now;
		turn lthigh to x-axis <34.098901> now;
		turn rthigh to x-axis <-27.901099> now;
		turn rleg to x-axis <-6.642857> now;
		turn rfoot to x-axis <37.642857> now;
		turn lleg to x-axis <33.626374> now;
		turn lfoot to x-axis <-24.615385> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.300000] now;
		turn pelvis to x-axis <-4.868132> now;
		turn lthigh to x-axis <28.758242> now;
		turn rthigh to x-axis <-19.043956> now;
		turn rleg to x-axis <-4.428571> now;
		turn rfoot to x-axis <27.901099> now;
		turn lleg to x-axis <13.736264> now;
		turn lfoot to x-axis <-25.994505> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.100000] now;
		turn pelvis to x-axis <-6.197802> now;
		turn lthigh to x-axis <12.824176> now;
		turn rthigh to x-axis <0.000000> now;
		turn rleg to x-axis <3.098901> now;
		turn rfoot to x-axis <2.214286> now;
		turn lleg to x-axis <-12.346154> now;
		turn lfoot to x-axis <7.659341> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-4.868132> now;
		turn lthigh to x-axis <-19.483516> now;
		turn rthigh to x-axis <1.769231> now;
		turn rleg to x-axis <8.412088> now;
		turn rfoot to x-axis <-6.197802> now;
		turn lleg to x-axis <-16.829670> now;
		turn lfoot to x-axis <42.516484> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.350000] now;
		turn pelvis to x-axis <-3.098901> now;
		turn lthigh to x-axis <-32.329670> now;
		turn rthigh to x-axis <13.285714> now;
		turn rleg to x-axis <23.170330> now;
		turn rfoot to x-axis <-33.186813> now;
		turn lfoot to x-axis <7.362637> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.400000] now;
		turn pelvis to x-axis <-0.439560> now;
		turn lthigh to x-axis <-36.318681> now;
		turn rleg to x-axis <43.582418> now;
		turn rfoot to x-axis <-43.153846> now;
		turn lleg to x-axis <-10.093407> now;
		turn lfoot to x-axis <28.241758> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.450000] now;
		turn pelvis to x-axis <-0.439560> now;
		turn lthigh to x-axis <-42.071429> now;
		turn rthigh to x-axis <12.840659> now;
		turn rleg to x-axis <60.697802> now;
		turn rfoot to x-axis <-44.835165> now;
		turn lleg to x-axis <-4.428571> now;
		turn lfoot to x-axis <46.945055> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.400000] now;
		turn pelvis to x-axis <-3.098901> now;
		turn lthigh to x-axis <-32.774725> now;
		turn rthigh to x-axis <34.098901> now;
		turn rleg to x-axis <23.626374> now;
		turn rfoot to x-axis <-10.802198> now;
		turn lleg to x-axis <-5.752747> now;
		turn lfoot to x-axis <42.516484> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.300000] now;
		turn pelvis to x-axis <-4.868132> now;
		turn lthigh to x-axis <-25.241758> now;
		turn rthigh to x-axis <28.785714> now;
		turn rleg to x-axis <10.532967> now;
		turn rfoot to x-axis <-20.994505> now;
		turn lleg to x-axis <-3.983516> now;
		turn lfoot to x-axis <33.659341> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.099994] now;
		turn pelvis to x-axis <-6.197802> now;
		turn lthigh to x-axis <-12.401099> now;
		turn rthigh to x-axis <-0.439560> now;
		turn rleg to x-axis <-11.670330> now;
		turn rfoot to x-axis <22.989011> now;
		turn lleg to x-axis <4.126374> now;
		turn lfoot to x-axis <14.027473> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-4.868132> now;
		turn lthigh to x-axis <0.000000> now;
		turn rthigh to x-axis <-19.483516> now;
		turn rleg to x-axis <-20.318681> now;
		turn rfoot to x-axis <23.450549> now;
		turn lleg to x-axis <24.208791> now;
		turn lfoot to x-axis <-20.747253> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [-0.350000] now;
		turn pelvis to x-axis <-3.098901> now;
		turn lthigh to x-axis <9.296703> now;
		turn rthigh to x-axis <-28.785714> now;
		turn rleg to x-axis <-25.241758> now;
		turn rfoot to x-axis <26.126374> now;
		turn lleg to x-axis <31.884615> now;
		turn lfoot to x-axis <-37.642857> now;
		sleep 60;
	}
	move pelvis to y-axis [-0.400000] now;
	turn pelvis to x-axis <-0.439560> now;
	turn lthigh to x-axis <11.071429> now;
	turn rthigh to x-axis <-37.203297> now;
	turn rleg to x-axis <-9.296703> now;
	turn rfoot to x-axis <6.115385> now;
	turn lleg to x-axis <47.620879> now;
	turn lfoot to x-axis <-47.428571> now;
	sleep 60;
}

SmokeUnit(healthpercent, sleeptime, smoketype)
{
	while( get BUILD_PERCENT_LEFT )
	{
		sleep 400;
	}
	while( TRUE )
	{
		healthpercent = get HEALTH;
		if( healthpercent < 66 )
		{
			smoketype = 256 | 2;
			if( Rand( 1, 66 ) < healthpercent )
			{
				smoketype = 256 | 1;
			}
			emit-sfx smoketype from torso;
		}
		sleeptime = healthpercent * 50;
		if( sleeptime < 200 )
		{
			sleeptime = 200;
		}
		sleep sleeptime;
	}
}

MotionControl(moving, aiming, justmoved)
{
	justmoved = TRUE;
	while( TRUE )
	{
		moving = bMoving;
		aiming = bAiming;
		if( moving )
		{
			if( aiming )
			{
				Static_Var_3 = 1;
				call-script walklegs();
			}
			if( !aiming )
			{
				Static_Var_3 = 0;
				call-script walk();
			}
			justmoved = TRUE;
		}
		if( !moving )
		{
			Static_Var_3 = 1;
			if( justmoved )
			{
				move pelvis to y-axis [0.000000] speed [1.000000];
				turn rthigh to x-axis <0.000000> speed <200.043956>;
				turn rleg to x-axis <0.000000> speed <200.043956>;
				turn rfoot to x-axis <0.000000> speed <200.043956>;
				turn lthigh to x-axis <0.000000> speed <200.043956>;
				turn lleg to x-axis <0.000000> speed <200.043956>;
				turn lfoot to x-axis <0.000000> speed <200.043956>;
				if( !aiming )
				{
					turn torso to y-axis <0.000000> speed <90.021978>;
					turn rloarm to x-axis <0.000000> speed <200.043956>;
					turn ruparm to x-axis <0.000000> speed <200.043956>;
					turn lloarm to x-axis <0.000000> speed <200.043956>;
					turn luparm to x-axis <0.000000> speed <200.043956>;
				}
				justmoved = FALSE;
			}
			sleep 100;
		}
	}
}

Create()
{
	hide rfire;
	hide lfire;
	bMoving = FALSE;
	bAiming = FALSE;
	Static_Var_3 = 1;
	gun_1 = torso;
	start-script MotionControl();
	start-script SmokeUnit();
}

StartMoving()
{
	bMoving = TRUE;
}

StopMoving()
{
	bMoving = FALSE;
}

SweetSpot(piecenum)
{
	piecenum = torso;
}

RestoreAfterDelay()
{
	sleep 2750;
	turn torso to y-axis <0.000000> speed <90.021978>;
	turn ruparm to x-axis <0.000000> speed <45.010989>;
	turn luparm to x-axis <0.000000> speed <45.010989>;
	wait-for-turn torso around y-axis;
	wait-for-turn ruparm around x-axis;
	wait-for-turn luparm around x-axis;
	bAiming = FALSE;
}

AimFromPrimary(piecenum)
{
	piecenum = torso;
}

QueryPrimary(piecenum)
{
	if( gun_1 == 0 )
	{
		piecenum = rfire;
	}
	if( gun_1 == 1 )
	{
		piecenum = lfire;
	}
}

AimPrimary(heading, pitch)
{
	signal SIG_AIM;
	set-signal-mask SIG_AIM;
	bAiming = TRUE;
	while( !Static_Var_3 )
	{
		sleep 100;
	}
	turn torso to y-axis heading speed <90.021978>;
	turn luparm to x-axis <0.000000> - pitch speed <45.010989>;
	turn ruparm to x-axis <0.000000> - pitch speed <45.010989>;
	wait-for-turn torso around y-axis;
	wait-for-turn luparm around x-axis;
	wait-for-turn ruparm around x-axis;
	start-script RestoreAfterDelay();
	return (1);
}

FirePrimary()
{
	if( gun_1 == 0 )
	{
		show rfire;
		sleep 100;
		hide rfire;
		gun_1 = ruparm;
		return (0);
	}
	if( gun_1 == 1 )
	{
		show lfire;
		sleep 100;
		hide lfire;
		gun_1 = torso;
		return (0);
	}
}

Killed(severity, corpsetype)
{
	hide rfire;
	hide lfire;
	if( severity <= 25 )
	{
		corpsetype = 1;
		explode ground type BITMAPONLY | BITMAP1;
		explode head type BITMAPONLY | BITMAP2;
		explode lfire type BITMAPONLY | BITMAP3;
		explode lfoot type BITMAPONLY | BITMAP4;
		explode lleg type BITMAPONLY | BITMAP5;
		explode lloarm type BITMAPONLY | BITMAP1;
		explode lthigh type BITMAPONLY | BITMAP2;
		explode luparm type BITMAPONLY | BITMAP3;
		explode pelvis type BITMAPONLY | BITMAP4;
		explode rfire type BITMAPONLY | BITMAP5;
		explode rfoot type BITMAPONLY | BITMAP1;
		explode rleg type BITMAPONLY | BITMAP2;
		explode rloarm type BITMAPONLY | BITMAP3;
		explode rthigh type BITMAPONLY | BITMAP4;
		explode ruparm type BITMAPONLY | BITMAP5;
		explode torso type BITMAPONLY | BITMAP1;
		return (0);
	}
	if( severity <= 50 )
	{
		corpsetype = 2;
		explode ground type FALL | BITMAP1;
		explode head type FALL | BITMAP2;
		explode lfire type FALL | BITMAP3;
		explode lfoot type FALL | BITMAP4;
		explode lleg type FALL | BITMAP5;
		explode lloarm type FALL | BITMAP1;
		explode lthigh type FALL | BITMAP2;
		explode luparm type FALL | BITMAP3;
		explode pelvis type FALL | BITMAP4;
		explode rfire type FALL | BITMAP5;
		explode rfoot type FALL | BITMAP1;
		explode rleg type FALL | BITMAP2;
		explode rloarm type FALL | BITMAP3;
		explode rthigh type FALL | BITMAP4;
		explode ruparm type FALL | BITMAP5;
		explode torso type SHATTER | BITMAP1;
		return (0);
	}
	if( severity <= 99 )
	{
		corpsetype = 3;
		explode ground type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
		explode head type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
		explode lfire type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
		explode lfoot type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
		explode lleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
		explode lloarm type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
		explode lthigh type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
		explode luparm type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
		explode pelvis type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
		explode rfire type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
		explode rfoot type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
		explode rleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
		explode rloarm type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
		explode rthigh type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
		explode ruparm type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
		explode torso type SHATTER | BITMAP1;
		return (0);
	}
	corpsetype = 3;
	explode ground type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
	explode head type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
	explode lfire type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
	explode lfoot type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
	explode lleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
	explode lloarm type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
	explode lthigh type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
	explode luparm type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
	explode pelvis type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
	explode rfire type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
	explode rfoot type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP1;
	explode rleg type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
	explode rloarm type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
	explode rthigh type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
	explode ruparm type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP5;
	explode torso type SHATTER | EXPLODE_ON_HIT | BITMAP1;
}

 
IR a newb to scripting so enlighten me please :]
Last edited by Complicated on 16 Oct 2007, 22:37, edited 1 time in total.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Post the whole script.
User avatar
Complicated
Posts: 369
Joined: 06 Jun 2007, 18:51

Post by Complicated »

there
User avatar
Complicated
Posts: 369
Joined: 06 Jun 2007, 18:51

Post by Complicated »

there
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

yea

Post by rcdraco »

Something with bAiming, and bMoving, I think. Not sure how you can safely remove it without remaking the whole script. >_<
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Remove the while loop in AimPrimary.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

This only prevents it from aiming while playing the other walking animation. Probably an issue with a messy unit or weapon definition.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Better to return out of the function than to stick a while loop in it, as far as Spring goes.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

I'd never use a cavedog script anyway and control my animation loop through some true false statements.

I think the while loop was necessary for OTA because the units aim less often.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Yes, but loops in Spring aim functions tend to lock things up.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Hm never noticed. Don't all armed kbot use a script like this?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

It's possible that I'm totally barking up the wrong tree. :wink:
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

This script has no set MAX_SPEED commands in it, so 'unit not moving' problem is not caused by it. Look into your FBI file, you probably have a bad movement class there or just a 0 MaxVelocity.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

FLOZi wrote:Better to return out of the function than to stick a while loop in it, as far as Spring goes.
I disagree, as long as your signal stuff is before the loop that won't get critical and it allows faster response.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Am I the only one that took 'won't move and fire' to mean ' won't fire while moving'?
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Post by Pressure Line »

FLOZi wrote:Am I the only one that took 'won't move and fire' to mean ' won't fire while moving'?
i did.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

rattle wrote:Probably an issue with a messy unit or weapon definition.
Well I think got it right.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

FLOZi wrote:Am I the only one that took 'won't move and fire' to mean ' won't fire while moving'?
I understood it as that too.
User avatar
Complicated
Posts: 369
Joined: 06 Jun 2007, 18:51

Post by Complicated »

So the solution is ? xD
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Check your unit and weapon definitions for typos or what yuritch said.
Post Reply

Return to “Game Development”