Data Realms Fan Forums
http://45.55.195.193/

two questions for modding
http://45.55.195.193/viewtopic.php?f=1&t=18226
Page 1 of 1

Author:  RRR1 [ Tue Mar 23, 2010 11:54 pm ]
Post subject:  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.

Author:  CaveCricket48 [ Tue Mar 23, 2010 11:59 pm ]
Post subject:  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.

Author:  RRR1 [ Wed Mar 24, 2010 12:02 am ]
Post subject:  Re: two questions for modding

about 1, i was thinking of doing a cheap gun that would break after you fired all its bullets.

Author:  CaveCricket48 [ Wed Mar 24, 2010 12:06 am ]
Post subject:  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.

Author:  Coops [ Wed Mar 24, 2010 1:17 am ]
Post subject:  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....

Author:  CaveCricket48 [ Fri Mar 26, 2010 7:49 pm ]
Post subject:  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 149 times

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/