Data Realms Fan Forums http://forums.datarealms.com/ |
|
Detect if there is terrain within a certain range? http://forums.datarealms.com/viewtopic.php?f=73&t=24596 |
Page 2 of 2 |
Author: | CaveCricket48 [ Mon Jul 18, 2011 10:50 pm ] |
Post subject: | Re: Detect if there is terrain within a certain range? |
Post entire script? |
Author: | deathbringer [ Tue Jul 19, 2011 5:53 pm ] |
Post subject: | Re: Detect if there is terrain within a certain range? |
Code: self.attaTable = {}; print(self.ID); -- Always 255 for i = 1, MovableMan:GetMOIDCount()-1 do local part = MovableMan:GetMOFromID(i); if part.RootID == self.ID then print("foundMatch"); -- Never shows up self.attaTable[#self.attaTable+1] = part; end end |
Author: | TheLastBanana [ Tue Jul 19, 2011 8:08 pm ] |
Post subject: | Re: Detect if there is terrain within a certain range? |
255 means the object has no ID. Is the object itself GetsHitByMOs = 1? |
Author: | deathbringer [ Tue Jul 19, 2011 10:09 pm ] |
Post subject: | Re: Detect if there is terrain within a certain range? |
TheLastBanana wrote: 255 means the object has no ID. Is the object itself GetsHitByMOs = 1? That fixed the problem. The object had GetsHitByMOs = 0. After changing it the ID switched to 71 and I started getting "foundMatch". Thanks a lot for all your help guys! |
Page 2 of 2 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |