Author Topic: fighter beams  (Read 45354 times)

0 Members and 1 Guest are viewing this topic.

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
all beams do damage continuously
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 
Quote
Originally posted by Bobboau
all beams do damage continuously


If you're certain of this, then type 3 beams must stay on for only one 'count', because I know I don't take continuous damage from them in missions.

Are you sure about this? Can you verify it?

 

Offline Pera

  • Tapper
  • 28
Quote
Originally posted by _argv[-1]


If you're certain of this, then type 3 beams must stay on for only one 'count', because I know I don't take continuous damage from them in missions.

Are you sure about this? Can you verify it?


I can, and easily. Just look from the tables how little damage an AAA beam does, it's way less than an average primary weapon shot.

So it has to do continuous damage, it just blinks so quickly that it does the same damage almost always, especially because it throws your fighter around a bit after the hit.
One is never alone with a rubberduck - Hitchhikers guide to the Galaxy

The Apocalypse Project

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
her, have you really tried type0 beams? don' think it works, actually
SCREW CANON!

 

Offline Darkage

  • CRAZY RENDER RABBIT
  • 211
Quote
Originally posted by venom2506


that's very good I suppose, I'd just prefer to keep the trigger pulled than having to push it twice... it's just not natural in terms of handling. say, you have a beam with 1 sec warm up and 1 ec warm down, and it lasts till you have no energy left. if you keep the trigger pulled for 3 seconds, the first sec, it will charge up, then for two seconds the beam will fire, then auto warmdown. warm down triggered too if you run out of power.


If you have a fully filled up weapon energy, the beam powers up it drains the energy to the glow then forms a beam from that power colected by the powerup:) when fired it dumps the remaining engery back into the weapon energy bank sounds good?:)
[email protected]
Returned from the dead.

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
I challenge you to shoot any fighter down with such a weapon :p
SCREW CANON!

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
OK, I have gotten it to fire from all slots in all banks if they are linked,
this is the targeting beam procesing function, replace the exsisting one with this

Code: [Select]


void ship_process_targeting_lasers()
{
beam_fire_info fire_info;
ship_obj *so;
ship *shipp;
polymodel *m;

// interate over all ships
for ( so = GET_FIRST(&Ship_obj_list); so != END_OF_LIST(&Ship_obj_list); so = GET_NEXT(so) ) {

shipp = &Ships[Objects[so->objnum].instance];
polymodel *po = model_get( Ship_info[shipp->ship_info_index].modelnum );
//if (shipp->targeting_laser_bank != 2)
int num_slots = po->gun_banks[shipp->targeting_laser_bank].num_slots;

// sanity checks
if(so->objnum < 0){
continue;
}
if(Objects[so->objnum].type != OBJ_SHIP){
continue;
}
if(Objects[so->objnum].instance < 0){
continue;
}

// if our trigger is no longer down, switch it off
if(!(shipp->flags & SF_TRIGGER_DOWN)){
ship_stop_targeting_laser(shipp);
continue;
}

// if we have a bank to fire - fire it
//for nonlinked
if((shipp->targeting_laser_bank >= 0) && (shipp->targeting_laser_bank < 2)){
// try and get the model
m = model_get(shipp->modelnum);
if(m == NULL){
continue;
}

// fire a targeting laser
for ( int j = 0; j < num_slots; j++ ){
fire_info.accuracy = 0.0f;
fire_info.beam_info_index = shipp->weapons.primary_bank_weapons[shipp->targeting_laser_bank];
fire_info.beam_info_override = NULL;
fire_info.shooter = &Objects[shipp->objnum];
fire_info.target = NULL;
fire_info.target_subsys = NULL;
fire_info.turret = NULL;
fire_info.targeting_laser_offset = m->gun_banks[shipp->targeting_laser_bank].pnt[j];


shipp->targeting_laser_objnum = beam_fire_targeting(&fire_info);

// hmm, why didn't it fire?
if(shipp->targeting_laser_objnum < 0){
Int3();
ship_stop_targeting_laser(shipp);
}
}
//for linked
//if primarys are linked and we have already fired the first bank
//and the second bank is also a fighter beam, fire fighter beams
//from all fireing points in the second bank
if((shipp->flags & SF_PRIMARY_LINKED) && (shipp->targeting_laser_bank == 0) && (shipp->weapons.primary_bank_weapons[1] >= 0) && (Weapon_info[shipp->weapons.primary_bank_weapons[1]].wi_flags & WIF_BEAM) && (Weapon_info[shipp->weapons.primary_bank_weapons[1]].b_info.beam_type == BEAM_TYPE_C)){

int num_slots = po->gun_banks[1].num_slots;

for ( int j = 0; j < (num_slots); j++ ){
fire_info.accuracy = 0.0f;
fire_info.beam_info_index = shipp->weapons.primary_bank_weapons[1];
fire_info.beam_info_override = NULL;
fire_info.shooter = &Objects[shipp->objnum];
fire_info.target = NULL;
fire_info.target_subsys = NULL;
fire_info.turret = NULL;
fire_info.targeting_laser_offset = m->gun_banks[1].pnt[j];


shipp->targeting_laser_objnum = beam_fire_targeting(&fire_info);

// hmm, why didn't it fire?
if(shipp->targeting_laser_objnum < 0){
Int3();
ship_stop_targeting_laser(shipp);
}
}
}

}

}
}



also, I have changed part of the fire primary functin wich is what calls the start_targetting_laser function, and in an (failed) effort to get AI ships to fire it I moved it to line 5121, or thereabouts, you can probly put this in were it is suposed to be, most stuff that may not make sence in this is all trying to get AI to fire,
Code: [Select]

// if this is a targeting laser, start it up
//fighterbeams
if((shipp->flags & SF_TRIGGER_DOWN)){
if((winfo_p->wi_flags & WIF_BEAM) && (winfo_p->b_info.beam_type == BEAM_TYPE_C) ){
shipp->weapons.flags |= SW_FLAG_BEAM_FREE;

if(shipp->weapon_energy > 0.0f)
swp->next_primary_fire_stamp[shipp->targeting_laser_bank] = timestamp(0);
if(shipp->weapon_energy < 0.0f)
swp->next_primary_fire_stamp[shipp->targeting_laser_bank] = timestamp(1000);

if( (shipp->weapon_energy > 0.0f) && (swp->next_primary_fire_stamp[shipp->targeting_laser_bank] == timestamp(0))){
ship_start_targeting_laser(shipp);

if ( sound_played != winfo_p->launch_snd ) {
sound_played = winfo_p->launch_snd;
if ( obj == Player_obj ) {
if ( winfo_p->launch_snd != -1 ) {
weapon_info *wip;
ship_weapon *swp;

// HACK
if(winfo_p->launch_snd == SND_AUTOCANNON_SHOT){
snd_play( &Snds[winfo_p->launch_snd], 0.0f, 1.0f, SND_PRIORITY_TRIPLE_INSTANCE );
} else {
snd_play( &Snds[winfo_p->launch_snd], 0.0f, 1.0f, SND_PRIORITY_MUST_PLAY );
}
// snd_play( &Snds[winfo_p->launch_snd] );

swp = &Player_ship->weapons;
if (swp->current_primary_bank >= 0) {
wip = &Weapon_info[swp->primary_bank_weapons[swp->current_primary_bank]];
joy_ff_play_primary_shoot((int) ((wip->armor_factor + wip->shield_factor * 0.2f) * (wip->damage * wip->damage - 7.5f) * 0.45f + 0.6f) * 10 + 2000);
}
}
}
else {
if ( winfo_p->launch_snd != -1 ) {
snd_play_3d( &Snds[winfo_p->launch_snd], &obj->pos, &View_position );
}
}
}
}

/*
if ( !timestamp_elapsed(swp->next_primary_fire_stamp[shipp->targeting_laser_bank]) ) {
if (timestamp_until(swp->next_primary_fire_stamp[shipp->targeting_laser_bank]) > 5000){
swp->next_primary_fire_stamp[shipp->targeting_laser_bank] = timestamp(1000);
}

}
*/

polymodel *po = model_get( Ship_info[shipp->ship_info_index].modelnum );
//if (shipp->targeting_laser_bank != 2)
int num_slots = po->gun_banks[shipp->targeting_laser_bank].num_slots;
//if (shipp->targeting_laser_bank == 2)
//int num_slots = po->gun_banks[0].num_slots +po->gun_banks[1].num_slots;
/* if ( ship_weapon_maybe_fail(shipp) && !force) {
if ( obj == Player_obj ) {
if ( ship_maybe_play_primary_fail_sound() ) {
}
}
continue;
}*/

 
shipp->weapon_energy -= num_slots*winfo_p->energy_consumed;
if(shipp->weapon_energy < 0.0f){
swp->next_primary_fire_stamp[shipp->targeting_laser_bank] = timestamp(1000);
if ( obj == Player_obj )
ship_maybe_play_primary_fail_sound();
shipp->weapon_energy = 0.0f;
ship_stop_targeting_laser(shipp);
}
continue;
}
}


I still want to get a bit of a delay after the primary weapons energy runns out, but I can't figure out how to use the timestamp stuff, havn't realy given it as much atention as the AI problem, wich is starting to piss me off, I hear the other ships weapon sounds, so I know it's getting at least as far as ship_start_targeting_laser(shipp); meaning the AI is trying to fire it but I can't figure out were exactly it screws up, it should work, it works for the player ship, might be fun to se if this works in multi-player, I think I need some more experienced programer to at least find were the AI ships are messing
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 
Quote
Originally posted by Pera


I can, and easily. Just look from the tables how little damage an AAA beam does, it's way less than an average primary weapon shot.

So it has to do continuous damage, it just blinks so quickly that it does the same damage almost always, especially because it throws your fighter around a bit after the hit.


Instead of talking about it, why don't you go play the damn game, get attacked by a AAA beam, and notice how your hull drops by 5% or so all at once? I'm tired of trying to convince people.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
isn't it funny how in my version of the game you get damaged less by the beams if you are hit and move out of there way than if you arnt able to, each shot lasts for a certan amount of time anything it hits during that time gets damage per second, most of the time you only get a few frames worth becase you're trying to doge them
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
When a ship fires an anti-fighter beam at another larger ship though, it does not fire it in three bursts; it all goes off in one long shot. Would that imply that the damage is done the same way as with the other beam types?

 
Quote
Originally posted by Bobboau
isn't it funny how in my version of the game you get damaged less by the beams if you are hit and move out of there way than if you arnt able to, each shot lasts for a certan amount of time anything it hits during that time gets damage per second, most of the time you only get a few frames worth becase you're trying to doge them


Well, since there are so many disagreements with me, I think I'll go play and see if I missed something earlier. I don't have time right now, though -- sorry.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
can we say somewhat on topic
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline an0n

  • Banned again
  • 211
  • Emo Hunter
    • http://nodewar.penguinbomb.com/forum
Screeeeeenies.
"I.....don't.....CARE!!!!!" ---- an0n
"an0n's right. He's crazy, an asshole, not to be trusted, rarely to be taken seriously, and never to be allowed near your mother. But, he's got a knack for being right. In the worst possible way he can find." ---- Yuppygoat
~-=~!@!~=-~ : Nodewar.com

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213








there how's that
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Alikchi

  • Neo-Terran
  • 210
  • Spooky ghost (RIP)
God damn! :jaw:


You named the enemy wing "bad". Excellent.
"Going too far and caring too much about a subject is the best way to make friends that I know."
- Sarah Vowell

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
that's my standard fighter/weapon combat stability test mission, a

and this is the executable, I was playing

YES, I've got my FTP back!!!
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 
Holy **** is more like it bro..............:jaw: :eek: :eek: :bump:

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
I assume that when you turn in flight, the beams continue to emanate in a straight line from your gunpoints along the normals, correct?
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
um,... they fire strait
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together