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



Reply to topic  [ 7 posts ] 
 Making an object createable with Lua but not on buy menu 
Author Message
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post 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?


Mon Jun 21, 2010 3:40 pm
Profile
User avatar

Joined: Sun May 23, 2010 7:11 pm
Posts: 193
Reply with quote
Post Re: Making an object createable with Lua but not on buy menu
Just add the line Buyable = 0 if its not already there


Mon Jun 21, 2010 3:45 pm
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post 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?


Mon Jun 21, 2010 3:48 pm
Profile
User avatar

Joined: Sun May 23, 2010 7:11 pm
Posts: 193
Reply with quote
Post 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 ?


Mon Jun 21, 2010 4:12 pm
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post 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.


Mon Jun 21, 2010 4:26 pm
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: Making an object createable with Lua but not on buy menu
Try giving it fake side thrusters that provide no thrust.


Mon Jun 21, 2010 4:35 pm
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post 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!


Mon Jun 21, 2010 4:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: Google [Bot]


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.066s | 16 Queries | GZIP : Off ]