Data Realms Fan Forums
http://forums.datarealms.com/

Changing Buyability (solved)
http://forums.datarealms.com/viewtopic.php?f=73&t=31297
Page 1 of 1

Author:  BrainChild [ Thu Jun 21, 2012 3:22 pm ]
Post subject:  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

Author:  TheLastBanana [ Thu Jun 21, 2012 5:10 pm ]
Post subject:  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.

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