Data Realms Fan Forums http://45.55.195.193/ |
|
Need help attaching .lua to .ini file. http://45.55.195.193/viewtopic.php?f=1&t=28358 |
Page 1 of 1 |
Author: | Friendofafriend [ Mon Dec 26, 2011 12:25 pm ] |
Post subject: | Need help attaching .lua to .ini file. |
Ok, so i downloaded a Rocket launcher template from viewtopic.php?f=1&t=10247&hilit=Template And made a .lua file with the following inside " function Create(self) for actor in MovableMan.Actors do if actor:HasObject("Rocket Launcher Template") and SceneMan:ShortestDistance(self.Pos,actor.Pos,true).Magnitude < 50 then self.ignoreteam = actor.Team break end end end function Update(self) if MovableMan:IsActor(self.target) then self.RotAngle = SceneMan:ShortestDistance(self.Pos,self.target.Pos,true).AbsRadAngle self:EnableEmission() else self.shortestdistance = -1 for actor in MovableMan.Actors do if actor.Team ~= self.ignoreteam then self.curdist = SceneMan:ShortestDistance(self.Pos,actor.Pos,true).Magnitude if self.curdist < 500 and (self.shortestdistance == -1 or self.shortestdistance ~= -1 and self.curdist < self.shortestdistance) then self.target = actor self.shortestdistance = self.curdist end end end end end " And i am trying to connect that to the Emitter of the template, I have tried putting "ScriptPath = Rocket Launcher Template.rte/Missile.lua (missle.lua being the .lua file of coarse) right under GetsHitByMOs = 0, But it just stops working after it reads the first line of the .ini file. Help me! (Sorry i posted something not to long ago but im working on a mod that should be great ) |
Author: | Coops [ Mon Jan 02, 2012 7:56 am ] |
Post subject: | Re: Need help attaching .lua to .ini file. |
If its got something to do with the ini file then lets see whats inside that. |
Author: | Friendofafriend [ Thu Jan 05, 2012 11:38 am ] | |||
Post subject: | Re: Need help attaching .lua to .ini file. | |||
Here's the entire thing, lets see if you or someone else can fix it.
|
Author: | Pantera1993 [ Sun Jan 15, 2012 8:39 pm ] | ||
Post subject: | Re: Need help attaching .lua to .ini file. | ||
You didn't tab your code correctly. Look in RocketLauncher.ini for some explanations. This is the fixed version.
|
Author: | Friendofafriend [ Mon Jan 16, 2012 5:07 am ] |
Post subject: | Re: Need help attaching .lua to .ini file. |
Ooh, that explains why one of my other things aren't working 0.o thank you so much :3 |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |