View unanswered posts | View active topics It is currently Wed Jan 08, 2025 10:18 pm



Reply to topic  [ 6 posts ] 
 two questions for modding 
Author Message

Joined: Sun Sep 20, 2009 2:41 am
Posts: 30
Reply with quote
Post two questions for modding
1. how do I make a gun break after firing n amount of bullets?

2. how can I make a rocket dock heal the rocket?

thanks.


Tue Mar 23, 2010 11:54 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: two questions for modding
1. The "GibWoundLimit" variable in the object's code state's how many wounds 'till gibbing.

2. This will require Lua scripting. Tutorial here. You'll have to get a pointer to the rocket that is docked, check if its health is below 100, and then add health to it.


Tue Mar 23, 2010 11:59 pm
Profile

Joined: Sun Sep 20, 2009 2:41 am
Posts: 30
Reply with quote
Post Re: two questions for modding
about 1, i was thinking of doing a cheap gun that would break after you fired all its bullets.


Wed Mar 24, 2010 12:02 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: two questions for modding
Oh woops, misread, sorry.

That would require more Lua. What you would want to do is attach a script to the projectile that the gun fires that gets a pointer to the gun, check if it's empty, and gib it if so. I can make a script for 1 and 2 between now and the next two days, but reading the tutorial will help you in the long run when modding.


Wed Mar 24, 2010 12:06 am
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: two questions for modding
or you can make the gun fire an emitter that fires a bullet back at the gun giving it a wound....


Wed Mar 24, 2010 1:17 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: two questions for modding
Coops9753 wrote:
or you can make the gun fire an emitter that fires a bullet back at the gun giving it a wound....

Which may end up damaging the user instead of destroying the gun.

Here are the scripts, sorry they took so long. Be sure to open them up and change the "settings."


Attachments:
Scripts.zip [1.11 KiB]
Downloaded 148 times
Fri Mar 26, 2010 7:49 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.033s | 16 Queries | GZIP : Off ]