View unanswered posts | View active topics It is currently Thu Apr 18, 2024 5:22 am



Reply to topic  [ 11 posts ] 
 How do I find the parent of a MO? 
Author Message
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Woah woah woah woah woah. What the hell!?
Did you use it the same way before?


Mon May 02, 2011 3:22 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Woah woah woah woah woah. What the hell!?
Mind posting the script?


Mon May 02, 2011 4:18 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Woah woah woah woah woah. What the hell!?
Huh, abdul formats his scripts differently.
Code:
   if RelVel.X > 35 then RelVel.X = RelVel.X * self.airLarge   -- Air resistance for forward movement
   else RelVel.X = RelVel.X + self.acc   end   -- Acceleration

Take those lines you mentioned, and put them like:
Code:
   print(RelVel);
   if RelVel.X > 35 then
      RelVel.X = RelVel.X * self.airLarge;   -- Air resistance for forward movement
   else
      RelVel.X = RelVel.X + self.acc;
   end   -- Acceleration

Not as compact, but maybe CC was having issues reading the Lua. I doubt this is the fix, but it's the only weird thing I found so far.

Oh, and note that printout I placed in too. Check what it says.


Tue May 03, 2011 1:32 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Woah woah woah woah woah. What the hell!?
Any printout message?


Tue May 03, 2011 1:42 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Woah woah woah woah woah. What the hell!?
What I'm thinking is that the script isn't grabbing anything for "self.Parent," which is a problem since Abdul doesn't have any safety checks to stop the code if that is the case.

So uh, right under line 4 put:
Code:
   print(self.Parent = MovableMan:GetMOFromID(self.Sharpness));

and see what it says.


Tue May 03, 2011 1:55 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Woah woah woah woah woah. What the hell!?
Woops, silly me. Change that printout like to:
Code:
print(self.Parent.PresetName);
ConsoleMan:SaveAllText("errorDump.txt");

And look in your CC folder for the "errorDump.txt".


Tue May 03, 2011 2:03 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Woah woah woah woah woah. What the hell!?
It's trying to grab an MOID from its Sharpness, meaning that other script you mentioned probably controls the Sharpness value to link it to the correct MO.


Tue May 03, 2011 2:45 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Woah woah woah woah woah. What the hell!?
Post the pther script? And describe the method that you're using to spawn the thing with the script on it.


Tue May 03, 2011 4:33 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: How do I find the parent of a MO?
Well, how's your MOSParticle being spawned? Fired from an HDFirearm?


Thu May 05, 2011 12:28 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: How do I find the parent of a MO?
http://pastebin.com/A3jQQUrT

Replace the current function Create() with that. Also, note lines 7 and 14.

Oh, and be sure to change your FireVelocity in INI code to 1.


Thu May 05, 2011 2:47 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: How do I find the parent of a MO?
Woops, left an unneeded variable in there.

Fixed.


Thu May 05, 2011 2:58 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 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.038s | 15 Queries | GZIP : Off ]