Data Realms Fan Forums http://45.55.195.193/ |
|
Making an object createable with Lua but not on buy menu http://45.55.195.193/viewtopic.php?f=1&t=19052 |
Page 1 of 1 |
Author: | Awesomeness [ Mon Jun 21, 2010 3:40 pm ] |
Post subject: | Making an object createable with Lua but not on buy menu |
I have finished my radio which drops rockets on the bad guys when fired, however the rockets attempt to stabilize to the left by using their side thrusters on the way down. Although the rockets still almost always kill the target, it's less pleasing than a direct hit, and if they are moving right at a reasonable speed, it can sometimes miss. The solution I'm trying is to make a copy of the Rocket MK1 that lacks side thrusters. That way all it uses as it tries to stabilize is the main thruster, which pwns the baddies even more. However, I would like to make it createable from my Lua script, but not from the buy menu. How would I do this? I'm afraid if I simply don't tell my ini files to include the modified rocket, it will be invisible to Lua as well. ...Or is this impossible? |
Author: | BrainChild [ Mon Jun 21, 2010 3:45 pm ] |
Post subject: | Re: Making an object createable with Lua but not on buy menu |
Just add the line Buyable = 0 if its not already there |
Author: | Awesomeness [ Mon Jun 21, 2010 3:48 pm ] |
Post subject: | Re: Making an object createable with Lua but not on buy menu |
Okay, thanks. And will the rocket copy's variables interfere with normal rockets? (As in will I have to rename all the variables like in guns?) EDIT: Nevermind. It worked, but the rocket can't be controlled at all; not even by the back thruster, which I didn't delete. How can I make it respond to the keyboard? |
Author: | BrainChild [ Mon Jun 21, 2010 4:12 pm ] |
Post subject: | Re: Making an object createable with Lua but not on buy menu |
Did you copy the rockets .ini and just edited the side trusters and the buyable ? |
Author: | Awesomeness [ Mon Jun 21, 2010 4:26 pm ] |
Post subject: | Re: Making an object createable with Lua but not on buy menu |
All I did was change the buyable and remove the side thrusters. Oh, and I renamed it to Rocket Mk0, so it didn't interfere nnamewise with the real Rocket Mk1. Oh, and just as an experiment, I set Buyable to 1 temporarily and made it deliver something. It crash lands due to not using its main thruster at all, and if it lives, it opens the hatch and spits out the item. This means I can control it, just not the main thruster for some reason. |
Author: | findude [ Mon Jun 21, 2010 4:35 pm ] |
Post subject: | Re: Making an object createable with Lua but not on buy menu |
Try giving it fake side thrusters that provide no thrust. |
Author: | Awesomeness [ Mon Jun 21, 2010 4:38 pm ] |
Post subject: | Re: Making an object createable with Lua but not on buy menu |
findude wrote: Try giving it fake side thrusters that provide no thrust. I thought about that earlier, because I thought it might have been because it needs something to use the other keys in WASD. I thought it would be silly so I decided against trying it... Lol, anyways, I'll edit my post to tell if it works soon. EDIT: How do I change the strength of thrusters? I have made the extra ini with a fake side thruster, (it's just a copy of the normal one) but I don't see a variable that will change the thrust to mess with. EDIT: Nevermind. A quick search on the Wiki found it. LAST EDIT: Thanks guys! It worked! Yay! My radio finally works perfectly! Thank you, everyone who helped! |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |