Cob/Bos expirence, getting deepeer and feeling myself worse

Cob/Bos expirence, getting deepeer and feeling myself worse

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
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

Just a simple questions which i can't break.

1. How can i rotate turret=1; weapon to specific angle and lock it, and then call to fire it from other thread?
OR
2. How can i rotate emit-sfx 204x from [anypiece]; to emit shot to specific angle.

Haaaalp!!!!!! *strikes wall with head*
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoth »

smoke_th wrote:2. How can i rotate emit-sfx 204x from [anypiece]; to emit shot to specific angle.
...
turn your fire point. see gundam.
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

Filename, or better quick description?
I already tried to rotate
1. entire base
2. piece which from emits

Trouble is if i will specify
QueryWeaponX(piecenum)

it will fire itself, not caused from another weapon like i done
weapon1=dummy weapon with targeting like bomb
weapon2=real weapon burst laser.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoth »

smoke_th wrote: it will fire itself, not caused from another weapon like i done
english is hard to follow here.
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

smoth wrote:
smoke_th wrote: it will fire itself, not caused from another weapon like i done
english is hard to follow here.
I mean - i using dummy weapon with very specific targeting (air bomb)
and when it starts fire i calling second weapon to fire from 3 different points. if i set turret=1 it fires just at center of spot
and if i set turret=0 it fires following unit heading.

I need to rotate this thing and fire it at ~50 degrees down 5 shots which will look like bombing by blaster fire.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoth »

// zaku2 Rocket launcher
piece head, base, cod,
left, l_arm, l_forearm, l_gun, l_hand, l_barrel1, l_barrel2, l_barrel3,
right, r_arm, r_forearm, r_gun, r_hand, r_barrel1, r_barrel2, r_barrel3,
flare1, flare2, flare3, flare4, flare5, flare6,
right_l, shin_r, foot_r, dustr,
left_l, shin_l, foot_l, dustl;

// State variables
static-var ISMOVING, ISAIMING, ISBARRAGE, speedMult, shooting_numa, shooting_numb, terraintype, dgun_lock;

// Signal definitions
#define SIG_AIM 2
#define SIG_AIM_2 4
#define SIG_AIM_3 8
#define SIG_MOVE 16

#define rocketlaunch 1024+0

#define SMOKEPIECE1 base

#include "\headers\smoke.h"
#include "\headers\walk.h"



StartMoving()
{ ISMOVING = TRUE; }

StopMoving()
{ ISMOVING = FALSE; }


setSFXoccupy(setSFXoccupy_argument)
{
terraintype = setSFXoccupy_argument;

if(terraintype == 2)
{
SET MAX_SPEED to [4];
speedMult = 4;
}
else
{
SET MAX_SPEED to [1.0];
speedMult = 2;
}
}

//------------------------------------------------------
//start ups :)
//------------------------------------------------------
Create()
{
// Initial State
dgun_lock = 0;
ISMOVING = FALSE;
ISAIMING = FALSE;
ISBARRAGE = FALSE;
shooting_numa = 1;
shooting_numb = 1;
speedMult = 2;

turn l_arm to x-axis <20> speed <205>;
turn l_arm to z-axis <-20> speed <205>;
turn l_forearm to x-axis <-40> speed <205>;
turn l_hand to x-axis <-25> speed <205>;

turn r_arm to x-axis <20> speed <205>;
turn r_arm to z-axis <20> speed <205>;
turn r_forearm to x-axis <-40> speed <205>;
turn r_hand to x-axis <-25> speed <205>;

start-script MotionControl();
start-script setSFXoccupy();
start-script SmokeUnit();
}

AimFromWeapon1(piecenum)
{ piecenum=head; }

AimFromWeapon2(piecenum)
{ piecenum=head; }

QueryWeapon1(piecenum)
{
if (shooting_numa==1)
{ piecenum=flare1; }

if (shooting_numa==2)
{ piecenum=flare2; }

if (shooting_numa==3)
{ piecenum=flare3; }
}

QueryWeapon2(piecenum)
{
if (shooting_numb==1)
{ piecenum=flare4; }

if (shooting_numb==2)
{ piecenum=flare5; }

if (shooting_numb==3)
{ piecenum=flare6; }
}

QueryWeapon3(piecenum)
{
piecenum=flare4;
}

//---------------------------------------------------------------------
//gun functions;
//---------------------------------------------------------------------

RestoreAfterDelaya()
{
sleep 500;
turn l_arm to x-axis <20> speed <205>;
turn l_arm to z-axis <-20> speed <205>;
turn l_forearm to x-axis <-40> speed <205>;
turn l_hand to x-axis <-25> speed <205>;
turn left to x-axis <0> speed <205>;
turn l_hand to y-axis <0> speed <205>;
turn base to x-axis <0> speed <205>;
ISAIMING = FALSE;
}

RestoreAfterDelayb()
{
sleep 500;
turn r_arm to x-axis <20> speed <205>;
turn r_arm to z-axis <20> speed <205>;
turn r_forearm to x-axis <-40> speed <205>;
turn r_hand to x-axis <-25> speed <205>;
turn r_hand to y-axis <0> speed <205>;
turn right to x-axis <0> speed <205>;
ISAIMING = FALSE;

}

RestoreAfterDelayc()
{
sleep 500;

turn left to x-axis <0> speed <290>;
turn l_arm to x-axis <20> speed <205>;
turn l_arm to z-axis <-20> speed <205>;
turn l_forearm to x-axis <-40> speed <205>;
turn l_hand to x-axis <-25> speed <205>;
turn l_hand to y-axis <0> speed <305>;

turn right to x-axis <0> speed <290>;
turn r_arm to x-axis <20> speed <205>;
turn r_arm to z-axis <20> speed <205>;
turn r_forearm to x-axis <-40> speed <205>;
turn r_hand to x-axis <-25> speed <205>;
turn r_hand to y-axis <0> speed <305>;
ISBARRAGE = TRUE;
ISAIMING = FALSE;
dgun_lock = 0;
}



AimWeapon1(heading,pitch)
{
if ( dgun_lock == 1)
{ return (0); }

signal SIG_AIM;
set-signal-mask SIG_AIM;

// Announce that we would like to aim, and wait until we can
ISAIMING = TRUE;


turn r_arm to x-axis <0> speed <305>;
turn r_arm to z-axis <0> speed <305>;
turn r_forearm to x-axis <0> speed <305>;
turn r_hand to x-axis <0> speed <305>;

turn base to y-axis heading speed <205>;
turn right to x-axis (<-90>-pitch) speed <290>;
turn r_hand to y-axis <90> speed <305>;

wait-for-turn base around y-axis;
wait-for-turn right around x-axis;
start-script RestoreAfterDelayb();

return(TRUE);
}

FireWeapon1()
{
if(shooting_numa==1)
{ emit-sfx rocketlaunch from flare1; }

if(shooting_numa==2)
{ emit-sfx rocketlaunch from flare2; }

if(shooting_numa==3)
{ emit-sfx rocketlaunch from flare3; }

shooting_numa=shooting_numa+1;

if( shooting_numa == 4)
{ shooting_numa=1; }
}


AimWeapon2(heading,pitch)
{
if ( dgun_lock == 1)
{ return (0); }


signal SIG_AIM_2;
set-signal-mask SIG_AIM_2;

// Announce that we would like to aim, and wait until we can
ISAIMING = TRUE;

turn l_arm to x-axis <0> speed <305>;
turn l_arm to z-axis <0> speed <305>;
turn l_forearm to x-axis <0> speed <305>;
turn l_hand to x-axis <0> speed <305>;

turn left to x-axis (<-90>-pitch) speed <290>;
turn l_hand to y-axis <-90> speed <305>;

wait-for-turn left around x-axis;

start-script RestoreAfterDelaya();

return(TRUE);
}

FireWeapon2()
{
if(shooting_numb==1)
{ emit-sfx rocketlaunch from flare4; }

if(shooting_numb==2)
{ emit-sfx rocketlaunch from flare5; }

if(shooting_numb==3)
{ emit-sfx rocketlaunch from flare6; }

shooting_numb=shooting_numb+1;

if( shooting_numb == 4)
{ shooting_numb=1; }
}

AimWeapon3(heading,pitch)
{
dgun_lock = 1;

signal SIG_AIM_3;
set-signal-mask SIG_AIM_3;

ISAIMING = TRUE;
ISBARRAGE = TRUE;

turn l_arm to x-axis <0> speed <305>;
turn l_arm to z-axis <-20> speed <305>;
turn l_forearm to x-axis <0> speed <305>;
turn l_hand to x-axis <0> speed <305>;

turn left to x-axis (<-90>-pitch) speed <310>;
turn l_hand to y-axis <-90> speed <305>;

turn r_arm to x-axis <0> speed <305>;
turn r_arm to z-axis <20> speed <305>;
turn r_forearm to x-axis <0> speed <305>;
turn r_hand to x-axis <0> speed <305>;

turn right to x-axis (<-90>-pitch) speed <310>;
turn r_hand to y-axis <90> speed <305>;

wait-for-turn left around x-axis;
wait-for-turn right around x-axis;

start-script RestoreAfterDelayc();

return(TRUE);
}



FireWeapon3()
{

turn flare1 to x-axis <20> now;
turn flare3 to x-axis <-20> now;
turn flare4 to x-axis <20> now;
turn flare6 to x-axis <-20> now;

emit-sfx 2048 from flare1;
emit-sfx rocketlaunch from flare1;
sleep 75;

emit-sfx 2048 from flare2;
emit-sfx rocketlaunch from flare2;
emit-sfx 2048 from flare5;
emit-sfx rocketlaunch from flare5;
sleep 75;

emit-sfx 2048 from flare3;
emit-sfx rocketlaunch from flare3;
emit-sfx 2048 from flare6;
emit-sfx rocketlaunch from flare6;
sleep 75;

turn flare1 to x-axis <0> now;
turn flare3 to x-axis <0> now;
turn flare4 to x-axis <0> now;
turn flare6 to x-axis <0> now;

}



Killed( severity, corpsetype )
{
explode base type FALL | SMOKE | EXPLODE_ON_HIT;
explode head type FALL | SMOKE | EXPLODE_ON_HIT;
explode left type FALL | SMOKE | EXPLODE_ON_HIT;
explode right type FALL | SMOKE | EXPLODE_ON_HIT;
explode l_arm type FALL | SMOKE | EXPLODE_ON_HIT;
explode l_forearm type FALL | SMOKE | EXPLODE_ON_HIT;
explode r_arm type FALL | SMOKE | EXPLODE_ON_HIT;
explode r_forearm type FALL | SMOKE | EXPLODE_ON_HIT;
explode right_l type FALL | SMOKE | EXPLODE_ON_HIT;
explode left_l type FALL | SMOKE | EXPLODE_ON_HIT;
explode shin_l type FALL | SMOKE | EXPLODE_ON_HIT;
explode shin_r type FALL | SMOKE | EXPLODE_ON_HIT;
explode foot_r type FALL | SMOKE | EXPLODE_ON_HIT;
explode foot_l type FALL | SMOKE | EXPLODE_ON_HIT;
return( 0 );
}
see red part of code.
it is what I use to do barrage attack on juagg.
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

and last question. Does your weapon 1 is turret=1; ?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by KDR_11k »

Of course it is.

What should be noted is that emit-sfx only obeys rotations applied in the unit script, not rotations applied in Upspring.
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

Still no effect. I tried everything. Here - parts of the code.

BOS/COB
http://pastebin.com/tVw7E2QW

Weapons.tdf part
http://pastebin.com/j8ZaHSrG

Unit itself
http://pastebin.com/aPPmXT5u

I guess problem in using laser-cannon. If i doing like smoth done it still shoots at center of target and only if i press stop it creates normal bombing of ground.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoth »

I fire shots out with laser canon all the time... zaku2 look at it's script.
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

Laser shots still affected with target point i placed and flying directly to it (until i not press stop, so unit looses target and remaining shots flying down just from rotated flares) ...ok i will shot the video.
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

http://www.youtube.com/watch?v=gBNaDlwSgGs

here. On First time shooting i don't interrupting it so all 5x3 shots flying directly to target. BUT on second time when i interrupting process least 2 shots flying from pre-rotated flare1 2 and 3
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

And my point is NOT to point them to target but to be triggered by launching of invisible bombsack, and striking earth in accurate line like

....o....o...o....o....o...
....o....o...o....o....o...
....o....o...o....o....o...
....o....o...o....o....o...

Not like


................................
..............o................
.............ooo..............
...............o...............
................................
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoth »

USE
EXTRA
POINT
NOT
TIED
TO
FIRING
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

I WILL TRY IT!!!!
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

and still it aims from it to point i targeted and fires. sweet isn't it?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoth »

doesn't for me.
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

I will even make from this one unit mod (based on ba) and lay it here so ppl will able to try this fucker and look how its works.
User avatar
smoke_th
Posts: 140
Joined: 25 May 2010, 13:15

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by smoke_th »

http://dl.dropbox.com/u/9288177/TESTING.SDD.rar
here smoth. unpack testing.sdd to mods dir (cap 'o' to rescue) and try it.
The weapons which i using in the end of weapons.tdf file
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Cob/Bos expirence, getting deepeer and feeling myself worse

Post by knorke »

why do you rotate the "flare" firing points if you want "NOT to point them to target"?
Post Reply

Return to “Game Development”