Unit request: Heavy rocket kbot
Moderators: MR.D, Moderators
Spring checks if the script tries to show a flare from inside the fireprimary etc functions and in that case replaces it with a Spring made muzzleflame instead.
Hm yes it seems like the scripts only expect fireprimary once per burst instead of once per shot which will make it a bit hard to switch in time.
I guess I could ask fnordia to add a EndBurst<weapon num> function that will be called at the end of a burst if you feel that that will help?
			
			
									
						
										
						Hm yes it seems like the scripts only expect fireprimary once per burst instead of once per shot which will make it a bit hard to switch in time.
I guess I could ask fnordia to add a EndBurst<weapon num> function that will be called at the end of a burst if you feel that that will help?
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
http://www.fileuniverse.com/?p=showitem&ID=1523
Okay, this is the latest Revision.
I still couldn't get the rocket's flare to be closer to the rocket's model though.
BTW made the 1000th post in the art section do I get a price? lol
 do I get a price? lol
			
			
									
						
										
						Okay, this is the latest Revision.
I still couldn't get the rocket's flare to be closer to the rocket's model though.
BTW made the 1000th post in the art section
 do I get a price? lol
 do I get a price? lol- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
No, maby a prize thoughGrOuNd_ZeRo wrote:http://www.fileuniverse.com/?p=showitem&ID=1523
Okay, this is the latest Revision.
I still couldn't get the rocket's flare to be closer to the rocket's model though.
BTW made the 1000th post in the art sectiondo I get a price? lol

- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
Damn, I didn't include the BOS?!
Well, I'll post it here...
please forgive the static_var_x bull, but Scriptor likes to do that.... 
			
			
									
						
										
						Well, I'll post it here...
Code: Select all
#define TA			// This is a TA script
#include "sfxtype.h"
#include "exptype.h"
piece  torso, pelvis, rleg, rfoot, lleg, lfoot, head, lthigh,
       rthigh, ground, launchers, rfire, lfire;
static-var  bMoving, bAiming, Static_Var_3, gun_1;
// Signal definitions
#define SIG_AIM				4
SmokeUnit(healthpercent, sleeptime, smoketype)
{
	var Func_Var_4;
	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;
	}
}
walk()
{
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] 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;
		turn pelvis to x-axis <0.000000> now;
		turn lthigh to x-axis <11.000000> now;
		turn rthigh to x-axis <-42.000000> now;
		turn rleg to x-axis <-5.000000> now;
		turn rfoot to x-axis <47.000000> now;
		turn lleg to x-axis <61.000000> now;
		turn lfoot to x-axis <-50.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-3.000000> now;
		turn lthigh to x-axis <34.000000> now;
		turn rthigh to x-axis <-28.000000> now;
		turn rleg to x-axis <-7.000000> now;
		turn rfoot to x-axis <38.000000> now;
		turn lleg to x-axis <34.000000> now;
		turn lfoot to x-axis <-25.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-5.000000> now;
		turn lthigh to x-axis <29.000000> now;
		turn rthigh to x-axis <-19.000000> now;
		turn rleg to x-axis <-5.000000> now;
		turn rfoot to x-axis <28.000000> now;
		turn lleg to x-axis <14.000000> now;
		turn lfoot to x-axis <-26.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-6.000000> now;
		turn lthigh to x-axis <13.000000> now;
		turn rthigh to x-axis <0.000000> now;
		turn rleg to x-axis <3.000000> now;
		turn rfoot to x-axis <2.000000> now;
		turn lleg to x-axis <-12.000000> now;
		turn lfoot to x-axis <8.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-5.000000> now;
		turn lthigh to x-axis <-19.000000> now;
		turn rthigh to x-axis <2.000000> now;
		turn rleg to x-axis <8.000000> now;
		turn rfoot to x-axis <-6.000000> now;
		turn lleg to x-axis <-17.000000> now;
		turn lfoot to x-axis <43.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-3.000000> now;
		turn lthigh to x-axis <-32.000000> now;
		turn rthigh to x-axis <13.000000> now;
		turn rleg to x-axis <23.000000> now;
		turn rfoot to x-axis <-33.000000> now;
		turn lfoot to x-axis <7.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <0.000000> now;
		turn lthigh to x-axis <-37.000000> now;
		turn rleg to x-axis <44.000000> now;
		turn rfoot to x-axis <-43.000000> now;
		turn lleg to x-axis <-10.000000> now;
		turn lfoot to x-axis <28.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <0.000000> now;
		turn lthigh to x-axis <-42.000000> now;
		turn rthigh to x-axis <13.000000> now;
		turn rleg to x-axis <61.000000> now;
		turn rfoot to x-axis <-45.000000> now;
		turn lleg to x-axis <-5.000000> now;
		turn lfoot to x-axis <47.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-3.000000> now;
		turn lthigh to x-axis <-33.000000> now;
		turn rthigh to x-axis <34.000000> now;
		turn rleg to x-axis <24.000000> now;
		turn rfoot to x-axis <-11.000000> now;
		turn lleg to x-axis <-6.000000> now;
		turn lfoot to x-axis <43.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-5.000000> now;
		turn lthigh to x-axis <-25.000000> now;
		turn rthigh to x-axis <29.000000> now;
		turn rleg to x-axis <11.000000> now;
		turn rfoot to x-axis <-21.000000> now;
		turn lleg to x-axis <-4.000000> now;
		turn lfoot to x-axis <34.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-6.000000> now;
		turn lthigh to x-axis <-12.000000> now;
		turn rthigh to x-axis <0.000000> now;
		turn rleg to x-axis <-12.000000> now;
		turn rfoot to x-axis <23.000000> now;
		turn lleg to x-axis <4.000000> now;
		turn lfoot to x-axis <14.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-5.000000> now;
		turn lthigh to x-axis <0.000000> now;
		turn rthigh to x-axis <-20.000000> now;
		turn rleg to x-axis <-20.000000> now;
		turn rfoot to x-axis <23.000000> now;
		turn lleg to x-axis <24.000000> now;
		turn lfoot to x-axis <-21.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-3.000000> now;
		turn lthigh to x-axis <9.000000> now;
		turn rthigh to x-axis <-29.000000> now;
		turn rleg to x-axis <-25.000000> now;
		turn rfoot to x-axis <26.000000> now;
		turn lleg to x-axis <32.000000> now;
		turn lfoot to x-axis <-38.000000> now;
		sleep 60;
	}
	move pelvis to y-axis [0.000000] now;
	turn pelvis to x-axis <0.000000> now;
	turn lthigh to x-axis <11.000000> now;
	turn rthigh to x-axis <-37.000000> now;
	turn rleg to x-axis <-9.000000> now;
	turn rfoot to x-axis <6.000000> now;
	turn lleg to x-axis <48.000000> now;
	turn lfoot to x-axis <-47.000000> now;
	sleep 60;
}
walklegs()
{
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] 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;
		turn pelvis to x-axis <0.000000> now;
		turn lthigh to x-axis <11.000000> now;
		turn rthigh to x-axis <-42.000000> now;
		turn rleg to x-axis <-5.000000> now;
		turn rfoot to x-axis <47.000000> now;
		turn lleg to x-axis <61.000000> now;
		turn lfoot to x-axis <-50.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-3.000000> now;
		turn lthigh to x-axis <34.000000> now;
		turn rthigh to x-axis <-28.000000> now;
		turn rleg to x-axis <-7.000000> now;
		turn rfoot to x-axis <38.000000> now;
		turn lleg to x-axis <34.000000> now;
		turn lfoot to x-axis <-25.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-5.000000> now;
		turn lthigh to x-axis <29.000000> now;
		turn rthigh to x-axis <-19.000000> now;
		turn rleg to x-axis <-5.000000> now;
		turn rfoot to x-axis <28.000000> now;
		turn lleg to x-axis <14.000000> now;
		turn lfoot to x-axis <-26.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-6.000000> now;
		turn lthigh to x-axis <13.000000> now;
		turn rthigh to x-axis <0.000000> now;
		turn rleg to x-axis <3.000000> now;
		turn rfoot to x-axis <2.000000> now;
		turn lleg to x-axis <-12.000000> now;
		turn lfoot to x-axis <8.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-5.000000> now;
		turn lthigh to x-axis <-19.000000> now;
		turn rthigh to x-axis <2.000000> now;
		turn rleg to x-axis <8.000000> now;
		turn rfoot to x-axis <-6.000000> now;
		turn lleg to x-axis <-17.000000> now;
		turn lfoot to x-axis <43.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-3.000000> now;
		turn lthigh to x-axis <-32.000000> now;
		turn rthigh to x-axis <13.000000> now;
		turn rleg to x-axis <23.000000> now;
		turn rfoot to x-axis <-33.000000> now;
		turn lfoot to x-axis <7.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <0.000000> now;
		turn lthigh to x-axis <-36.000000> now;
		turn rleg to x-axis <44.000000> now;
		turn rfoot to x-axis <-43.000000> now;
		turn lleg to x-axis <-10.000000> now;
		turn lfoot to x-axis <28.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <0.000000> now;
		turn lthigh to x-axis <-42.000000> now;
		turn rthigh to x-axis <13.000000> now;
		turn rleg to x-axis <61.000000> now;
		turn rfoot to x-axis <-45.000000> now;
		turn lleg to x-axis <-5.000000> now;
		turn lfoot to x-axis <47.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-3.000000> now;
		turn lthigh to x-axis <-33.000000> now;
		turn rthigh to x-axis <34.000000> now;
		turn rleg to x-axis <24.000000> now;
		turn rfoot to x-axis <-11.000000> now;
		turn lleg to x-axis <-6.000000> now;
		turn lfoot to x-axis <43.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-5.000000> now;
		turn lthigh to x-axis <-25.000000> now;
		turn rthigh to x-axis <29.000000> now;
		turn rleg to x-axis <11.000000> now;
		turn rfoot to x-axis <-21.000000> now;
		turn lleg to x-axis <-4.000000> now;
		turn lfoot to x-axis <34.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-6.000000> now;
		turn lthigh to x-axis <-13.000000> now;
		turn rthigh to x-axis <0.000000> now;
		turn rleg to x-axis <-12.000000> now;
		turn rfoot to x-axis <23.000000> now;
		turn lleg to x-axis <4.000000> now;
		turn lfoot to x-axis <14.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-5.000000> now;
		turn lthigh to x-axis <0.000000> now;
		turn rthigh to x-axis <-20.000000> now;
		turn rleg to x-axis <-20.000000> now;
		turn rfoot to x-axis <23.000000> now;
		turn lleg to x-axis <24.000000> now;
		turn lfoot to x-axis <-21.000000> now;
		sleep 60;
	}
	if( bMoving )
	{
		move pelvis to y-axis [0.000000] now;
		turn pelvis to x-axis <-3.000000> now;
		turn lthigh to x-axis <9.000000> now;
		turn rthigh to x-axis <-29.000000> now;
		turn rleg to x-axis <-25.000000> now;
		turn rfoot to x-axis <26.000000> now;
		turn lleg to x-axis <32.000000> now;
		turn lfoot to x-axis <-38.000000> now;
		sleep 60;
	}
	move pelvis to y-axis [0.000000] now;
	turn pelvis to x-axis <0.000000> now;
	turn lthigh to x-axis <11.000000> now;
	turn rthigh to x-axis <-37.000000> now;
	turn rleg to x-axis <-9.000000> now;
	turn rfoot to x-axis <6.000000> now;
	turn lleg to x-axis <48.000000> now;
	turn lfoot to x-axis <-47.000000> now;
	sleep 60;
}
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 [0.001111];
				turn rthigh to x-axis <0.000000> speed <200.000000>;
				turn rleg to x-axis <0.000000> speed <200.000000>;
				turn rfoot to x-axis <0.000000> speed <200.000000>;
				turn lthigh to x-axis <0.000000> speed <200.000000>;
				turn lleg to x-axis <0.000000> speed <200.000000>;
				turn lfoot to x-axis <0.000000> speed <200.000000>;
				if( !aiming )
				{
					turn torso to y-axis <0.000000> speed <90.000000>;
				}
				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.000000>;
	turn launchers to x-axis <0.000000> speed <45.000000>;
	wait-for-turn torso around y-axis;
	wait-for-turn launchers 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.000000>;
	turn launchers to x-axis <0.000000> - pitch speed <45.000000>;
	wait-for-turn torso around y-axis;
	wait-for-turn launchers around x-axis;
	start-script RestoreAfterDelay();
	return (1);
}
FirePrimary()
{
	if( gun_1 == 0 )
	{
		show rfire;
		sleep 100;
		hide rfire;
		gun_1 = pelvis;
		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 lthigh type BITMAPONLY | BITMAP2;
		explode rfire type BITMAPONLY | BITMAP5;
		explode rfoot type BITMAPONLY | BITMAP1;
		explode rleg type BITMAPONLY | BITMAP2;
		explode rthigh type BITMAPONLY | BITMAP4;
		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 lthigh type FALL | BITMAP2;
		explode pelvis type FALL | BITMAP4;
		explode rfire type FALL | BITMAP5;
		explode rfoot type FALL | BITMAP1;
		explode rleg type FALL | BITMAP2;
		explode rthigh type FALL | BITMAP4;
		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 lthigh type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
		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 rthigh type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
		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 lthigh type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP2;
	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 rthigh type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP4;
	explode torso type SHATTER | EXPLODE_ON_HIT | BITMAP1;
}

- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29


 
 






