View unanswered posts | View active topics It is currently Wed Dec 25, 2024 4:59 pm



Reply to topic  [ 2 posts ] 
 Changing Buyability (solved) 
Author Message
User avatar

Joined: Sun May 23, 2010 7:11 pm
Posts: 193
Reply with quote
Post Changing Buyability (solved)
I want to know if you can change if something is buyable with Lua
I have never programmed with Lua before but I have read a few things on the forum and I have gone through the wiki a bit, I have read Cricket's tutorial.

Code:
-- I want this to run as soon as jou buy the item
function Create(self)
-- Cricket's Tutorial said thing.GetsHitByMOs = False so I assume this works aswell
 thing.Buyable = 0
end


So that should technically change the item you bought to not be buyable anymore?
if not can I do it? And also how do I make something unbuyable but at the same time something else buyable? If that is even possible.

Thanks in advance


Last edited by BrainChild on Fri Jun 22, 2012 8:35 pm, edited 1 time in total.



Thu Jun 21, 2012 3:22 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Changing Buyability
The only way to access whether an object is buyable is through SceneObject.IsBuyable, but as you can see, that's a read-only property. Unfortunately, that means you can't change whether something is buyable using Lua.


Thu Jun 21, 2012 5:10 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.066s | 15 Queries | GZIP : Off ]