View unanswered posts | View active topics It is currently Sat Dec 28, 2024 4:31 pm



Reply to topic  [ 5 posts ] 
 Need help attaching .lua to .ini file. 
Author Message

Joined: Thu Dec 22, 2011 9:10 am
Posts: 15
Reply with quote
Post 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 :) )


Mon Dec 26, 2011 12:25 pm
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Need help attaching .lua to .ini file.
If its got something to do with the ini file then lets see whats inside that.


Mon Jan 02, 2012 7:56 am
Profile

Joined: Thu Dec 22, 2011 9:10 am
Posts: 15
Reply with quote
Post Re: Need help attaching .lua to .ini file.
Here's the entire thing, lets see if you or someone else can fix it.


Attachments:
Rocket Launcher template.zip [202.54 KiB]
Downloaded 149 times
Rocket Launcher template.zip [202.54 KiB]
Downloaded 156 times
Thu Jan 05, 2012 11:38 am
Profile
User avatar

Joined: Wed Jul 06, 2011 5:11 pm
Posts: 226
Reply with quote
Post 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.


Attachments:
Rocket Launcher Template.rte.rar [177.06 KiB]
Downloaded 153 times
Sun Jan 15, 2012 8:39 pm
Profile

Joined: Thu Dec 22, 2011 9:10 am
Posts: 15
Reply with quote
Post 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


Mon Jan 16, 2012 5:07 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 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.030s | 16 Queries | GZIP : Off ]