Data Realms Fan Forums http://45.55.195.193/ |
|
Gun Script Help ( No Experience) http://45.55.195.193/viewtopic.php?f=73&t=32011 |
Page 1 of 1 |
Author: | Slendamon [ Fri Oct 26, 2012 5:53 am ] | ||
Post subject: | Gun Script Help ( No Experience) | ||
Hey guys, So, I was interested in learning Lua, but have no background in scripting whatsoever. I was wondering if anyone could help me script a basic gun (sprite) that I have made. I was wondering if someone could teach me how to script it to shoot, how to locate the files, etc. Any help would be amazing, even the slightest bit. Remember, im not trying to actually make a mod, just learning how to script a gun so i can use it in the game!
|
Author: | Asklar [ Fri Oct 26, 2012 9:32 pm ] |
Post subject: | Re: Gun Script Help ( No Experience) |
From what I can read, it seems like you want to code a gun that doesn't require lua, just a weapon that you can create by yourself and use in-game. Well, a long time ago I created a file that explained each variable in a simple way. Attachment: Check it, it's a machine gun with all the variables explained and a link to Azukki's guide to offset determination. |
Author: | Slendamon [ Sat Oct 27, 2012 2:51 am ] |
Post subject: | Re: Gun Script Help ( No Experience) |
Thanks for the document. But what im looking for is just simply how to add a gun to the game for fun. I've sorta got all of the meanings of things, I just want to know how to piece it together |
Author: | Asklar [ Sat Oct 27, 2012 3:31 am ] |
Post subject: | Re: Gun Script Help ( No Experience) |
Well, to add a gun to the game, you must define it inside a module (a folder that ends with .rte). It can be either your own create module, or a vanilla one, though if you want to release it as a mod, it would be better to create your own. Anyway, so, to create it, grab any file that is read by the engine (like, for example, the Coalition's Index.ini) and type in your gun. Define the round, the mag, the HDFirearm, and you should be ready to go! Just remember to add Buyable = 1 and AddToGroup = Weapons and that jazz. If that doesn't answer your question, don't doubt on asking again. |
Author: | teh someone [ Sat Oct 27, 2012 1:02 pm ] |
Post subject: | Re: Gun Script Help ( No Experience) |
@Slendamon There isn't any magic button to make your sprite to a working gun, but with Asklar's awesome guide and modding templates and little effort you should have your gun working in no time. Once you got the template you should move your sprite into the Gun Template.rte and either rename your sprite the same as the one's in the template, or preferably change the paths in the Gun.ini to match your sprite (ie. Gun Template.rte/Images/Gun.bmp -> Gun Template.rte/Images/MyGunSpriteWhateverTheNameIs.bmp). Use Asklar's guide to start experimenting with different values and make the gun like you want it. This is propably the simplest way to create a modifiable gun without messing anything up with official content. |
Author: | Slendamon [ Sat Oct 27, 2012 7:01 pm ] |
Post subject: | Re: Gun Script Help ( No Experience) |
Thanks all for the help. Finally figured it out! |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |