Hovercraft Commander Not Shooting(?)

Hovercraft Commander Not Shooting(?)

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

Post Reply
Kafetist
Posts: 20
Joined: 05 Feb 2006, 16:24

Hovercraft Commander Not Shooting(?)

Post by Kafetist »

My Dear Commander isn't shooting at all :( It's just standing there plain dumb. The Script file was copied from SWTA imperial commander and I've changed all the essential info there, but something is missing, misspelled or done wrong.. .bos and .fbi are to be found here: http://www.fileuniverse.com/?p=showitem&ID=2839

Any help would be largely appreciated =)
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

(twiddles with bos) Try this:

Code: Select all

#define TA// This is a TA script

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

piece  base, turret, missilo, missilo2, flare, flare2, nanoturret, nano;

static-var gun_1;
#define SIG_AIM1	2

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 base;
		}
		sleeptime = healthpercent * 50;
		if( sleeptime < 200 )
		{
			sleeptime = 200;
		}
		sleep sleeptime;
	}
}

Create()
{
	hide flare;
	hide flare2;
	hide nano;
	start-script SmokeUnit();
	gun_1 = 0;
}

SweetSpot(piecenum)
{
	piecenum = base;
}

QueryNanoPiece(piecenum)
{
	piecenum = nano;
}

RestorePosition()
{
	turn turret to y-axis <0.000000> speed <80.000000>;
	turn missilo to x-axis <0.000000> speed <80.000000>;
	turn missilo2 to x-axis <0.000000> speed <80.000000>;
	turn nanoturret to y-axis <0> now;
	wait-for-turn turret around y-axis;
	wait-for-turn missilo around x-axis;
	wait-for-turn missilo2 around x-axis;
	wait-for-turn nanoturret around x-axis;
}

StartBuilding(heading, pitch)
{
	turn nanoturret to y-axis heading now;
	set INBUILDSTANCE to 1;
}

AimFromWeapon1(piecenum)
{
	piecenum = turret;
}

QueryWeapon1(piecenum)
{
	if (gun_1 == 0)
	{
		piecenum = flare;
	}
	if (gun_1 == 1)
	{
		piecenum = flare2;
	}
}

AimWeapon1(heading, pitch)
{
	signal SIG_AIM1;
	set-signal-mask SIG_AIM1;
	turn turret to y-axis heading speed <175.000000>;
	turn missilo to x-axis <0.000000> - pitch speed <180.000000>;
	turn missilo2 to x-axis <0.000000> - pitch speed <180.000000>;
	wait-for-turn turret around y-axis;
	wait-for-turn missilo around x-axis;
	wait-for-turn missilo2 around x-axis;
	return 1;
}

FireWeapon1()
{
	if (!gun_1)
	{
		show flare;
		sleep 150;
		hide flare;
		gun_1 = 1;
		return 0;
	}
	if (gun_1)
	{
		show flare2;
		sleep 150;
		hide flare2;
		gun_1 = 0;
		return 0;
	}
}

TargetCleared(Func_Var_1)
{
	signal 2;
	set-signal-mask 2;
	call-script RestorePosition();
}

StopBuilding()
{
	set INBUILDSTANCE to 0;
}
	
Killed(severity, corpsetype)
{
	corpsetype = 1;
	explode missilo type BITMAPONLY | BITMAP1;
	explode missilo2 type BITMAPONLY | BITMAP1;
	explode turret type BITMAPONLY | BITMAP1;
	explode nanoturret type BITMAPONLY | BITMAP1;
}
Kafetist
Posts: 20
Joined: 05 Feb 2006, 16:24

Post by Kafetist »

Mmmh, didn't help any :/ Commander still refuses to shoot.

Edit: I'll add SIG_AIM1 to TargetCleared() too and try then again.
Kafetist
Posts: 20
Joined: 05 Feb 2006, 16:24

Post by Kafetist »

Nope, still nothing.
Post Reply

Return to “Game Development”