View unanswered posts | View active topics It is currently Thu Mar 28, 2024 6:12 pm



Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
 Detect if there is terrain within a certain range? 
Author Message
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Detect if there is terrain within a certain range?
Post entire script?


Mon Jul 18, 2011 10:50 pm
Profile
User avatar

Joined: Sun Dec 21, 2008 8:16 am
Posts: 293
Reply with quote
Post 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


Tue Jul 19, 2011 5:53 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: Detect if there is terrain within a certain range?
255 means the object has no ID. Is the object itself GetsHitByMOs = 1?


Tue Jul 19, 2011 8:08 pm
Profile WWW
User avatar

Joined: Sun Dec 21, 2008 8:16 am
Posts: 293
Reply with quote
Post 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!


Tue Jul 19, 2011 10:09 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 19 posts ]  Go to page Previous  1, 2

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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.064s | 16 Queries | GZIP : Off ]