Project X Forums



It is currently Wed Jul 18, 2018 7:53 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: laser gun
PostPosted: Thu Jul 13, 2017 5:59 pm 
Offline

Joined: Wed Sep 09, 2015 2:15 pm
Posts: 42
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


Top
 Profile  
Reply with quote  
 Post subject: Re: laser gun
PostPosted: Sat Jul 15, 2017 3:07 am 
Offline

Joined: Sat Aug 09, 2014 1:30 am
Posts: 40
[]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


Top
 Profile  
Reply with quote  
 Post subject: Re: laser gun
PostPosted: Sat Jul 15, 2017 3:52 pm 
Offline

Joined: Wed Sep 09, 2015 2:15 pm
Posts: 42
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: laser gun
PostPosted: Fri Jul 28, 2017 3:38 pm 
Offline

Joined: Sat Aug 09, 2014 1:30 am
Posts: 40
[]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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane