I tried making a script myself, well adjusting the one already existing, but it just isn't working and, from what i've been seing, i'm willing to bet i won't be able to produce anything of even average quality.
So, is there someone who could adjust me a script?
It is for the Tll Comander, changing the nano piece as well as making it have it's intended 5 weapons in several specific places in the model. And some other simple considerations which i will explain to whoever, hopefully, helps me with that.
Anyone can adjust me a script?
Moderator: Moderators
Not so dificult IF you dont mess the walking part.
Firstly you must to put in the model the firepoints following the piece hierarchy.If you would create new pieces...like rocket launcher etc..put this(these) pieces before the emmiters, and preferably in the main body.
After you must to put in script the weapons in Spring fashion...
Vongratz
Look at this example of four weapons battleship.
Firstly you must to put in the model the firepoints following the piece hierarchy.If you would create new pieces...like rocket launcher etc..put this(these) pieces before the emmiters, and preferably in the main body.
After you must to put in script the weapons in Spring fashion...
Vongratz
Look at this example of four weapons battleship.
piece base, hull, scuttles, bridge, turret1, craddle1, barrelb1, flareb1, barrelb2, flareb2, barrelb3, flareb3, turret2, baseg, radbase, craddle2, barrelb12, flareb12, barrelb22, flareb22, barrelb32, flareb32, mt1, barrel1, flare1, mt2, barrel12, flare12, pltgun, dish, wake1, wake2, hull2, wake3, wake4, wake5, wake6;
static-var gun_0 ,gun_1 , restore_delay ;
#DEFINE SMOKEPIECE1 base
#DEFINE SIG_NUM1 2
#DEFINE SIG_NUM2 4
#DEFINE SIG_NUM3 8
#DEFINE SIG_NUM4 16
#DEFINE SIG_NUM5 32
#INCLUDE "smokeunit.h"
#INCLUDE "exptype.h"
Create()
{
HIDE flareb1;
HIDE flareb2;
HIDE flareb3;
HIDE flareb12;
HIDE flareb22;
HIDE flareb32;
HIDE flare1;
HIDE flare12;
gun_0 = 1;
gun_1 = 1;
restore_delay = 3000;
START-SCRIPT SmokeUnit();
WHILE (GET BUILD_PERCENT_LEFT)
{
SLEEP <1000>;
}
}
Activate()
{
SPIN dish around y-axis SPEED <60>;
}
Deactivate()
{
STOP-SPIN dish around y-axis ;
}
SetMaxReloadTime(time)
{
restore_delay = time * 2 ;
}
RestoreAfterDelay()
{
SLEEP restore_delay;
TURN turret1 to y-axis <0> SPEED <25>;
TURN craddle1 to x-axis <0> SPEED <25>;
TURN turret2 to y-axis <0> SPEED <25>;
TURN craddle2 to x-axis <0> SPEED <25>;
TURN barrel1 to y-axis <0> SPEED <125>;
TURN barrel1 to x-axis <0> SPEED <125>;
TURN barrel12 to y-axis <0> SPEED <125>;
TURN barrel12 to x-axis <0> SPEED <125>;
}
StartMoving()
{
SIGNAL SIG_NUM1;
SET-SIGNAL-MASK SIG_NUM1;
WHILE ( TRUE )
{
EMIT-SFX SFXTYPE_WAKE1 FROM wake1;
EMIT-SFX SFXTYPE_WAKE1 FROM wake2;
EMIT-SFX SFXTYPE_WAKE1 FROM wake3;
EMIT-SFX SFXTYPE_WAKE1 FROM wake4;
EMIT-SFX SFXTYPE_WAKE1 FROM wake5;
EMIT-SFX SFXTYPE_WAKE1 FROM wake6;
SLEEP <300>;
}
}
StopMoving()
{
SIGNAL SIG_NUM1;
}
AimWeapon1(heading,pitch)
{
SIGNAL SIG_NUM2;
SET-SIGNAL-MASK SIG_NUM2;
TURN turret1 to y-axis heading SPEED <55>;
TURN craddle1 to x-axis (0 - pitch) SPEED <30>;
WAIT-FOR-TURN turret1 around y-axis;
WAIT-FOR-TURN craddle1 around x-axis;
START-SCRIPT RestoreAfterDelay();
RETURN ( TRUE );
}
AimWeapon2(heading,pitch)
{
SIGNAL SIG_NUM3;
SET-SIGNAL-MASK SIG_NUM3;
TURN turret2 to y-axis heading SPEED <55>;
TURN craddle2 to x-axis (0 - pitch) SPEED <30>;
WAIT-FOR-TURN turret2 around y-axis;
WAIT-FOR-TURN craddle2 around x-axis;
START-SCRIPT RestoreAfterDelay();
RETURN ( TRUE );
}
AimWeapon3(heading,pitch)
{
SIGNAL SIG_NUM4;
SET-SIGNAL-MASK SIG_NUM4;
TURN barrel1 to y-axis heading SPEED <150>;
TURN barrel1 to x-axis (0 - pitch) SPEED <100>;
WAIT-FOR-TURN barrel1 around y-axis;
WAIT-FOR-TURN barrel1 around x-axis;
START-SCRIPT RestoreAfterDelay();
RETURN ( TRUE );
}
AimWeapon4(heading,pitch)
SIGNAL SIG_NUM5;
SET-SIGNAL-MASK SIG_NUM5;
TURN barrel12 to y-axis heading SPEED <150>;
TURN barrel12 to x-axis (0 - pitch) SPEED <100>;
WAIT-FOR-TURN barrel12 around y-axis;
WAIT-FOR-TURN barrel12 around x-axis;
START-SCRIPT RestoreAfterDelay();
RETURN ( TRUE );
}
FireWeapon1()
{
IF (gun_0 == 1 )
{
MOVE barrelb1 to z-axis <-2> SPEED <500>;
WAIT-FOR-MOVE barrelb1 along z-axis;
SHOW flareb1;
SLEEP <150>;
HIDE flareb1;
MOVE barrelb1 to z-axis <0> SPEED <3>;
}
IF (gun_0 == 2 )
{
MOVE barrelb2 to z-axis <-2> SPEED <500>;
WAIT-FOR-MOVE barrelb2 along z-axis;
SHOW flareb2;
SLEEP <150>;
HIDE flareb2;
MOVE barrelb2 to z-axis <0> SPEED <3>;
}
IF (gun_0 == 3 )
{
MOVE barrelb3 to z-axis <-2> SPEED <500>;
WAIT-FOR-MOVE barrelb3 along z-axis;
SHOW flareb3;
SLEEP <150>;
HIDE flareb3;
MOVE barrelb3 to z-axis <0> SPEED <3>;
}
gun_0 = gun_0 + 1 ;
IF (gun_0 == 4 )
{
gun_0 = 1;
}
}
FireWeapon2()
{
IF (gun_1 == 1 )
{
MOVE barrelb12 to z-axis <-2> SPEED <500>;
WAIT-FOR-MOVE barrelb12 along z-axis;
SHOW flareb12;
SLEEP <150>;
HIDE flareb12;
MOVE barrelb12 to z-axis <0> SPEED <3>;
}
IF (gun_1 == 2 )
{
MOVE barrelb22 to z-axis <-2> SPEED <500>;
WAIT-FOR-MOVE barrelb22 along z-axis;
SHOW flareb22;
SLEEP <150>;
HIDE flareb22;
MOVE barrelb22 to z-axis <0> SPEED <3>;
}
IF (gun_1 == 3 )
{
MOVE barrelb32 to z-axis <-2> SPEED <500>;
WAIT-FOR-MOVE barrelb32 along z-axis;
SHOW flareb32;
SLEEP <150>;
HIDE flareb32;
MOVE barrelb32 to z-axis <0> SPEED <3>;
}
gun_1 = gun_1 + 1 ;
IF (gun_1 == 4 )
{
gun_1 = 1;
}
}
FireWeapon3()
{
SHOW flare1;
SLEEP <150>;
HIDE flare1;
}
FireWeapon4()
{
SHOW flare12;
SLEEP <150>;
HIDE flare1;
}
AimFromWeapon1(piecenum)
{
piecenum = turret1;
}
QueryWeapon1(piecenum)
{
IF (gun_0 == 1 )
{
piecenum = flareb1;
}
IF (gun_0 == 2 )
{
piecenum = flareb2;
}
IF (gun_0 == 3 )
{
piecenum = flareb3;
}
}
AimFromWeapon2(piecenum)
{
piecenum = turret2;
}
AimFromWeapon3(piecenum)
{
piecenum = barrel1;
}
AimFromWeapon4(piecenum)
{
piecenum = barrel12;
}
}
QueryWeapon2(piecenum)
{
IF (gun_1 == 1 )
{
piecenum = flareb12;
}
IF (gun_1 == 2 )
{
piecenum = flareb22;
}
IF (gun_1 == 3 )
{
piecenum = flareb32;
}
}
QueryWeapon3(piecenum)
{
piecenum = flare1;
}
QueryWeapon4(piecenum)
{
piecenum = flare12;
}
}
killed blah blah blah etc ....