Project X Forums http://px.worms2d.info/forum/ |
|
laser gun http://px.worms2d.info/forum/viewtopic.php?f=13&t=2107 |
Page 1 of 1 |
Author: | worminater [ Thu Jul 13, 2017 5:59 pm ] |
Post subject: | laser gun |
Hi all, I'm trying to modify the laser gun to have increased damage and a larger beam. I've managed to make the beam bigger (although it rapidly shrinks again) but I'm not sure what values I should be changing for damage. I want to triple it so the damage to terrain is much larger. Can anyone advise? lib is wp_lasergun |
Author: | rafa``2 [ Sat Jul 15, 2017 3:07 am ] |
Post subject: | Re: laser gun |
[]quote="worminater"]Hi all, I'm trying to modify the laser gun to have increased damage and a larger beam. I've managed to make the beam bigger (although it rapidly shrinks again) but I'm not sure what values I should be changing for damage. I want to triple it so the damage to terrain is much larger. Can anyone advise? lib is wp_lasergun[/quote[] Edit those variables line 54: LifeTime = 250; // laser duration 5 seconds line 310: msg.params[0] = 1; // fire damage to a single worm line 316: if(w->LaserDamageTaken >= 45) //max damage to a single worm line 379: GG->land->MakeHole(4, terrainHitX, terrainHitY); //radius terrain damage |
Author: | worminater [ Sat Jul 15, 2017 3:52 pm ] |
Post subject: | Re: laser gun |
Thanks Rafa, that did the trick. I also edited Line 372: GG->land->MakeHole(4, xt, yt); This coincides with line 379 you advised. Editing 379 alone would only produce the land damage for the aim readjustment, but would not continue that damage for the remaining beam, whereas line 372 would allow it to continue the terrain damage throughout. Never occured to me it would be these values. I kept scouring the text for a damage value but couldn't see one, only the fire damage one. My next question would be how to clone this so there are 2 versions, one that is the default and another that uses these new values for triple damage. I managed to clone the arrow turret with the help of Zed so there is now one that shoots rockets, but the script for this weapon doesn't looks so straightforward. |
Author: | rafa``2 [ Fri Jul 28, 2017 3:38 pm ] |
Post subject: | Re: laser gun |
[]quote="worminater"] My next question would be how to clone this so there are 2 versions, one that is the default and another that uses these new values for triple damage. I managed to clone the arrow turret with the help of Zed so there is now one that shoots rockets, but the script for this weapon doesn't looks so straightforward.[/quote[] Check r2_sentrylaser lib, in this wep I had to duplicate the laser gun behavior, You need to rename all global variables declared by wp_lasergun |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |